Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

can't stop ENTER FRAME event

10:50 pm on Mar 19, 2012 (gmt 0)

New User

joined:Feb 29, 2012
posts: 2
votes: 0

I am making a small game.
at level 2 the player will click on objects before the time expires.

when the time expires, I am moving the main timeline to a frame where there is the game over animation.

My problem is that after the game over page is displayed, the loop(enterframe) function is still being called.

I don't understand how the function is being called, since the main timeline moved to the next frame?
any suggestion?
here's the code:

var obj:MovieClip=this.parent as MovieClip;

key_mc.addEventListener(Event.ENTER_FRAME, level3loop);

function level3loop (e:Event)
if(counter == 24)
counter = 0;
if(time == 0)
trace("levle 3 loop playing");
level3TimerTextBox.text = "Time Left: " + time + "sec";

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members