TeDD
01-12-2009, 12:13 PM
Okay so I'm new at AS and reading tutorials and stuff and now I've run into a problem and I'm clueless, any help would be greatly appreciated.
It's a preloader, I had it working fine when I used a normal button but now I want to make it a movie clip button with animated rollover/rollout states. Now it's not working so good, well not working at all.
It seems the stop actions are not functioning at all...
here's my code:
PS: Please remember I'm completely new at coding
stop();
playButton_mc.buttonMode = true;
playBtn.addEventListener(MouseEvent.ROLL_OVER, playBtnOver)
playBtn.addEventListener(MouseEvent.ROLL_OUT, playBtnOut)
playBtn.addEventListener(MouseEvent.CLICK, clickFunction);
function onplayBtnOver(e:MouseEvent):void
{
e.currentTarget.gotoAndPlay("over");
function onplayBtnOut(e:MouseEvent):void
{
e.currentTarget.gotoAndPlay("out");
function clickFunction(evt:MouseEvent):void {
gotoAndPlay(30);
}
Heres a picture of what I got dunno if it's going to help.
It's a preloader, I had it working fine when I used a normal button but now I want to make it a movie clip button with animated rollover/rollout states. Now it's not working so good, well not working at all.
It seems the stop actions are not functioning at all...
here's my code:
PS: Please remember I'm completely new at coding
stop();
playButton_mc.buttonMode = true;
playBtn.addEventListener(MouseEvent.ROLL_OVER, playBtnOver)
playBtn.addEventListener(MouseEvent.ROLL_OUT, playBtnOut)
playBtn.addEventListener(MouseEvent.CLICK, clickFunction);
function onplayBtnOver(e:MouseEvent):void
{
e.currentTarget.gotoAndPlay("over");
function onplayBtnOut(e:MouseEvent):void
{
e.currentTarget.gotoAndPlay("out");
function clickFunction(evt:MouseEvent):void {
gotoAndPlay(30);
}
Heres a picture of what I got dunno if it's going to help.