Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
masputih

[LoaderMax Beta] SWFLoader

Recommended Posts

Hi, Jack,

 

I used to use external asset SWFs like this one in my projects:

post-4730-133152000746_thumb.png

 

is there anyway to get a symbol's class in the loaded swf through the SWFLoader? I can't seem to find it.

 

Just for a comparison; with CasaLib library, I can do something like this:

 

LibraryManager.addSwfLoad(swfLoadInstance)

 

and then when I need to create an instance of the symbol after the swfloader completes,

 

LibraryManager.createClassByName(symbolClassName);

 

Thanks.

Link to comment
Share on other sites

Sure, you can snag the latest zip and the SWFLoader has a "getClass()" method that you can use to...um...get a class by name in the swf :) Then you can create an instance on your own. Like:

 

var myCustomClass:Class = loader.getClass("com.greensock.TweenLite");
var tween:Object = new myCustomClass(mc, 1, {x:100});

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