1
votes

I'm writing an android app in flex as I need to display swf animations.

These swf files are larger than the mobile screen - they're advertisements used elsewhere.

I don't seem to be able to resize the loaded swf file. I've set height and width on the container, the loader everywhere I can think of and nothing changes the size of the swf.

It's frustrating, the swf is of a set size as they display full screen when used as advertisements, I just want to show a small preview within the app of what they will look like.

I'm beginning to think that it cannot be done? or am I missing something

I've seen similar questions asked here, but no answer that works for me.

1

1 Answers

0
votes

There is only one stage, and the loaded swf probably resizes itself according to the stage dimensions, so it ignores the properties of the loader.

If you can modify the code of the loaded swf, you can:

  • either add it a method like setSize(width, height), and invoke it from the main swf:

    yourSWFLoader.content.setSize(width, height);

  • or access to the loader dimensions from the loaded swf, using something like:

    width = parent.parent.width; height = parent.parent.height;

The second solution assumes the SWF is loaded from a trusted domain.