very weird stuff happening in an AS2 class

Q&A about the latest versions
Post Reply
bizmillah
Posts: 12
Joined: Fri Sep 07, 2007 5:16 pm

Just download this zip: http://www.cern.ch/vv/dev/panoproblem.zip

check the file panoTest.fla. It just wants to put up 2 panos in two layers. It uses a Panorama class in Panorama.as (it's AS2). The buttons b1 and b2 should control the visibility of the clips.

1st problem: start with only pano1 (i.e. leave the lines about pano2 commented out in panoTest.fla, layer AS). The pano loads into the mc, but does not match its size. Quick fix: uncomment the scale lines before loading the pano. I worked out that 46% euristically, but why do I need it?

2nd problems: hotspots trapping doesn't work properly. I get the trace message from onClickQtHotspot, but it does not call my "hotspot" function. Why? In fact, this function should really call another function "loadVideo", which is in another class. How can I do that?

3rd problem: now uncomment both panos. What's that monster? looks like a hybrid. It loads in pano1_mc, but in fact it's the picture that should load in pano2_mc.


Note that this sort of worked before, when I did not have a Panorama class but inlined the code in the main script, I mean the hotspots worked, but the jaggy on pano 2 was still there.

I need to load 2 panos for performance reasons. The panos are viewpoints inside a video walk. Before the video arrives at the viewpoint, it preloads the pano via cuePoint. When it gets to the right place, I just turn on visibility, and you get the pano. However I need to preload 2 panos ahead, or I don't make it in time.
bizmillah
Posts: 12
Joined: Fri Sep 07, 2007 5:16 pm

I researched the problem further. In fact it's as simple as that: you cannot have 2 panos, in 2 different movieclips on stage. The result is a terrible mess, with a mix of both, and totally messude up graphics.

I need to do that because I must preload the next pano while watching a previous one.

Silvano
User avatar
thomas
Chief Gnome
Posts: 2613
Joined: Fri Sep 01, 2006 3:56 pm
Location: Vienna, Austria
Contact:

Yes, its true. You can only have one pano on a stage because I use static classes. With Flash 9/AS3 this should be possible (... I never actually tried it) because I packed all the code in just one class.
MfG, Thomas
bizmillah
Posts: 12
Joined: Fri Sep 07, 2007 5:16 pm

That means I have to put my head down and learn dam AS3. I did try, but I gave up after wasting a month, 'cause nothing worked. OK, I'll survive with a trick for now, and then plan an upgrade for my next release, next year...

Thanx anyway
Post Reply