How to make a movie clip invisible depending on a value in another layer?
I am trying to make an "achievements" page for my game, where if the user has a high score greater than 100, then the achievement can be unlocked. I tried using a code like this, but it didn't seem to work!
function Check();
if(endscreen_mc.highscore_txt > 100)
{
medals.roachLock.visible = false;
}
else if(endscreen_mc.highscore_txt < 100)
{
medals.roachLock.visible = true;
}
else if(endscreen_mc.visible == 100)
{
medals.roachLock.visible = true;
}
The high score value is saved inside a shared object. What's wrong with my code, and what can I do to fix it?
