Jump to content
GreenSock

flashgoblin

Playing a sound in an external SWF

Recommended Posts

I have a preloader SWF that loads in main.swf and sounds.swf via LoaderMax. I would like main to have access to the sounds in the library of sounds.swf. I know that I can use the MP3Loader, but I need to work within the current framework of the project that has all of the sounds in the main library. Any idea how I can easily access a sound class in one SWF from another? (Both being loaded in with LoaderMax)

 

Thanks!

Shane

Link to comment
Share on other sites

You can get any class from within the subloaded swf using SWFLoader's getClass() method (assuming you didn't run into any security errors while loading, like from another domain with no crossdomain.xml in place). See the ASDocs for details. http://www.greensock.com/as/docs/tween/_loadermax.html

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