flash on 2011-6-21
♥0 |
Line 16 |
Modified 2011-06-21 15:33:10 |
MIT License
archived:2017-03-20 02:21:04
ActionScript3 source code
/**
* Copyright Joe.Brant ( http://wonderfl.net/user/Joe.Brant )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/sjPB
*/
package {
import flash.display.Bitmap;
import flash.geom.Rectangle;
import flash.display.BitmapData;
import flash.display.Sprite;
public class FlashTest extends Sprite {
protected var bmp : BitmapData = new BitmapData(40, 40, false, 0x00FF00);
protected var spr: Sprite = new Sprite();
public function FlashTest() {
// write as3 code here..
bmp.fillRect(new Rectangle(0, 0, 20, 20), 0x0000FF);
this.graphics.beginBitmapFill(bmp);
this.graphics.drawRect(0, 0, 40, 40);
this.graphics.endFill();
//this.addChild(new Bitmap(bmp));
//spr.graphics.beginBitmapFill(bmp);
}
}
}