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

Embedding SWF Not Working Right? (FB 4.7 issue?)

New Here ,
Jan 29, 2013 Jan 29, 2013

Copy link to clipboard

Copied

Hey guys, I recently downloaded FB 4.7 and noticed something changed when compiling and running my project.

I have the following code in one of my classes.  It simply embeds a symbol from a SWF and adds it to the stage as a MovieClip:

[Embed(source="/../lib/swfs/splash_screens.swf", symbol="Splash1")]

private static const Splash1:Class;

...

_splash1 = new Splash1();

addChild(_Splash1);

_splash1.play();

Now, in this MovieClip in the FLA there are two layers, one layer is a bunch of vector animation and the second layer is the background (as an imported Bitmap) - no animation.

The problem is that second layer with the background doesn't show up in my project after I've embedded and added the MovieClip to the stage, it's as if the MovieClip has a transparent background with just the first layer with all of the vector animation showing up.

Things I've tried/noted:

  1. The background layer is not a guide and is visible if I play the raw SWF to just see what it looks like
  2. If I add other layers and just draw nonsense on them, etc - they do show up
  3. If I trace the background Bitmap (turns it into vector art) it will show up
  4. If I convert the background Bitmap to a Graphic or MovieClip and then put it on the stage, it still doesn't show up
  5. It seems FB 4.7 is grabbing the correct symbol from the library, it's just not grabbing the background (which is also in the library, as an imported Bitmap) which I feel it should, since it's included in the MovieClip symbol

Now I understand there are workarounds that I can always use as a last resort (embedding the background JPG and adding it to the stage as a Bitmap separately at runtime), but I'd prefer to have this working correctly so if things change visually in the future, it's less work for me.

I'm pretty sure when I originally coded this when using FB 4.6 I did not have this issue (and since then nothing has changed at all, not the code or the SWF file).  This is why I'm led to believe it's either a FB 4.7 issue or maybe there's something extra I need to do to the FLA before exporting the SWF file.

Any help appreciated!

Views

1.8K

Translate

Translate

Report

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
Enthusiast ,
Jan 30, 2013 Jan 30, 2013

Copy link to clipboard

Copied

First things first, to eliminate the silly stuff, you have a typo in the code you have there which would break things - addChild(_Splash1); should be addChild(_splash1); (capital S). Is this a copy error or is it in your actual code?

G



Votes

Translate

Translate

Report

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
New Here ,
Jan 30, 2013 Jan 30, 2013

Copy link to clipboard

Copied

Haha, yeah, that's just a copying error, I actually changed the variable names here just so they are clearer and make more sense out of context from what I'm actually using.

Votes

Translate

Translate

Report

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
New Here ,
Feb 14, 2013 Feb 14, 2013

Copy link to clipboard

Copied

Anyone have any insights?  It's been over two weeks and I haven't found a solution.  Seems like a FB 4.7 bug.

Votes

Translate

Translate

Report

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
New Here ,
Feb 22, 2013 Feb 22, 2013

Copy link to clipboard

Copied

One more bump, I'd really like to get this solved by the end of this weekend and I'm out of ideas before just doing it the hard way.

Votes

Translate

Translate

Report

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
New Here ,
Apr 03, 2013 Apr 03, 2013

Copy link to clipboard

Copied

LATEST

I had this problem yesterday and I spent about 2 hours to find out. It's another bug of Flash Builder 4.7, it seems:

Bitmaps need an alpha channel! I found out, because all bitmaps with alpha were showing right and just the background was invisible (but it was there, the size of the containing movie clip was correct). So I cleared a little part of the background with the "rubber" and then it worked...

Votes

Translate

Translate

Report

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