Re: [flexcoders] Re: How do i embed a SWF in AS3?
Can the player display the SWF otherwise? How did you get the SWF you are trying to embed? Some issues you may want to check: - SWF contains newer tags then the SDK can handle (DefineFont4 for example cannot be handled in SDK 3.2). - SWF contains shape tweens - some such tweens will cause the SDK parser to fail. - SWF is to big - SDK parser will fail on very big SWFs, maybe it's just a wrong error message, but that's very unlikely. - SWF contains embedded video - I never tried this, but, since SDK has no parser for embedding video this may be an issue. - SWF was generated by some third party tool, which may not done it very well. Best. Oleg
[flexcoders] Re: How do i embed a SWF in AS3?
I think you can only load a swf at runtime, via a Loader or SWFLoader --- In flexcoders@yahoogroups.com, Clark Stevenson a.scots...@... wrote: Hey all, The title says it all. I know how to embed a symbol from a SWF, but everything i try when trying to embed a complete SWF fails: [Embed(source=assets/some.swf, mimeType=application/octet-stream)] private var MySWF:Class; var movie:MovieClip = new MySwf() as MovieClip This does not work which is slightly obvious as its a octet stream. So now i use a loader and try loadByes(new MySWF() as ByteArray) This tells me .swf contains invalid data. So i have no idea how to embed a SWF. Can anyone give me some help? Cheers, Clark.
Re: [flexcoders] Re: How do i embed a SWF in AS3?
You can definitely embed an entire SWF. By default the SWF is encoded as a bytearray and the bytearray is the source for a MovieClipLoaderAsset. Works great but then you can’t easily access the SWF because it has been wrapped. But somewhere in the generated code should be the clue for just getting the SWF as a bytearray. On 6/17/10 10:16 AM, Josh Chernoff j...@gfxcomplex.com wrote: I think you can only load a swf at runtime, via a Loader or SWFLoader --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Clark Stevenson a.scots...@... wrote: Hey all, The title says it all. I know how to embed a symbol from a SWF, but everything i try when trying to embed a complete SWF fails: [Embed(source=assets/some.swf, mimeType=application/octet-stream)] private var MySWF:Class; var movie:MovieClip = new MySwf() as MovieClip This does not work which is slightly obvious as its a octet stream. So now i use a loader and try loadByes(new MySWF() as ByteArray) This tells me .swf contains invalid data. So i have no idea how to embed a SWF. Can anyone give me some help? Cheers, Clark. -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui