flash on 2011-7-19
import flash.display.Math;
/**
* Copyright flashfx ( http://wonderfl.net/user/flashfx )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/5QBI
*/
package {
import flash.text.TextField;
import flash.events.MouseEvent;
import flash.display.Sprite;
import flash.display.Graphics;
//import flash.display.Math;
public class FlashTest extends Sprite {
public function FlashTest() {
// write as3 code here..
function createSquare(_xpos:Number, _ypos:Number):void {
var mySquare:Sprite = new Sprite ();
mySquare.graphics.beginFill(0x00ff00);
mySquare.graphics.drawRect (_xpos,_ypos,100,100);
mySquare.graphics.endFill();
stage.addChild (mySquare);
}
createSquare(200,200);
}
}
}