-
Roll_out glitch?
Hi
I'm making a Flashbanner which shows a movietrailer on rollover. All this works fine, and so does the banner. EXCEPT!
If you roll in and out to quickly, it's like the movie gets confused about which frames it's in, and suddenly it works 'backwards', showing the movie when the mouse is NOT on the banner - obviously to great annoyance for the user.
I tried the 'Mouse_leave'-command but it has a weird effect and either makes the roll_over not function - or has the trailer keep playing.
Code:
stop();
function btnOver(event:MouseEvent):void {
MovieClip(root).main_mc.gotoAndPlay(140)}
function btnOut(event:MouseEvent):void {
MovieClip(root).video_mc.gotoAndPlay(10)}
clicker_mc.addEventListener(MouseEvent.ROLL_OVER, btnOver);
clicker_mc.addEventListener(MouseEvent.ROLL_OUT, btnOut);
clicker_mc.addEventListener(MouseEvent.CLICK,function():void {
navigateToURL(new URLRequest(getClickTag()),"_blank");});
-
lemon juice hurts your eyes
Maybe you could shrink your invisible button, so that a margin of 10px can't be ROLL_OVER'ed.
This way, when ROLL_OUT'ing, you'll always touch the actual swf banner part that's not a button, thus triggering the ROLL_OUT function.
Florian Vanthuyne
WAR AGAINST SOLVED THREADS
mark yours as Resolved under Thread Tools!
-
I'v tried this but only with a 5 px border - it still glitches when I move the cursor too fast.
-
Give this a try:
PHP Code:
stage.addEventListener(MouseEvent.MOUSE_MOVE, btnOver);
stage.addEventListener(MouseEvent.ROLL_OUT, btnOut);
stage.addEventListener(MouseEvent.MOUSE_LEAVE, btnOut);
var mouseInside:Boolean = false;
function btnOver(event:MouseEvent):void {
if(!mouseInside){
mouseInside = true;
MovieClip(root).main_mc.gotoAndPlay(140);
}
}
function btnOut(event:MouseEvent):void {
if(mouseInside){
mouseInside = false;
MovieClip(root).video_mc.gotoAndPlay(10);
}
}
Please use [php] or [code] tags, and mark your threads resolved 8)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|