SWFLoader with a transparent swf file

Copy link to clipboard
Copied
Hello:
I am loading an embeded swf file with SWFLoader using actionscript 3 in Flash Builder 4.5. When I load this swf and set "wmode" to "transparent" in HTML, it works as expected and you can see the background color through the swf object in HTML.
However, when I load the swf in Air with the following code:
[Embed(source="swf/data.swf")] var data:Class;
swfLoader = new SWFLoader();
swfLoader.percentWidth = 100;
swfLoader.percentHeight = 100;
swfLoader.source = new data();
addElement(swfLoader);
It always has a white background.
What can I do to make the background transparent?
Note: This is for a mobile android device.
Thanks!

Copy link to clipboard
Copied
Found the solution:
swfLoader.setStyle("bgAlpha", "0.0");
Not sure why it's "bgAlpha" and not "backgroundAlpha" but I found it!

