public function assgn()
{
var recA:Sprite = new Sprite();
graphics.beginFill(0xFFF010);
graphics.lineStyle(1);
graphics.drawRect(0, 380, 50, 20);
addChild(recA);
recA.x = 300;
recA.y = 300;
recA.scaleX = 2;
recA.scaleY = 2;
recA.addEventListener(Event.ENTER_FRAME, moveRecA);
public function assgn() { var recA:Sprite = new Sprite(); graphics.beginFill(0xFFF010); graphics.lineStyle(1); graphics.drawRect(0, 380, 50,
Share
It looks to me like you might not have the correct import statements at the top of your Actionscript file. Try placing an import at the top of the file, as follows: