SWF MovieClip children lost properties

Hi,
I am using SWF to get a complex MovieClip from the original Flash project to a new HTML5 one: I am importing a big MovieClip made of a lot of smaller MovieClips placed on stage to form a complicated web of pipes.
I used a set of gfx elements that I scaled, rotated and placed on stage.

Now I need to get the small MovieClips properties (scaleX/Y and rotation) and apply them to some kind of clones, but I noticed that in Flash interface negative scale values are converted to skew properties, replacing rotation value too, so when I get scaleX/Y and rotation values from code I am not actually getting the real values because skewX/Y properties do not exist! How can I get the real properties?

Thanks

I suspect this is how the SWF is generated by Flash Professional / Animate, there isn’t much that can be done, except that it might be possible to do some math on the .matrix to detect the scaleX and scaleY

I wonder how… this is a big problem.

This may help?

https://github.com/openfl/openfl/blob/develop/openfl/display/DisplayObject.hx#L1089-L1109

That’s logic we use, you could use something similar to derive the values you might be expecting from the object matrix

1 Like

I will give it a try if I will find another similar situation, for now I have bypassed the problem by duplicating the mirrored movieclip: I created a new movieclip in the library and replaced the bitmap with a mirrored one… it was not the best way to do it, but the bitmap is small and I had to complete the work fast :expressionless:

Thank you Joshua, I have never considered using __transform matrix directly to get parameters myself.

We made changes to we keep track of scaleX and scaleY, which now may have helped with your original issue :slight_smile:

1 Like

Thank you Joshua! I will benefit from these changes once I will upgrade to the new versions.