Okay so I know how to move the stage within the actual .fla file by modifying this.x and this.y variables in the layer 1 actionscript.
But within the document class- public class Starlight extends MovieClip, it does not seem to work no matter what i try and my research lead me to this use code instead:
for( i = 0; i < stage.numChildren; i ++){
stage.getChildAt(i).x -= player.speedx * player.bounceSpeed;
stage.getChildAt(i).y -= player.speedy * player.bounceSpeed;
}
I do realize that its hacky and slower as compared to actually moving the stage itself. And i'm not sure what's going to happen if another object that moves comes into the stage because technically this code is unnaturally altering the x,y of everything in the stage.
Any help appreciated!! Cheers
Edit: Tried this--
var stage2:Sprite = new Sprite();
stage2.x = stage.stageWidth / 2;
stage2.y = stage.stageHeight / 2;
stage2.width = 4000;
stage2.height = 4000;
addChild(stage2);
for (i = 1; i < 50; i ++)
{
var asteroid:Asteroid = new Asteroid();
asteroid.x = Math.round(Math.random() * stage.stageWidth * 4);
asteroid.y = Math.round(Math.random() * stage.stageHeight * 4);
stage2.addChild(asteroid);
collisionList.addItem(asteroid);
asteroids.push(asteroid);
}