duplicates still hanging around in different scene.. eh?!

  • Russkie
  • Newbie
  • Newbie
  • Russkie
  • Posts: 9

Post 3+ Months Ago

ok so... 2 problems pretty please some help in...

ive got a bingo game i made here, and when my wonderful wheel spins it creates duplicates that goto different frames when loaded to match the new random number.... here the duplication code :

Code: [ Select ]
if (_root.x <= 8) {
    _root.figure_0.duplicateMovieClip("figure" + _root.x, _root.x, {_x:(310+(27*_root.x)), _y:(143)});
    _root.x++;
}
  1. if (_root.x <= 8) {
  2.     _root.figure_0.duplicateMovieClip("figure" + _root.x, _root.x, {_x:(310+(27*_root.x)), _y:(143)});
  3.     _root.x++;
  4. }


major junky problem tho, when the player wins and i take em to the winner scene, guess who still sticks around when everything dissappears.... the bloody duplicates, what on earth?

so i think ya know, maybe ill make a loop that deletes these bas&^#ds..
but how? here the other question... see the new instance names of these duplicates is figure1, figure2, blah blah blah, but, to creat a loop to kill them, it wouldnt work to type something like
Code: [ Select ]
_root.figure + x.(whatever i want done to em)


or
Code: [ Select ]
_root."figure" + x.(....)


so how would i be able to delete these duplicates in both situations, when i swich scene i just want them to go away, and when i simply dont want them there in the current scene how can i make a loop and not have to list all 130 different figure "x" commdands to delete them...?

please help me out, this major buggout for me thanks!![/code]
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

Levels are seperate from the timelnie, which is why the duplicates still exist, because you duplicate them to levels.

Run a loop through all possible duplicates and use removeMovieClip on them instead of duplicateMovieClip.

Something like
Code: [ Select ]
for (var i =0; i<10; i++){
  _root["figure"+i].removeMovieClip();
}
  1. for (var i =0; i<10; i++){
  2.   _root["figure"+i].removeMovieClip();
  3. }
  • Russkie
  • Newbie
  • Newbie
  • Russkie
  • Posts: 9

Post 3+ Months Ago

oh hey thanks alot man, broke my forum virginity :P
first time im goin to one and first time got help from em...
  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

Was it as good for you as it was for me?
  • Russkie
  • Newbie
  • Newbie
  • Russkie
  • Posts: 9

Post 3+ Months Ago

it was flashtastic

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 25 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
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.