FORUMS: list search recent posts

Working with over, out, and click commands

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Jacob Highland
Working with over, out, and click commands
on Jan 13, 2012 at 8:49:27 pm

Hello All,

I am VERY new to Flash, so I'm sure my question has been asked elsewhere, but I can't seem to find exactly what I need anywhere. I do apologize if this is a repeat of something.

I'm building a website for my mom, and I'm trying to keep things as simple as possible, but it has recently gotten me into trouble. I have a button I have tried to animate, and the over, out , and click functions work separately perfectly. The problem is that once I click the button and the animation plays, if I roll over or roll out of the button, the animation reverts back to animation coded below. All I need to know is how to remove the actions of the over and out commands once the button is clicked.

I hope this is not too much to ask, and I have attached the code I have written so far and an image of the button file with all of the labels being called.

thanks for taking the time to look this over and hopefully someone can help me!


import flash.events.Event;
import flash.events.MouseEvent;

stop();

NewsBtn_Parent.buttonMode = true;
NewsBtn_Parent.mouseChildren = false;
NewsBtn_Parent.addEventListener(MouseEvent.MOUSE_OVER,NewsBtnOver);
NewsBtn_Parent.addEventListener(MouseEvent.MOUSE_OUT,NewsBtnOut);
NewsBtn_Parent.addEventListener(MouseEvent.CLICK,NewsBtnClick);

function NewsBtnOver (e:MouseEvent):void {
e.target.gotoAndPlay("over");
}


function NewsBtnOut (e:MouseEvent):void {
e.target.gotoAndPlay("out");
}

function NewsBtnClick (e:MouseEvent):void {
e.target.gotoAndPlay("click");
}




Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]