rustyboy
03-12-2007, 07:11 PM
Hi,
I am making a side scrolling shooter in Flash, as you do. It is set in space and I dont want to do the lazy thing by making a looping background with stars in it.
I have taken some of the code from this tutorial and am adapting it to my needs.
http://www.actionscript.org/resources/articles/549/1/Floating-Background/Page1.html
But the section where the float MC is randomly placed on the layer needs to be altered to set it at a random height just off the right hand side of the screen. How would i go about creating a random value for the _y value between the upper and lower stage heights?
Also, I cannot remember where i saw it or whether i just dreamt it but how can you apply AS code to an attachMovie instance?
Thanks very much.
I am making a side scrolling shooter in Flash, as you do. It is set in space and I dont want to do the lazy thing by making a looping background with stars in it.
I have taken some of the code from this tutorial and am adapting it to my needs.
http://www.actionscript.org/resources/articles/549/1/Floating-Background/Page1.html
But the section where the float MC is randomly placed on the layer needs to be altered to set it at a random height just off the right hand side of the screen. How would i go about creating a random value for the _y value between the upper and lower stage heights?
Also, I cannot remember where i saw it or whether i just dreamt it but how can you apply AS code to an attachMovie instance?
Thanks very much.