using addEventListener for Enter and Exit frame
hi , sometimes i want to set some function in specific frame in start and exit this frame
for example i have Flv player in frame 20 , i have background sound ( mp3 player ) so i want when swf goes to this frame my sound goes Off and when Exit from it and go to another frames the sound played again ...
i put these script in frame 20 :
addEventListener(Event.ENTER_FRAME,enterfunc);
function enterfunc(e:Event):void {
trace("I started");
}
addEventListener(Event.EXIT_FRAME,exitfunc);
function exitfunc(e:Event):void {
trace("will Exit");
}
but after test movie i see I started and will Exit runs Repeatly without stoping !!
Notice : first i put my sndChannel = soundClip.play; and sndChannel = soundClip.stop; but my music runs over and over and finally my system Hanged and need to Restart so i use trace to see
so whats a problem ? thanks for spending time and help me
