Haydn, It seems that your code attaches the 'game' under the same instance name.... You should test the presence of a previous game and remove it before attaching a new one:
if (_root.game != undefined) { _root.game.removeMovieClip(); } _root.attachMovie("gameMC", "game", depth); Also, it's possible to have several mc with the same name, but you will only be able to control the first you've created... I guess the for..loop spits duplicate movieclip names because the internal mc "key" isn't its name. 2006/12/18, Haydn Ewers <[EMAIL PROTECTED]>:
Hey all, I'm working on a game in Flash 8 using AS2. After the game plays through twice it appears to attach multiple copies of the 'game' MovieClip. (The 'game' MovieClip contains the actual gameplay and is shown after the user makes a selection in the menu.) If I run this code after the problem starts to occur: for (var i:String in _root) trace(_root[i]+"\t"+(typeof _root[i])); I get this output: MAC 8,0,22,0 string _level0.game movieclip _level0.game movieclip _level0.game movieclip This doesn't make sense to me. How can there be multiple MovieClips with the same name? Does anyone know what could be causing this kind of behaviour? Thanks, Haydn. _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
-- Julien Vignali _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com