Flashscript classes (ActionScript 3) | Home | MX | MX 2004 | Flash 8 | Flash 9 |Flash 10 |PHP |Components | Snippets | Contact |

Zooms

Package:
Class:
Inheritance:
biz.flashscript.tweens
public class Zooms
N/A
The Zooms class allows to zoom objects in and out using the mouse behavior. To trigger a new instance of the Zooms class use the constructor new Zooms() and add parameters as desired.
Public Methods
Method Defined By
Zooms(_target:Object, _scaleFactor:Number= 0.002, _ease:String="null") Zooms
Constructor Detail
Zooms ()  Constructor
public function Zooms(_target:Object, _scaleFactor:Number= 0.002, _ease:String="null")
Intializes a new Zooms instance with the specified parameters.

Parameters

  • _target:Object ____ Specifies the object to zoom.
  • _scaleFactor:Number=0.002 ____ Optional: specifies the zoom speed.
  • _ease:String="null" ____ Optional: "in" specifies easing in and "out" specifies easing out.
Examples
Create a new fla file and name it Zoom.fla. Place the fla in the same folder as the biz folder. Add two MovieClip on the stage and name them "sq1" and "c1". Then create an Actionscript file, name it Zoom.as and place this script.
package 
{
	import flash.display.Sprite;
	import biz.flashscript.tweens.Zooms;

	public class Zoom extends Sprite
	{
		public function Zoomi ():void
		{
			var zz:Zooms = new Zooms(sq1,0.01,"in");
			var cc:Zooms = new Zooms(c1,0.01,"out");
		}
	}
}