Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

SWFLoader with a transparent swf file

Guest
Jul 19, 2011 Jul 19, 2011

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!

TOPICS
ActionScript
1.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 19, 2011 Jul 19, 2011
LATEST

Found the solution:

swfLoader.setStyle("bgAlpha", "0.0");

Not sure why it's "bgAlpha" and not "backgroundAlpha" but I found it!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines