flash on 2009-10-22
♥0 |
Line 27 |
Modified 2009-10-22 09:35:31 |
MIT License
archived:2017-03-20 08:52:50
ActionScript3 source code
/**
* Copyright sinclairc5 ( http://wonderfl.net/user/sinclairc5 )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/r3e9
*/
package {
import flash.display.*;
import gs.TweenLite;
public class FlashTest extends Sprite {
private var m:MovieClip;
public function FlashTest()
{
// write as3 code here..
var s:Shape = new Shape();
s.graphics.beginFill( 0x000000, 1 );
s.graphics.drawRect( 0,0,100,100 );
s.graphics.endFill();
s.x = -50;
s.y = -50;
m = new MovieClip();
m.addChild( s );
m.x = 200;
m.y = 200;
addChild( m );
flip();
}
public function flip():void
{
TweenLite.from( m, 5, { rotationX:0, rotationY:0, z:3000, rotationZ:0 } );
TweenLite.to( m, 5, { rotationX:360, rotationZ:360, z:-1200, onComplete:flip } );
}
}
}