flash on 2012-3-2
♥0 |
Line 25 |
Modified 2012-03-02 18:39:42 |
MIT License
archived:2017-03-20 06:27:41
ActionScript3 source code
/**
* Copyright tora ( http://wonderfl.net/user/tora )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/xsaM
*/
package {
import flash.display.Shape;
import flash.display.Sprite;
public class FlashTest extends Sprite
{
public function FlashTest()
{
// write as3 code here..
var ab:MyRect = new MyRect();
this.addChild(ab);
}
}
}
import flash.display.Sprite;
import flash.display.Shape;
class MyRect extends Sprite
{
public function MyRect()
{
var shape:Shape = new Shape();
shape.graphics.beginFill(0xCCCCCC);
shape.graphics.drawRect(10,10,50,50);
shape.graphics.beginFill(0xCC0000);
this.addChild(shape);
}
}