Tuesday, December 6, 2011

Rollover Buttons

Cant't believe I'm asking this question! I have taken a
picture of my workspace. The idea was that when I hover the
keyboard for example it would display a message on the screen and
when over the speaker and so on..... To do this, I took a picture
of the image and drew a square over certain areas, made this a
button and changed the alpha to zero. I thenj added the text on the
over section. For some reason this will not work. I looked into
another way of trying it, where I put the text on a seperate frame
and added the following code so that when it rolled over it would
go to that frame and when rolled out it would go back



on (rollOver) {



gotoAndPlay(3);



}



on (rollOut) {



gotoAndPlay(1);



}



Can someone please tell me should these work, and if not,
why, because I can't see anything wrong with either method?Rollover Buttons
Method 1 doesn't work because you made the button alpha 0,
also making the text invisible! haha



Instead of making the alpha 0 you should have the button UP
state empty and put in a HIT area for the button.



For method 2 try

on(rollOver){

_level0.gotoAndPlay(1);

)



or gotoAndStop instead of play. Not sure without seeing a
sample.Rollover Buttons
Cherrs mate, worked a treat, there's me thinking I was
starting to get used to this Flash craic

No comments:

Post a Comment