Skip to main content
Inspiring
April 28, 2006
Question

passing URL to loadMovie( )

  • April 28, 2006
  • 1 reply
  • 392 views
loadMovie("filename.swf",0);
works fine

However

var filename="filename.swf";
loadMovie( filename,0);

does not.Why is that?


This topic has been closed for replies.

1 reply

Inspiring
April 28, 2006
aa,

> loadMovie("filename.swf",0);
> works fine
>
> However
>
> var filename="filename.swf";
> loadMovie( filename,0);
>
> does not.Why is that?

But it does work. Why are you passing zero as your second
parameter? It's a fluke that the first one works at all, since the second
param is supposed to be an object (in this case, a MovieClip reference).


David
stiller (at) quip (dot) net
Dev essays: http://www.quip.net/blog/
"Luck is the residue of good design."


Participating Frequently
April 28, 2006
an integer as a second param seems to load the movie into _root
assuming that's an invalid param, _root would be the next one by default to load into.
however, as David said, the second param should be an mc target.

p.s. a long long time ago far far away... i used loadMovie("my.swf",0); too