Advanced Rollovers

Hi all!

Following the tutoirial below

http://www.kirupa.com/developer/flash5/advroll.htm

I have managed to create a button which works with simple rollover and rollout action. But if I would like this button to change a colour and remain that colour once pressed. Is this possible and if so any ideas?

:sigh:

there’s no need to use tell target. Just paste the following code into the object actions of the movie clip. This is for flash 5. I don’t know about mx. Change 336699 to the hexadecimal code of your colour. If you want to make the transition animated then use gotoAndPlay(“whatever”) instead of changing colour, i hope that worked because it’s working fine for me.

onClipEvent(load){
rolledover=false
}

onClipEvent(mouseMove){

if (hitTest(_root._xmouse, _root._ymouse, false) and(!rolledover)) {
colour = new Color(this);
colour.setRGB(0x336699);

}

}

Sorry not getting this at all (I’m a bit slow), do you have a .Fla file i could look at?

… ? :stuck_out_tongue:

kax, that’s an mx file posted in the flash 5 section???
here’s the f5 fla,

and paz, why have you posted this in the AS and Flash 5 sections??

Attached is my file, i would like the button to fading in and out like they do with the file attached, but once pressed to reamin a different color.

oops… :stuck_out_tongue:

i thot the button should stay in that colour even after taking the mouse off it.

press the stupid buttons… :sigh:

My file works very differently to that. When mouse is over the box the corner of the page turns over. When removed it turns back.

But say if i wanted to make the corner stay turned up once pressed or the box change a totally different colour when pressed, how can i add to the .fla to make this work?

like this?

Wow, yes that’s it, but how does that work?

Is there tutorial about the script this uses so i can understand this procedure?