Is a vector star or a pixel image? I assume you want the mouse events to work only within the boundaries of the star. It's a non-issue when using a vector-based non-rectangular shape. You can draw the star in Director using its vector drawing tools, but I would suggest Illustrator 10 to create as fancy a star as you want (even with a soft-edged drop shadow), then export it as a SWF file. It works very, very, very well. Try it.

Pixel images always exist as a rectangle, but it's not hard to limit the mouse events to the star part. With a white, black, or web-legal background color, the "matte" ink mode is the simplest way to go. The downside is that you often get a jagged fringe around the shape from the limited masking ability of that ink mode. You can also use an alpha channel to mask the shape you want with smooth edges and no fringe, but 32-bit images can be RAM and performance expensive. For best appearance of a pixel-based star, I would suggest an 8-bit GIF star image and an 8-bit grayscale mask in the very next slot of the cast after the star (then set the star's ink mode to "mask"). Half the memory of a 32-bit image, same result.

Bottom line: the part that's invisible to the eye is also invisible to mouse events.

Ron Woodland


On Tuesday, September 2, 2003, at 02:37 PM, Jeremy P. McKay wrote:


Hi All,

I want to use a star shape for mouse events?  Is there any way to do
this other than using a bunch of squares and rectangles?

-
Jeremy

[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]


[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]

Reply via email to