Skip navigation
Currently Being Moderated

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

Jan 29, 2013 2:24 PM

Tags: #flash_builder #4.7

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();



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!

  • Currently Being Moderated
    Jan 30, 2013 2:09 AM   in reply to ForTheLoss

    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?


    Mark as:
  • Currently Being Moderated
    Apr 3, 2013 1:11 AM   in reply to ForTheLoss

    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...

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points