For school i am creating a basic game in AS3 for mobile, basically all you need to know is that I need a rectangle the width of the stage(380) (height doesn't matter) to spawn up the top then after a few seconds another spawns, and this process repeats infinitely until said otherwise. I haven't done much yet so i do not have much code to show but if anyone could tell me how it would be greatly appreciated.
I have the movement down packed, just not the spawning
var rectangle:Shape = new Shape;
var RecTimer:Timer = new Timer(10,10000);
RecTimer.addEventListener(TimerEvent.TIMER, fRecMovement);
RecTimer.start()
function fRecMovement (e:TimerEvent):void {
rectangle.graphics.beginFill(0xFF0000); // choosing the colour for the fill, here it is red
rectangle.graphics.drawRect(0, 0, 480,45.49); // (x spacing, y spacing, width, height)
rectangle.graphics.endFill();
addChild(rectangle); // adds the rectangle to the stage
rectangle.y +=1
}