PDA

View Full Version : d-m-c



mario_hater
June 30th, 2006, 01:56 PM
im having problems with duplicate movie clip for this game. here are the things the code need to do:

1.there can only be 5 movieclips on screen at once

2.if the y value is less than 0 remove it

3. have _y-- in it somewhere

4. make each one come on at a random _x value between 0 and 400

thankyou

tfoston
July 1st, 2006, 05:12 AM
here's some coding that might help

for(i=0;i<5;i++){
_root.attachMovie("Linkagename", "InstanceName"+i, i)
[Instancename+i]._x = Math.abs(Math.random()*400) //will give random positive #'s 0-400
[Instancename+i]._y = Math.abs(some number you want to plug in)// all y stays >0
}
Just make sure you have a movie with a linkage name. Let me know if this helps or not

mario_hater
July 1st, 2006, 06:31 AM
sorry but this code is too complicated for me because im crap at actionscript but thanks anyway :thumb: