PDA

View Full Version : changing button icons


benito
02-26-2005, 08:04 PM
Hi there,

I am creating an MP3 player, with just 1 button for Play and Pause i.e. pressing Play turns the button into a Pause button and vice versa.

But I can't seem to get the icons to swop each time :(

The icon pictures are in the library and have linkage names. The button is an instance of a (button) symbol called "Play", and its onRelease() method is described in a seperate class. Adding:

this.setStyle("icon","pauseIcon");

to the onRelease() method does not do anything.


Any ideas?

Muchos appriciatos mi amigos

Benito

Flash Gordon
02-27-2005, 06:31 PM
You could make your "button" a MovieCLip. When it is press, it would go to the pause frame and visa versa.

benito
02-27-2005, 07:41 PM
Thanks for that Flash - I've been banging my head on this table for a long time now and its starting to hurt.

doing it as a movie clip makes sense.

How do you make a movie clip change frame?

Cheers,
ben

Flash Gordon
02-27-2005, 07:43 PM
gotoAndPlay(frame) or gotoAndStop(frame)
I strongly suggest you take some tutorails on Flash, Im not great but the gotoAndPlay is the most basic thing you can do.
Good luck

benito
03-01-2005, 11:10 PM
ok thanks - will do