views:

16

answers:

2

Okay, I have absolutely NO Compiler/Output errors anymore...however, the buttons are still not working? Any suggestions?

Replay_btn.addEventListener(MouseEvent.CLICK; replay);
function replay(event:MouseEvent):void{
gotoAndPlay(25);
}

WHAT THE HELL IS WRONG!!! PLEASE LET ME KNOW!!!

A: 
Replay_btn.addEventListener(MouseEvent.CLICK; replay);

should not have a semicolon in there but a comma:

Replay_btn.addEventListener(MouseEvent.CLICK, replay);
frankhermes
And if I wrote that down from memory incorrectly and it actually has a comma...what then?
add a trace("BUTTON CLICKED") statement in the replay function. So you can see if it gets called after clicking. If so, then the error is in the gotoAndPlay(25) part
frankhermes
So, I added the line within the function brackets:`trace("BUTTON CLICKED");NOTHING
A: 

SOLVED!
The Problem lied within the layers.

The Parent clip had 4 layers(bottom up); Background, Water Movement Background, MovieClip-Overview, Water Movement Foreground.

I removed the Top Layer: Water Movement Foreground and tested...It worked...however, when I added the same movie clip of Water Movement Foreground to show OVER the rest of the movie clip (overview).

However, when I moved the Button: Replay_btn and Inside_btn, above all except the Actionscript frame layer...it worked!

So, if your buttons are not working, but you have no Compiler or Output errors, ensure that there are no other Frame Layers ABOVE your button set.

There are properties within all DisplayObject derived object that allow you to specify whether you will be able to 'click-through' the object.For example, if you have a button called 'myBtn' and a MovieClip above it called 'mySkyMC', you can call mySkyMC.mouseEnabled = false;mySkyMC.mouseChildren = false;Your mouse events will now reach the 'myBtn' object underneath 'mySkyMC'
turkeyburger
Good to know...I really appreciate all the help...and turkey...great tip.