CodeVerge.Net Beta


   Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums



Zone: > NEWSGROUP > Adobe-Macromedia Forums > macromedia.flash Tags:
Item Type: Date Entered: 3/28/2008 7:20:10 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 2 Views: 107 Favorited: 0 Favorite
Can Reply:  Yes Members Can Edit: No Online: Yes
3 Items, 1 Pages |< << Go >> >|
"PLauchman" <we
NewsGroup User
FLASH Symbol's Bounding Irregular Polygons3/28/2008 7:20:10 AM
Reply

0

I'm working on a Flash CS3 map containing a lot of irregular polygons. Each
polygon is a "button."

The original graphics were imported from Photoshop. Each layer contained a
polygon defining a country. Each polygon was saved as graphic symbol, the
graphic symbol was included in a movie clip. Each country in an individual MC.
The over and out state is defined in a simple function in the main stage
actions. That all works just fine.

I believe I'm hitting a wall though where the bounding rectangle defining each
symbol overlaps. Depending on the layer order in the original SWF, sometimes
hovering over one polygon selects another.

I can solve some of the issues by re-ordering the layers, but this won't fix
all of them by any means, and this is just a band-aid anyway. I need a more
robust solution.

Is there a setting in Flash CS that specifies Flash is to use the actual shape
of a polygon rather than a least-fit rectangle? I understand that I could use
Flash Buttons and manually draw a hit area for each country, but this will be a
long, error-prone process. It too will yield results that are only "close."

Flash has the polygon -- can't the edges of that polygon be used as a hit area?

If it's not obvious, I'm new to CS. One of my difficulties is determining what
Flash calls this least-fit bounding rectangle -- important to have a proper
keyword for any search engine.

Any advice would be appreciated!

TIA --


"rritchey" <web
NewsGroup User
Re: FLASH Symbol's Bounding Irregular Polygons3/28/2008 11:53:43 AM
Reply

0

When you say "imported from Photoshop" do you mean you saved them out as images
and then imported them? Or did you import a .psd directly into Flash?

It sounds like you are using images, in which case Flash recognizes the
rectangle bounding box as the entire hit area (because images can only be
rectangular). Transparent PNG's shouldn't have this problem in Flash, but it
might be a bug. Regardless, if you import a layered PSD directly into Flash,
you can tell it to import shape layers in the psd as editable paths.

Another solution is to try to create the hit areas in Flash with what you
currently have, and use the Modify/Bitmap/Trace Bitmap command. Set the Color
threshold and Minimum area both to "1" Set the Curve fit to "Pixels" and the
Corner threshold to "Many corners" This will reproduce your image in vectors
extremely accurately. If you are using singly colored polygons, then this
should not be a problem at all. Once you have the essential polygonal shape as
a vector, you can make it all 1 color, and then make it an invisible hit area.

"PLauchman" <we
NewsGroup User
Re: FLASH Symbol's Bounding Irregular Polygons3/28/2008 1:36:30 PM
Reply

0

A thousand thanks, RRitchie. The Modify > Bitmap > Trace Bitmap trick worked beautifully.

I sincerely appreciate you taking the time to respond.

Best,
Paul
3 Items, 1 Pages |< << Go >> >|



Free Download:






   
  Privacy | Contact Us
All Times Are GMT