I've been trying to learn AS2 for the past week along with Flash. But I've come to this road block which frustrates me to no end. So I was hoping some of you might know Actionscript or just smart enough to help me out.
Here's what I have
- A button (as a movie clip, instance name "btn") on the first frame
- The same button (also movie clip) but with glow effect on frame 10
- An actionscript layer with key frames on 1 and 10
Here's my code on the action layer (frame 1)
Code:
stop();
function gotoOver()
{
this.gotoAndStop(10);
}
function gotoOut()
{
this.gotoAndStop(1);
}
I'm trying to make the button glow whenever a mouse is over it. But when I compile and export the swf it just refuses to do the glowing part. When I hover my mouse over the button the cursor turns into a hand but it doesn't glow.
Yes I know I could have used a button instance but I'm trying to learn event handlers here.
Can you help?
edit: I just tested it again by throwing in a this._alpha = 50 along with the onRollOver handler and it seems to work, it's just the gotoAndStop at frame commands that don't work. I also tried referring to the frames using label names and it still won't work.