I am making this with FlashCS4 IDE, but I also wanted to use the EMBED metatag from flex to attach XML and some graphics, since it is what I am used to, and also I wanted to skip loading things at runtime. But for some weird reason, it doesn't embed anything....

For my class structure, I have the "Main" document class, which extends MovieClip, and will hold instances of menu, game, e.t.c as needed. Then I have the "Game" class, which is a sprite, and is supposed to act as a container for my levels and stuff and hold persistent data like score and health across levels. Then is the problem class "XmlParser", Which I thought of making static....but that shouldn't affect anything, right?

If I put my embed code, whether it be an XML or png, it seems to work if I put it directly in the Main class, but if I put the same code inside "Game" or "XmlParser", the embeds don't work at all...... any ideas?

[Embed(source = '../lib/testXML.xml', mimeType = "application/octet-stream")] var blueMage_XML:Class;
[Embed(source = '../lib/bluesprite.png')] var blueMage_SPR:Class;
var ba:ByteArray = new blueMage_XML() as ByteArray;
var xml:XML = new XML(ba.readUTFBytes(ba.length));			
trace(" XML: " + xml); //This traces XML: , then blank...

PS: I am using FlexSDK4 and I have set up the path in cs4 as3 settings.