PDA

View Full Version : Help making (PNG) Images Into Buttons.


sliilvia
09-23-2008, 08:03 PM
Hi all, I am very new to using flash and I'd like to use some icons (PNG) I have to insert into my flash in the form of buttons.

Could anyone point me in the direction of an understandable tutorial or perhaps give me some help?

I've imported the graphic and then converted into a button, I have then assigned the over/hit etc properties and then i go to add the actual actionscript and it tells me 'actionscript cannot be added to this'.

I know I am abviously missing something so any advice would be appreciated.

Many thanks

Sliilvia

sliilvia
09-23-2008, 08:11 PM
Hi all, I am very new to using flash and I'd like to use some icons (PNG) I have to insert into my flash in the form of buttons.

Could anyone point me in the direction of an understandable tutorial or perhaps give me some help?

I've imported the graphic and then converted into a button, I have then assigned the over/hit etc properties and then i go to add the actual actionscript and it tells me 'actionscript cannot be added to this'.

I know I am abviously missing something so any advice would be appreciated.

Many thanks

Sliilvia

raydowe
09-23-2008, 08:21 PM
Check out this one

http://www.flashandmath.com/basic/buttons0/index.html

It doesn't use png images, but you could easily replace the draw componenets/text and drop in an image. It uses good practices with where to place your actionscript as well

sliilvia
09-23-2008, 08:25 PM
Thats really helpful, hopefully I can get them to work ..

many thanks

aamenabar
09-24-2008, 06:41 AM
Flash doesn't let you type code in a button because Flash CS3 by default creates an ActionScript 3.0 movie, go to the propeties of your movie and change the ActionScript version to 2.0
That should let you put actions in a button

CyanBlue
09-24-2008, 04:16 PM
Please keep your questions to one thread... Crossposts merged...

raydowe
09-24-2008, 04:20 PM
That may be true, but putting actionscript on buttons is a messy way of coding. It's much better to have a dedicated layer on the root timeline where all your code is placed together.

aamenabar
09-24-2008, 11:48 PM
@raydowe
I totally agree with you. I can't remember anymore how to write code in a button...
writing in one frame the whole thing is waaaay cleaner and easier to mantain... but for beginners it makes more sense typing the code in the button, that way you don't even have to bother with scope...