Method explanation:
Actuate. Tween (target: dynamic, duration: float, properties: dynamic ,? Overwrite: bool ,? Customactuator: class <motion. actuators. genericactuator>)
Target: the object to be controlled, including canvas and genie.
Duration: animation duration
Properties :??
? Overwrite :??
? Customactuator :??
The simplest method of use:
Package; Import Flash. display. Sprite; Import Flash. Events. event; Import Motion. actuate; Import Motion. Easing. Quad; Class Main Extends Sprite { Public Function New (){ Super (); VaR Size = 5 + math. Random () * 35 + 20 ; VaR Circle =New Sprite (); circle. Graphics. beginfill (std.int (math. Random () * 0 xffffff )); // Fill the Sprite with random colors Circle. Graphics. drawcircle (0, 0, size ); // Draw a circle with random radius Circle. x = 100; // Assign an initial X position to the genie Circle. Y = 100; // Assign the initial y position to the genie Circle. Alpha = 0; // The wizard is transparent by default. Addchild (circle ); // Add the circular genie to the genie Actuate. Tween (circle, 10, {ALPHA: 1 }); // Add an animation to the circular Sprite. The animation duration ranges from 10 to full. }}
Actuate class method:
-Stop
-Pauseall
-Pause
-Resumeall
-Resume
-Reset
-Update :?
-Transform: You can use transform to control colors and sounds.
-Effects: tween filters (actuate. Effects (). Filter ())
-Timer: Timer
-Apply: use the "Apply" method to stop conflicting tweens and instantly set an object's properties
Actuate. Tween () method:
-Autovisible
-Delay
-Velocity: it can control the speed of motion. Under normal circumstances, the speed of moving the genie is fixed, but if you use the velocity, you can make it variable speed. Easein: the entry is slow and the process is accelerating. Easeout: Fast arrival and slow down.
-Oncomplete: Call A method at the end of tween.
-Onrepeat: Call A method when tween is repeated.
-Onupdate: Call A method when tween is updated.
-Reflect: reverse is performed when the tween is repeated. To use this method, you must enable report.
-Repeat: duplicate tween
-Reverse: return based on the original trajectory
-Smartrotation
-Snapping