| Flashscript classes (ActionScript 3) | Home | MX | MX 2004 | Flash 8 | Flash 9 |Flash 10 |PHP |Components | Snippets | Contact | |
CarousselTwo |
|
|
See also
| Property | Defined By |
|---|---|
|
setAngleFactor
: Number
To alter the movement to waves. |
CarousselTwo |
|
setAlpha
: Boolean
If true the scene will be dimmed. |
CarousselTwo |
|
setRotation
: Boolean
If true the objects will rotate along the y-axis according to their position inside the circle. |
CarousselTwo |
| Method | Defined By |
|---|---|
|
CarousselTwo()
Creates a new instance of the CarousselTwo class. |
CarousselTwo |
|
setParams(container:Sprite, objectA:Object, pathWidth:int, pathHeight:int, xr:int, yr:int, angle:Number,
viewDist:int=50, objRot:Number=0):void
Will initiate the tween when an instance of the CarousselTwo class exists. |
CarousselTwo |
|
changeTimer(count:int, angle:Number=1):void
Allows to change the speed for the circle to move and the angle in which the objects are oriented to each other. |
CarousselTwo |
|
goMoreCircle(objectArray:Array=null, myNum:int=1, numObjects:int=1, speedFactor:int=1):void method
This method will initiate the movement of the caroussel. |
CarousselTwo |
| Event | Defined By |
|---|---|
| All inherited events for the Sprite class. | N/A |
| Property Detail |
|---|
|
setAngleFactor
property
setAngleFactor:Number [read-write] Changing the value will alter the movement. Increasing the value will cause the objects to jump while decreasing will cause the circle to move in a different angle. The default value is 1. Implementationpublic function get setAngleFactor():Numberpublic function set setAngleFactor(value:Number):void |
|
setAlpha property setAlpha:Boolean [read-write] If true all objects will behave reduced alpha. The default value is false. Implementationpublic function get setAlpha():Booleanpublic function set setAlpha(value:Boolean):void |
|
setRotation property setRotation:Boolean [read-write] To cause objects to rotate by themselves according to the position in the circle set setRotation to true. The default value is false. Implementationpublic function get setRotation():Booleanpublic function set setRotation(value:Boolean):void |
| Constructor Detail |
|---|
|
CarousselTwo () Constructor
public function CarousselTwo() |
| Intializes a new CarousselTwo instance. |
| Method Detail |
|---|
|
setParams() method
This method will initiate the caroussel methods. |
Parameters
|
|
changeTimer() method
This method will initiate the caroussel methods. To change certain properties add the property before the method call: |
Parameters
|
|
goMoreCircle() method
This method will initiate the movement of the caroussel and is required for that. |
Parameters
|
| Examples |
|---|
Create a new fla file with the dimensions of 700x500 pixels and name it CarousselTwo.fla. Place the fla in the same folder as the biz folder. Create a MovieClip
Models
and export for actionscript. Add 9 frames to the MovieClip and keep the first frame empty. Place a stop(); in the first frame. Then place an object (image for example) into each frame. Create a background, give it the identifier "BackImage" and export for actionscript. Then create an Actionscript file, name it Carousselone.as and place this script.
package
{
import flash.display.Sprite;
import flash.display.Loader;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.net.URLRequest;
import biz.flashscript.utils.MultiPreloader;
import biz.flashscript.animation.CarousselTwo;
import biz.flashscript.animation.MirrorImage;
import biz.flashscript.utils.LoaderClassStatic;
import biz.flashscript.tweens.ApplyTweensTimer;
public class Carousseltwo extends Sprite
{
private var mfArray:Vector.
|