Personally I wouldnt do it as an onClipEvent.
the var day Im guessing is on the main timeline
I would do:
This way the statement is checked at the frame rate if you dont need it checked as frequentlyCode:MC.onEnterFrame = function (){ if (day < 15) { MC.gotoAndStop(1); } else if (day >= 15) { MC.gotoAndStop(2); } }
Ie, the time of day only progresses from a proceeding function you can set it as its one function to only check when you add 1 to day.
Hope some of this helps you outCode:function dayCheck(){ if (day < 15) { MC.gotoAndStop(1); } else if (day >= 15) { MC.gotoAndStop(2); } } //Then add the the function to the process dayCheck(); //if doing this method you will need to place it at the top for your actions frame to check when the frame loads for the first time.![]()





Reply With Quote