Whilst getting the music to work, and note overlap itself once the user goes back to the menu, I discovered a glitch.
The timer which I have put in place goes faster the more times you visit the menu. The reason for this is that the fl_SecondsElapsed++; is called once again.
To fix this issue, I created a boolean and inserted the Timer and EventListener inside it's if(statement)
I used the following code:
| if (!timerSet) { var fl_TimerInstance:Timer=new Timer(1000,3000); fl_TimerInstance.addEventListener(TimerEvent.TIMER, fl_TimerHandler); timerSet=true; } |
With this, the timer would now only be called once if it's on false. After the timer is called the boolean is set to true and now it will no longer recall the timer.

No comments:
Post a Comment
Note: only a member of this blog may post a comment.