This content has been marked as final. Show 3 replies
You should use a count and increase it in the rePos unction. Once you have the total amount of duplicates you test it and then clear the interval. Call your setInterval outside of the rePos function.
Here's an example. I couldn't quite understand where you were going with your mc's so I've set this example to duplicate inside the wheel_thumbs movieclip. You might need to adjust it to work with your script.
Thank you, you saved my day!
> thanks for replying. it helped me.
> One problem tho, I used your code and it did give a 2 seconds delay on each
> dups but it wouldn't stop duplicating.
> I did a trace and count variable showed "Nan", then I added var count = 1; but
> a trace of count showed 2.
> any idea?
Put the var count outside the function otherwise it becomes 1 anytime
you'll call the function.