-
Tweening freeze
Hello guys
What do you thing could be the problem.
I've got on different frames buttons when I click one of them the tweening the tweening shows up.
The problem is: when I click button tweening shows up pretty fine but when I click another button DURING the tweening the next tweening crash/freeze.
When I wait for tweening to finish it works fine, the problem is only during the tweening...
???
-
-
I think that when the swf just stops, it's an issue regarding where you actually define the tween variable. Make sure you define the tween variable so its scope is global (i.e., at the top of the script)
and the function where you actually instantiate the tween should be in the function itself
Actionscript Code:
function someFunction(evt:MouseEvent):void { myTween = new Tween(yadda yadda your particular tween particulars here }
Note how it should NOT be:
Actionscript Code:
function someFunction(evt:MouseEvent):void { var myTween:Tween = new Tween(yadda yadda your particular tween particulars here }
-
so the second button that you click makes an another tween on the same object, right? You could use a second different tween object for the second button to work with, or if you dont want anything to happen if the tween has not finished yet set a 'tweening' boolean to true whenever the tween starrts and obviously set to false when it ends, then on the second button place an if statement to check whether it is still tweening
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|