Skip to main content
Participant
September 14, 2006
Answered

Passing Parameters with loadMovie()

  • September 14, 2006
  • 1 reply
  • 305 views
I'm trying to use loadMovie to load a SWF at a particular URL into a movie clip. The SWF requires that I pass certain parameters as name/value pairs (such as ver=2.0&plat=win&lang=en ). The Help file implies that this is possible, but it doesn't give an example, and I have been unable to make it work.

The weird thing is, I can get the same URL to load properly if I put it at the root, but not within a new movie clip.

For example, the following works (the URL is just an example):

this.loadMovie(" http://www.nothing.com/test.swf&ver=2.0&plat=win&lang=en");

but this doesn't:

var emptyBox:MovieClip = this.createEmptyMovieClip("emptyBox", 1);
emptyBox.loadMovie(" http://www.nothing.com/test.swf&ver=2.0&plat=win&lang=en");

How can I pass these parameters to the SWF? Should I be using "GET" or "POST" and if so, where do they go in the statement?

Thanks!
This topic has been closed for replies.
Correct answer malachite00
I solved the problem, but if anyone can explain why this solves it, I'd love to know.

I added the following line for the movie clip I was loading the URL into, and it loaded fine:

mc._lockroot = true;

It really doesn't seem that this should affect parameters in the URL, but it did.

1 reply

malachite00AuthorCorrect answer
Participant
September 15, 2006
I solved the problem, but if anyone can explain why this solves it, I'd love to know.

I added the following line for the movie clip I was loading the URL into, and it loaded fine:

mc._lockroot = true;

It really doesn't seem that this should affect parameters in the URL, but it did.