BackWard

Package:
Class:
Inheritance:
biz.flashscript.tweens
public class BackWard
Sprite
The BackWard class allows to move the timeline backwards. To create a new instance of the BackWard class use the constructor new BackWard() and add parameters as desired. All parameters are required.
Public Properties
Property Defined By
All inherited properties of the Sprite class.
Public Methods
Method Defined By
BackWard(target:MovieClip, frameLabel:String, frameStart:int, duration:int) BackWard
Events
Event Defined By
All inherited events for the Sprite class.
Constructor Detail
BackWard ()  Constructor
public function BackWard(target:MovieClip, frameLabel:String, frameStart:int, duration:int)
Intializes a new BackWard instance with the specified parameters.

Parameters

  • target:MovieClip ____ Specifies the timeline of an object/MovieClip.
  • frameLabel:String ____ This is the point where the timeline is played backwards.
  • frameStart:int="linear" ____ The frame until the backwards movement will go.
  • duration:int ____ Specifies the speed (frames/second) of the backwards movement. 100 would be 1 frame in 100msec.
Examples
Create a new fla file and name it BackWardExample.fla. Place the fla in the same folder as the biz folder. Add a MovieClip on the stage with several frames and name it myClip. Add framenames "start" in the second frame and endframe in the last frame. Then create a colortween or sizetween. Place a button component on the timeline and name it startBut. Then create an Actionscript file, name it BackwardExample.as and place this script.

package 
{
	import flash.display.Sprite;
	import biz.flashscript.tweens.BackWard;
	import fl.controls.Button;
	import flash.events.MouseEvent;
	import flash.display.MovieClip;

	public class BackwardExample extends Sprite
	{
		public var startBut:Button;
		public var myClip:MovieClip;
		
		public function BackwardExample ():void
		{
			startBut.label = "START";
			startBut.addEventListener (MouseEvent.CLICK, clickHandler);
		}
		private function clickHandler (event:MouseEvent):void
		{
			myClip.gotoAndPlay("start");
			var bw:BackWard = new BackWard(myClip, "endframe", 1, 200);
		}
	}
}