flash on 2011-5-16
♥0 |
Line 29 |
Modified 2011-05-16 02:24:10 |
MIT License
archived:2017-03-20 17:52:38
ActionScript3 source code
/**
* Copyright misusu1224 ( http://wonderfl.net/user/misusu1224 )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/hC9b
*/
package {
import flash.display.AVM1Movie;
import flash.display.Sprite;
import flash.display.Shape;
import caurina.transitions.Tweener;
import flash.events.MouseEvent;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;
public class FlashTest extends Sprite {
public function FlashTest() {
// write as3 code here..
var box1:Shape =newBox(50,50);
var box2:Shape =newBox(50,130);
Tweener.addTween(box1,{x:400, time:1.0});
Tweener.addTween(box2,{x:400, time:1.0,transiton:'easeOutBounce'});
}
public function newBox(x:uint,y:uint):Shape
{
var box:Shape = new Shape();
box.graphics.beginFill(0x333333);
box.graphics.drawRect(0,0,60,60);
box.graphics.endFill();
box.x=x;
box.y=y;
addChild(box);
return box;
}
}
}