Share Posted December 12, 2010 Hello. I load a swf using: var loaderMax:LoaderMax = new LoaderMax({name:"main-site", auditSize:false}); loaderMax.append( new SWFLoader("assets/swf/mySwf.swf", { name:"mySwf_loader", estimatedBytes:20000, autoPlay:false } ) ); After the swf has succesfuly loaded, I try to play it using as you suggest in another forum LoaderMax.getLoader("mySwf_loader").rawContent.play(); BUT... it returns error [Fault] exception, information=ReferenceError: Error #1069: Property play not found on flash.display.Loader and there is no default value. Why?? It has driven me nuts. Please help! Link to comment Share on other sites More sharing options...
Share Posted December 12, 2010 Sounds like you ran into a security error - Flash prevented your child swf from being accessed directly by the parent swf (I assume you're cross loading from another domain without a proper crossdomain.xml file in place) so LoaderMax automatically fell back to a less permissive mode. As indicated in the ASDocs, the "rawContent" will point to the Loader object instead of the root DisplayObject of the child swf in this scenario. So technically you're trying to call play() on a Loader instance which can't work. See what I mean? Link to comment Share on other sites More sharing options...
Author Share Posted December 13, 2010 Well, that was not the case, but I solved it. My flash website is made using Actionscript3, but the swf I was trying to load and play was made using Actionscript2!!!! I recompiled the swf using AS3 and all works good now! Thanks anyway. Without your 'security error' description I wouldn't have thought to check the swf language. Link to comment Share on other sites More sharing options...
Author Share Posted December 13, 2010 By the way, what if I want to load an AS2 swf to an AS3 project using LoaderMax? Can I do this? Link to comment Share on other sites More sharing options...
Share Posted December 13, 2010 By the way, what if I want to load an AS2 swf to an AS3 project using LoaderMax? Can I do this? Sure. Of course I'd definitely recommend using all AS3 stuff. AS2 is a dying language Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now