This content has been marked as final. Show 4 replies
Why can't you have the SWF in the same folder as the HTML? If you can't do
that, I'd think you'd probably need to hardcode a path variable in your
movie, and then reference it whenever you want to specify a relative path.
var realPath = " http: // www. mydomain.com/flash/myfolder/"; <spaces add so
it doesn't make a link
Then, instead of doing something like this:
holder.loadMovie(realPath + "images/truffle.jpg");
Adobe Community Expert
The work around is pretty simple: Use a relative path from your html.
var myUrl:String = _url.substr(0, _url.lastIndexOf( "/" ) + 1 )
loader_mc.loadMovie(myUrl + "ExternalMovie.swf");
May many happy bits flow your way!
"mr.eddy" <email@example.com> wrote in message
If you embed your SWF on a HTML page that is not in the same folder as the
file, any loadMovie() in the SWF will fail because the relative path used is
the path of the HTML file and not the SWF file??? This seems absurd.
Workarounds needed ASAP!
Thank you all for your replys!
I actually ended up hardcoding the url in the movie. It is a cross domain thingie so I can not use a relative path in HTML. However I do not know wether the _url variable would have worked, I think it still points to the url of the HTML. I might have tested that but can't remember.