Home     |     Photoshop    |     Flash General    |     Flash Actionscript    |     Dreamweaver    |     Macromedia Fireworks


Cervo Technologies
The Right Source to Outsource

Macromedia Flash Actionscript

Roll over button that shows a differnt layer


My problem seems like it has a simple solution, but I have yet to get it. I'm
in Flash CS3 - and a novice at it. I've gone thru the lynda training + books. I
am trying to have my buttons on roll over show an object on an other frame, and
roll out go back to the first frame. Everyone seems to have a different way of
doing a roll over, but I can't get mine to work. This is what I have -

 mybtn.onRollOver = function()
 {
        mybtn.gotoAndStop(40);
 }

 mybtn.onRollOut = function()
 {
        mybtn.gotoAndStop(1);
 }

 I know I'm missing something, because I get errors and of course it doesn't
work, the whole thing just plays all the frames.
 If someone could give me so good script and some good advice that would be
great.

you're using as2 coding and you probably have your publish settings set for as3.

-----------------------------------------------Reply-----------------------------------------------
Thanks, the coding works without errors now, but my frame does not show...

-----------------------------------------------Reply-----------------------------------------------
instead of using mybtn.goto in your handlers use this.goto.

-----------------------------------------------Reply-----------------------------------------------
still doesn't work

-----------------------------------------------Reply-----------------------------------------------
post your code using the attach code option.
Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc