views:

49

answers:

1

Question: I need to load a swf file from inside my flash. Now, normally I would use loadClip, but I need to pass a parameter (filename) to this swf. How can I pass a parameter there?

+2  A: 

It's not the best solution but have you tried loading the swf file with an absolute path?

var container:MovieClip = this.createEmptyMovieClip("container", this.getNextHighestDepth());
var loader:MovieClipLoader = new MovieClipLoader();
loader.loadClip("http://mydomain.com/flash/test.swf?param1=1", container);

You can also establish a communication between both swf based on events as described in this SO question.

jdecuyper