Can any one help me… I have spent many hours trying to nut this one out…
I have an animated button which I am animating using a tween class. It works fine, my problem is this, I need to jump to another Scene after the animation has finished.
HOW please!!!
Macsy
June 2, 2008, 5:14am
2
First. dont use scence,
Secound, check tween class on kirupa tut pages,
Third, check [AS]Tween.onMotionFinnished = function (){gotoAndPlay()}[/AS]
When I do that, this is what I get…
The property being referenced does not have the static attribute.
Macsy
June 2, 2008, 5:39am
4
what did you write then ?
Tween referece to whatever you call your tween ofcourse
Ok, here is what I have in the code…
import mx.transitions.Tween;
import mx.transitions.easing.*;
new Tween(clip4_mc,"_y",Elastic.easeOut,-43.6,250.5,5,true);
Tween.onMotionFinished = function() {
gotoAndPlay(“Scene 2”,1);
}
[QUOTE=Macsy;2334601]what did you write then ?
Tween referece to whatever you call your tween ofcourse[/QUOTE]
Macsy
June 2, 2008, 6:13am
6
… you should really check tutorials before posting, or before anything, really…
[AS]
import mx.transitions.Tween;
import mx.transitions.easing.*;
var ****:Tween = new Tween(clip4_mc,"_y",Elastic.easeOut,-43.6,250.5,5,true);
****.onMotionFinished = function() {
gotoAndPlay(“Scene 2”,1);
}
[AS]
[QUOTE=Macsy;2334635]… you should really check tutorials before posting, or before anything, really…
[AS]
import mx.transitions.Tween;
import mx.transitions.easing.*;
var ****:Tween = new Tween(clip4_mc,"_y",Elastic.easeOut,-43.6,250.5,5,true);
****.onMotionFinished = function() {
gotoAndPlay(“Scene 2”,1);
}
[AS][/QUOTE]
Thank you VERY MUCH Macsy… I actually worked it out before your last post. Yes I set up a var and it works beautifully… Thanks again for your time. I have been searching and trying different codes since 9am this morning.
akalah
June 2, 2008, 12:57pm
8
another creative solution I’ve used is to set up a interval that will go off after your tween finishes. It’s bulkier but it works too