flash on 2009-11-18
/**
* Copyright yd_niku ( http://wonderfl.net/user/yd_niku )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/m9Gk
*/
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import jp.progression.commands.*;
import jp.progression.commands.display.*;
import jp.progression.commands.net.*;
import jp.progression.commands.lists.*;
public class FlashTest extends Sprite {
public var taiga:Sprite;
public function FlashTest() {
// write as3 code here..
var imgUrl:String = "http://assets.wonderfl.net/images/related_images/e/e9/e9b6/e9b64ead20dd3d674e79ea186b29f974341b480f";
taiga = new Sprite();
new SerialList( null,
new LoadSWF( new URLRequest(imgUrl) ),
function():void {
var face:Loader = this.latestData;
face.x = -face.width/2 >>0;
face.y = -face.height/2 >>0;
taiga.addChild( face );
},
new AddChild( this, taiga ),
new Prop( taiga, { x: 232, y:232, rotationX:12, rotationZ:6 } ),
startRotate
).execute();
}
public function startRotate():void {
addEventListener( Event.ENTER_FRAME, rotate );
}
public function rotate(e:Event):void {
taiga.rotationY += 4;
}
public function stopRotate():void {
removeEventListener( Event.ENTER_FRAME, rotate );
}
}
}