[HTML5] MovieClip from SWF can't be mirrored


#1

Hi,
I managed to get more than I expected from SWF (animations too!), but now I have a problem with a MovieClip: I extracted it from the SWF, and if I mirror it by setting scaleX *= -1 (or width *= -1) it disappears. If I repeat the operation it reappears.

I suspect this problem is somehow linked to the problem I found months ago

Any workaround?
Thanks


#2

I just tried modifying the “NyanCat” sample, and flipping the object works:

var cat = Assets.getMovieClip ("library:NyanCatAnimation");
addChild (cat);
cat.scaleX = -1;
cat.x += cat.width;

Let me know if there’s a test case that does fail, thank you :slight_smile:


#3

I isolated the exact same item in a new project, and it works… this is a mistery… :face_with_raised_eyebrow:


#4

@GiG do you remember how you solved this problem? i have quite the same behavior with a simple image loader. it disappears in HTML5 if i set scaleX = -1 just in my application. if i try to isolate it in a new project it works.


#5

Hi Guruas3,
in that occasion I had to rush and I added an alternative gfx for the mirrored version of the item in the SWF, so I didn’t really solved the problem. We should understand why the complete project and the isolated item work differently.
Do you extract the image from a SWF or you get it directly from the loader (or from Assets cache)?


#6

I’m using the simple Loader class to load a JPG image. So nothing to do with the SWF. But it’s really weird bug. Once it’s reproduced in a simple project i think it will be easy to understand where it’s happening in OpenFL.


#7

Or Lime. Please keep me posted. @singmajesty, any clue about this problem?


#8

Are you only having trouble mirroring from SWF assets? Does it work otherwise, or if you apply a flipped matrix after loading the SWF graphic, at runtime?