PDA

View Full Version : Transition Tween (AS2)


Sungalax
10-04-2010, 08:54 AM
I have a question about importing the mx.transitions.Tween

I have 2 panos, in one pano there are 2 spots that have both a .swf file. In this swf files the Tween Class is used (AS2).

When the pano with the 2 spots is loaded everything works fine, including the mx.transitions.Tween. After i click on the second pano and go back to the first pano the mx.transitions.Tween isn't working anymore. I can not use the Tween Class anymore.

My actionscript in the swf file
import mx.transitions.Tween;
import mx.transitions.easing.*;
var GoTween:Tween = new Tween(mc, "_x", Regular.easeOut, mc._x, mc.EndX, 5, false);

Scott Witte
10-04-2010, 04:07 PM
When the pano with the 2 spots is loaded everything works fine, including the mx.transitions.Tween. After i click on the second pano and go back to the first pano the mx.transitions.Tween isn't working anymore. I can not use the Tween Class anymore.

We need to know a lot more but here is what I think should be happening.

1) The code you gave is part of the swfs you are using as hotspots.
2) Those hotspots are linked to one of the panos (using the linked parameter) They are not loaded as plugins.
3) in you Flash Trace you see the spots loaded and unloaded as panos change.

If the above is all true there should be no reason everything doesn't work. So, are you doing anything different than the above? Also, are your swf hotspots communicating with FPP in any way? If so, by what method?

Sungalax
10-06-2010, 11:32 AM
Hi Scott,

1, 2 and 3 is true.

The hotspots are not communicating with the FPP. I'm only communicating between spots with the LocalConnection method.

The Tween Class is working fine the first time the spots are loaded. Only when i switch to another pano(and the spots unload) and return back the Tween Class isn't working anymore.

Scott Witte
10-06-2010, 03:25 PM
I'm only communicating between spots with the LocalConnection method.
Ah, yes, localConnection :( I expect that is where your problems are arising. I am guessing that the local connection isn't stopped when the spot is unloaded. When it loads again it tries to establish a new localConnection and fails. There may even be a trace error to that effect if you are using the debug version of Flash.

It has been a few years since I've worked with local connections. I gave them up in favor of direct calls. My meager recommendation is that you focus on the part of your code where local connection is established and see if that is the source of the problem. It sounds like you are familiar enough with programming to do that.

BTW, not sure why you are still using AS2, but I strongly recommend moving to AS3 if possible.