Targeting all MC's in an array except orig?

  • torbjorn
  • Novice
  • Novice
  • User avatar
  • Joined: Aug 21, 2003
  • Posts: 23
  • Status: Offline

Post June 4th, 2004, 2:18 pm

Hi,
I have a movieclip called 'footprints' that is duplicated using duplicateMvieClip, and placed on the stage, over and over again. The clips are named ' '"footprints"+i'
I would like to add a feature where you can delete the prints and start again, but without deleting the original clip.
How do I target all the clips except for the first one, so I can delete them using removeMovieClip?

nm = "footprints"+i;
duplicateMovieClip(_root.footprints, nm, _root.counter++);
The footprints are for a little bug that scoots all over the screen on my portfolio site http://www.neverbeat.com. To turn on the footprints for the bug, go to the 'animation' page and click on 'neverbug' then click the 'footprints' check box. (I have figured out how to stop and start the footprints, but I don't know how to remve them all without deleting the original clip.)
Thanks
t[/code]
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post June 4th, 2004, 2:18 pm

  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post June 4th, 2004, 4:09 pm

If _root.counter stays inline with how many clips have been made somthing along theese lines should work.

Code: [ Select ]
function eraseTracks(){
    for(i = 0; i < _root.counter; i++){
        toWipe = ["footprints" + i];
        removeMovieClip(toWipe)
    }
}
  1. function eraseTracks(){
  2.     for(i = 0; i < _root.counter; i++){
  3.         toWipe = ["footprints" + i];
  4.         removeMovieClip(toWipe)
  5.     }
  6. }
Strong with this one, the sudo is.
  • torbjorn
  • Novice
  • Novice
  • User avatar
  • Joined: Aug 21, 2003
  • Posts: 23
  • Status: Offline

Post June 5th, 2004, 11:07 am

Thanks a lot. I got it to work. Check it out if you like
http://www.neverbeat.com/flash/
Click on 'animation' then 'neverbug', then check and uncheck 'footprints'.
Thanks,
t
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post June 5th, 2004, 2:02 pm

Glad I could help :D very neat.
Strong with this one, the sudo is.

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 75 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.