PDA

View Full Version : [FlashPro8] Tween Class



small_guy
April 14th, 2007, 03:19 AM
I have a createEmptyMovieClip. Upon the press of a button on my main menu a .swf loads into the createEmptyMovieClip.

My problem/question is this: I want the loaded clip to tween in along _x to approximately center stage.

I know this has something to do with the mx.transitions.Tween and mx.transitions.easing classes. The Flash Help section gave this code as sounding really close to what I want to do:

new mx.transitions.Tween(emptyKTVN_mc, "_x", mx.transitions.easing.Elastic.easeOut, 0, 300, 3, true);

But when I tried to apply it it just loads the external .swf into the 300 mark on _x instead of tweening into place.

Any help on this is appreciated....including any tutorials that I might be pointed to.

worthyashes
April 14th, 2007, 04:16 AM
Have you waited until the swf has fully loaded before trying to move it with the tween?

matbury
April 14th, 2007, 03:02 PM
There's a couple of Tween class tutorials on this site:

http://www.kirupa.com/developer/actionscript/tween.htm

http://www.kirupa.com/developer/actionscript/tween_part2.htm