View Full Version : rollOver image - odd shape but entire square gets detected
Amy_Saunders
08-16-2005, 02:49 AM
Hello. I want to assign a rollover to an oddly shaped item (we will call it a triangle for the sake of this post). The problem is, when I import the triangle from Photoshop (as a png to maintain the transparency), the rollOver command executes for the entire square in which the triangle exists, even though the only visible and important part is in the shape of a triangle within that square.
Does anyone know what I can do to make my rollOver only execute when the mouse is over the non-transparent portion of the image (ie. just the triangle shape)? Note that it is a bitmap when imported into flash and converted to a movie clip, and although that is most likely the issue, I am hoping that someone knows a good way to do what I am trying to do.
Thanks for your help!
stevehapp
08-16-2005, 04:28 AM
simple..
double clik on the button on the stage and you will come to the
button edit window..
in the frames you will have four frames..
click on the first frame and hit key F6 3 times and you will have
4 frames.. off, over, on, hit.. (sic)
click on the object in the hit frame and delete it and draw your triangle in there
.. the hit frame is where the area on which the button may be clicked..
Scottae
08-16-2005, 05:42 AM
There are a few other things that are possible. You could break apart the image (Ctrl + B), then select the lasso tool, click the magic wand tool under the options of the tool bar, click the transparent part of the image, and delete it. That is a rather tidious process, and I wouldn't recommend it. But it's an option.
Another thing you can do is to trace the bitmap Modify > Bitmap > Trace Bitmap.... Check out this thread on the subject. This will vectorize the image, but this is not recommended if your image is highly detailed. This can also be a somewhat tidious process if you have many images to perform this on.
The method that stevehapp suggested is a good quick way of dealing with it. There is also the hitArea (http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary533.html) property if you want to go the movieclip/button route....which is what I prefer.....using movieclips as buttons that is. I rarely need to use hitArea. I think the best way is to draw the stuff in Flash.....well, if it is something as simple as a triangle I would.
vBulletin v3.5, Copyright ©2000-2010, Jelsoft Enterprises Ltd.