-
Senior Member
onMotionFinished x 3? possible
Im trying to get a shutter to come down, then pause for 2 seconds once its down. Then raise back up off the stage and onMotionFinished gotoandPlay a key frame on the root.
I know this is a very messy way to do it (shamefully), but its not working because of the x3 onMotionFinished I think. Does anybody know of a much cleaner way to make this happen?
on (release) {
Shutterdown = new mx.transitions.Tween(shutter, "_y", mx.transitions.easing.Regular.easeOut, shutter._y, 225, 2, true);
Shutterdown.onMotionFinished = function() {
Shutterpause = new mx.transitions.Tween(shutter, "_y", mx.transitions.easing.Regular.easeIn, shutter._y, 225, 2, true);
}
Shutterpause.onMotionFinished = function() {
nextframe = new mx.transitions.Tween(shutter, "_y", mx.transitions.easing.Regular.easeIn, shutter._y, -220, 1, true);
}
nextframe.onMotionFinished = function() {
gotoAndStop("1stscene");
};
}
-
Developing For Dunkets
That is messy. But, it isn't working because shutterpause only has scope insidt the shutterdown onMotionFinished, and not outside in the on(release). The way to do it would be:
PHP Code:
on (release) { Shutterdown = new mx.transitions.Tween(shutter, "_y", mx.transitions.easing.Regular.easeOut, shutter._y, 225, 2, true);
Shutterdown.onMotionFinished = function() { Shutterpause = new mx.transitions.Tween(shutter, "_y", mx.transitions.easing.Regular.easeIn, shutter._y, 225, 2, true);
Shutterpause.onMotionFinished = function() { nextframe = new mx.transitions.Tween(shutter, "_y", mx.transitions.easing.Regular.easeIn, shutter._y, -220, 1, true);
nextframe.onMotionFinished = function() { gotoAndStop("1stscene"); }; } } }
-
Senior Member
thank you so much for this
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
|