Jump to content
Search Community

Problem loading a swf and then playing it

fakeartist test
Moderator Tag

Recommended Posts

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



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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...