Haxe-actuate. Tween

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.