Jump to content
Search Community

how to load from external swf library

Wickian test
Moderator Tag

Recommended Posts

Basically what the title says.  How would I access a library movieclip from an externally loaded swf with swfloader?  The following is from a tutorial:

var loader:SWFLoader = new SWFLoader("path/to/file.swf", {name:"coupons", container:this, alpha:0, onComplete:completeHandler});
            addChild(loader.content);          
            loader.load();            
            function completeHandler(e:LoaderEvent):void{
                TweenLite.to(e.target.content, 1, {alpha:1});    
                var librarySymbol:Class = loader.getClass("splashes");
                var myInstance:MovieClip = new librarySymbol();
                addChild(myInstance)
            }

However that gives me the following error cannot convert splashes@5adcdc1 to flash.display.MovieClip.

 

Thanks.

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...