ori_ori
01-21-2009, 08:48 AM
Hello!
I hope you can help me with this.. I created a movieclip that has 2 keyframes that loop so that it creates a somewhat "flickering" (on/off) effect. [keyframe 1 = on/ keyframe 2 = off]
Now what I wanted to do was for the flickering effect to:
1) stop at frame 1 when I rollover the mouse on it.
2) resume playing after I rollout the mouse on it.
I tried writing "gotoAndStop(1)" but it still continued flickering.
__________________________________________________ _________
here's how my code looks so far:
mc_HERE.addEventListener(MouseEvent.ROLL_OVER, rollOver);
mc_HERE.addEventListener(MouseEvent.ROLL_OUT, rollOut);
function rollOver(e:MouseEvent):void{
gotoAndStop(1);
};
function rollOut(e:MouseEvent):void{
gotoAndPlay(1);
}
__________________________________________________ __________
Now the problem was:
1) when I rollover, it doesn't seem to stop at the said frame. (it continues "flickering")
2) when I rollout, sometimes it disappears (I guess it activated and stayed at keyframe 2) and won't continue flickering anymore until I rollover on it again.
This is so weird. Can you please tell me what's wrong with my code?:confused:
Thanks in advance guys for your help!
** ori_ori **
I hope you can help me with this.. I created a movieclip that has 2 keyframes that loop so that it creates a somewhat "flickering" (on/off) effect. [keyframe 1 = on/ keyframe 2 = off]
Now what I wanted to do was for the flickering effect to:
1) stop at frame 1 when I rollover the mouse on it.
2) resume playing after I rollout the mouse on it.
I tried writing "gotoAndStop(1)" but it still continued flickering.
__________________________________________________ _________
here's how my code looks so far:
mc_HERE.addEventListener(MouseEvent.ROLL_OVER, rollOver);
mc_HERE.addEventListener(MouseEvent.ROLL_OUT, rollOut);
function rollOver(e:MouseEvent):void{
gotoAndStop(1);
};
function rollOut(e:MouseEvent):void{
gotoAndPlay(1);
}
__________________________________________________ __________
Now the problem was:
1) when I rollover, it doesn't seem to stop at the said frame. (it continues "flickering")
2) when I rollout, sometimes it disappears (I guess it activated and stayed at keyframe 2) and won't continue flickering anymore until I rollover on it again.
This is so weird. Can you please tell me what's wrong with my code?:confused:
Thanks in advance guys for your help!
** ori_ori **