actionscript 3 - AS3 MovieClip(root).gotoAndStop() Not Working Properly -


i have section of code check if player has collected coins, , if have, wish move game's end screen. issue stays on game screen! know conditional statement correct because i've used trace statement check it. piece of code in question is:

if (numcoins - coinscollected == 0) {     movieclip(root).gotoandstop("gameoverscreen"); } 

just more information; have game start screen, game screen (empty symbol uses class linkage gameplay) , game on screen on 3 separate frames. have idea why isn't working?

does have idea why isn't working?

if say, gotoandstop("gameoverscreen"); doesn't give result, , if work in main class, 'root' same 'this'. means 1 thing, missed reference on movieclip 'gameoverscreen' frame.

and check numcoins - coinscollected <= 0 more secure.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -