Skip to main content
January 27, 2010
Question

Get name of swf linked to an as file

  • January 27, 2010
  • 1 reply
  • 533 views

Sounds simple enough. I have a number of swfs (quiz01.swf, quiz02.swf.....) all linked to one quiz.as file. The quizes in turn are loaded by another swf, Main.swf. I need to get the name of the specific quiz that is loaded, so I can identify an external xml file.

Tried using the "loaderURL" in the as, but it gives the name of the Main.swf. How can I just get the name of the swf that is associated with the quiz.as file?  Been working on this a long time and would appreciate any guidance.

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
January 27, 2010

the contentLoaderInfo property of your loader(s) has an url property you can use to determine what was loaded.

January 27, 2010

But I'm loading the swf from another (container) swf, so loader info indicates the container swf . I need the name of the swf that is being loaded.

kglad
Community Expert
Community Expert
January 27, 2010

just use the correct path to the loader whose url you need.