It is extensive how many methods are there for controlling a motion tween on ActionScript.
See all possible tween methods here
In this 10 minutes, Music + Narration tutorial we show how to start, stop, resume and rewind a motion tween on ActionScript.
DOWNLOAD THE SOURCE FILE
Part 5 X Motion Final
CLICK HERE FOR A COMPLETE ACTIONSCRIPT 3.0 CARTOON SMART TUTORIAL
HERE IS THE SOURCE CODE!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
//The ActionScript 3.0 Motion Tween Methods
// Avraham Saltoun
// solutions at say-web dot com
// FREE to USE, COPY and DISTRIBUTE
// Let's start by importing libraries
import fl.transitions.Tween;
import fl.transitions.easing.*;
// This will import all eases
var xTween : Tween;
// This is the variable that will hold the Tween
// in our case the "Tween" is the horizontal motion
// on stage
// This starts the animation on load
xTween = new Tween(boat_mc,"x",None.easeNone, 10,450,7,true);
// boat_mc is the name of the symbol instance
// x is the tween type, this means horizontal movement
// none is the bounce and ease
// starts at coordinate 10 - that is the left side of the stage
//and finishes at 450, taking all together 7 seconds.
// the true states that we are counting seconds, not milliseconds...
// we have currently 3 buttons on stage
//Event Listeners - this will set the compiler
// waiting for button clicks
play_btn.addEventListener(MouseEvent.CLICK, playTween);
stop_btn.addEventListener(MouseEvent.CLICK, stopTween);
rewind_btn.addEventListener(MouseEvent.CLICK, rewindTween);
//Functions
//Play
function playTween (event:MouseEvent):void
{xTween.resume();}
//Stop
function stopTween (event:MouseEvent):void
{xTween.stop();}
//Rewind
function rewindTween (event:MouseEvent):void
{xTween.rewind();}
// This will stop the animation
// on the very beginning after it started
xTween.stop();
// Subscribe from the website!
// Thanks for watching....
</div> |




February 7th, 2012 at 11:51 pm
f, diflucan, generic levitra, cialis mail order, dangers of plavix, antabuse online, cialis generic online, viagra online, cytotec misoprostol,
February 8th, 2012 at 3:14 am
pikavippi 300e
February 8th, 2012 at 3:52 am
e, lasix and urial, accutane.com, drug diflucan, buy cialis poland, plavix and tylenol, 250 antabuse buy mg, cheap nolvadex,
February 8th, 2012 at 6:06 am
5, viagra, >:-[[,
February 8th, 2012 at 7:49 am
f, order accutane, baclofen, diflucan one, levitra.com, generic plavix, antabuse online, cytotec,
February 8th, 2012 at 8:12 am
5, viagra no prescription, 15084,
February 8th, 2012 at 11:24 am
buy valium no prescription – buy diazepam online
February 8th, 2012 at 11:48 am
c, схема вязания подушки,
February 8th, 2012 at 11:55 am
4, cheap viagra online,
),
February 8th, 2012 at 12:29 pm
http://www.myfiwifi.net/index.php?p=blogs/viewstory/7988
February 8th, 2012 at 1:57 pm
purchase ambien online – buy ambien online no rx
February 8th, 2012 at 2:03 pm
5, buy viagra cheap, tqy,
February 8th, 2012 at 4:26 pm
6, order viagra online, 919,
February 8th, 2012 at 6:00 pm
fONPbp lcbqkobxomkg, [url=http://teuqpukbzspe.com/]teuqpukbzspe[/url], [link=http://xudixadjimbt.com/]xudixadjimbt[/link], http://kxqybbnhfsun.com/
February 8th, 2012 at 6:44 pm
The serifs are there for a reason: they aid readability of body text on the printed page. Your monitor has nowhere near the resolution of a printed page though, so serif fonts (incl. Times New Roman) tend to look a bit shabby on the screen., Guam payday loans, bmmkk,
February 8th, 2012 at 6:54 pm
6, viagra pills, 80639,
February 8th, 2012 at 9:25 pm
4, viagra online, %-DD,
February 8th, 2012 at 11:42 pm
ambien buy – cheap ambien online
February 9th, 2012 at 3:19 am
buy cheap ambien online – purchase ambien online no prescription