This content has been marked as final. Show 3 replies
I was able to do this, but I was using pure as3 code, not flex. Still I realized some things:
1.- Not all the animations are embedable, it seem that in some cases you might get a compiler error when embeding, I guess this is a bug from the Flash 9 Alpha. In my case if I made a button, witch has a movieclip with a bevel effect on it, I got this error, I corrected it by eliminating the effect (Couriosly if I added the effect inside the movieclip there was no problem).
2.- Even more wierd (Since there is no documetation on the subject) when you embed a movieclip, what you get is a Loader class, not the actual class of the embed clip, witch loads from somewhere the movieclip, I guess this allows you to have a flash movie running before the hole thing has loaded. So I had to add the corresponding event listeners to this loader in order to know when the movieclip is ready to load.
I'm not sure if this helps since you are using Flex classes, but I think you get a FlexAssetsLoader object when you try to access a embed clip.
Thanks buabco. I should have been more specific.
I'm using Flex as my AS3 editor but writing pure AS3 code, not using MXML. I'm using the Flex compiler to compile a project, but I'd like to create asset libraries in Flash 9 Preview and import using Embed or Loader. However I try, I seem unable to load into my shell app an object as the appropriate class with attached AS3 code.
I am resorting to loading in AS2 SpriteAsset objects with identfiers, and then removing elments from it in code and putting them into the class that I want, but it seems like such an uncomfortable workaround. I'm just starting to migrate to AS3 so I'm hoping that it's just a stupid error...
Any further help would be really appreciated.
That's a lot easier since I've done it this way :) the code (I don't have it with me here but as much as I remember is like this):
private var mySwf:Class;
var myEmbed:Loader = new mySwf();
That should let you see your Embed stuff