USERNAME:
PASSWORD:
Save Info!
Logging in…
This topic is 1 page long.
[ Profile | Posts | Contact ]
Posted at: 11/24/08 09:07 AM
Sign-Up: 05/03/06
Posts: 534
i thought i had it right but i guess not can anyone help
setInterval (function () { duplicateMovieClip(rock,"rock"+i,100+i); rockCopy=_root["rock"+i] rockCopy._x = 700; rockCopy._y = random(100)+200; if(rockCopy._x <= 50){ removeMovieClip(this); } i++ }, 1000);
Posted at: 11/24/08 09:29 AM
Sign-Up: 12/19/05
Posts: 2,327
Try tracing its depth. trace(MC.getDepth()). See what you get.
Posted at: 11/24/08 09:32 AM
Sign-Up: 03/09/03
Posts: 2,596
You are setting the objects _x to 700 then checking to see if its less than 50. That if statement will never run.
Posted at: 11/24/08 09:51 AM
there is code on the enterFrame that moves its _x -=30
Posted at: 11/24/08 10:14 AM
At 11/24/08 09:51 AM, CrustySheet wrote: there is code on the enterFrame that moves its _x -=30
Thats all well and good but the if statement will next check after it's created. Put that if statement inside your onEnterFrame.
Posted at: 11/24/08 01:10 PM
Sign-Up: 08/10/05
Posts: 6,028
Cojones is correct. You're only checking it when its first created, at which point its _x is 700.
Portfolio(Under construction): UnknownFury.com | Msn: giant_ak_47@msn.com | Contact: me@unknownfury.com Follow me on twitter!
All times are Eastern Standard Time (GMT -5) | Current Time: 05:58 PM
<< Back