PDA

View Full Version : Creating the Hit frame for a button


dpru
01-19-2007, 09:45 PM
I have an image of the country Albania in my flash application that I converted to a button symbol.

I read somewhere that Flash only uses the actual artwork in images as the "clickable" area for a button, and not the empty whitespace. Does it automatically try and do that for you when you convert an image to a button symbol?

I just checked out my button symbol, and I am not sure if the "Hit" frame, which I have been told is the frame that holds the design of the clickable area in the image, contains it. How would I create the clickable-area myself?

illini_trucker
01-20-2007, 08:15 AM
ahh, you must have the file saved as a jpeg or BMP.... if u use PNG format (Macromedia Fireworks) yes, you are correct.. for example

if u have a green circle drawn and in JPEG format, the "clickable" area will be square... the green circle plus the white around it..

if in PNG format, and the circle is cropped, it will import only the circle and not the white area

instead of going thru the hocus-pocus of the hit-frmae.. just use actionscript.. for simple buttons, its easy

convert image to button

type this actionscript in...
on (release) {gotoAndStop (X)}

where X is the frame number of your image

hope that helped!