PDA

View Full Version : Resizing issues with my custom components.


Arkkimaagi
07-15-2005, 09:47 AM
When I create an basic component (a bar that shows given percentage graphically) and export it to swc, the swc component does not work properly in the editor, it's size is smaller than it should be even if I have not changed any size or scale parameters in my actionscript.

Basicly I have an graphic on the background, an movieclip for the bar and a simple actionscript that moves the movieclip mask according to the percentage.

When I create this, the non-swc component works nicely from library, preview works just fine.

When I export it to swc file and load it to my component library, the component looks like it's scaled 67% of it's original height altho the bounding box is correct size.

When I rotate this swc component in editor, it's width looks like 300% of the proper size, bounding box is still correct.

In the attached image I have three copies of the component.
1. non-swc version that was created, appears in proper size.
2. swc version, should be same size as the 1. it's bounding box is correct size.
3. swc version, same size, I only have rotated the component a bit.

If I preview or publish the flash movie with this component, the graphics look just as they should, the size of the bounding box.

Any suggestions how to fix?

Arkkimaagi
07-20-2005, 11:35 AM
nevermind, this can be deleted now :)

cmbarsotti
08-02-2005, 07:50 PM
Why can this be deleted? Did you figure it out? Can you share a bit with us?

Arkkimaagi
08-24-2005, 08:14 AM
actually, I solved this case differently, but now I found the same problem in another component.

Apparently flash editor does not pass the rotation to the component in any way while in edit mode. And when it passes the new size to the component, it gives the bounding box area, not the size of the component itself.

I've tried everything, localToGlobal functions, _rotation, anything I could come up with, but I have not found out a way to figure the rotation angle of an component while it's still in editor.

It seems that macromedia developers did not find a way either, their list component has same symptoms when rotated. (the graphical area grows larger than the transform bounding box)

If someone has any idea how to avoid this, fix this or get rid of the problem, please help!