Asv3's Blog

November 12, 2009

PNG export problem with Flash CS4

Filed under: flash — Tags: , , , , , , , , , , , , , — asv3 @ 1:57 pm

If you are using Flash CS4 to draw transparent graphics and intend to use them in photoshop later, think twice there is a problem here. Some time Flash CS4 adds some black edges similar to matte edges in GIF, even if you select PNG 24-bit with Alpha Channel. This problem got introduced in Flash CS4, hope Adobe fix it soon. any way solution of this issue seems to be simple, but it’s a work around.

First break apart all text in your graphic, remember to break apart text completely you have to break apart twice. try exporting now, most of the cases this should solve your problems, if not then go ahead and break apart symbols in your graphic. exporting now will give to smooth edged PNG. But by breaking symbols to shapes will often you loose shape arrangements, things behind can come forward, or thing front can go backward. To avoid this situation before breaking apart select all elements in your graphics and “Distribute to Layers” Ctrl+Shift+D, should do that, by doing so every shape, element will get a layer for them selves, breaking apart now will not loose arrangements.

November 5, 2009

Issue with HitArea in Canvas hitArea

Filed under: flex — Tags: , , , , , , , , , , — asv3 @ 6:29 am

I happen to generate a graph in Flex, I needed node element to store data, and have some graphics inside that, without second thought I extended Canvas component for GraphNode.

In flex when you use Canvas to draw some thing behind origin or point (0,0)  hitArea of that Canvas happens to behave strangely. I could figure out this problem by giving background colors to this Canvas. You can resolve it in 2 ways,

1. Use a UIComponent for inside a Canvas and set hitArea of that Canvas to it’s child UIComponent

2. Use Container instead of Canvas. If you don’t want given component to respond to updateDisplayList you can safely extend from Container (mx.core.Container)

PS: To have all your graphics behind (0,0) visible, you should have clipContent set to false.

Create a free website or blog at WordPress.com.