This content has been marked as final. Show 9 replies
OK, this should only work IF the calling swf is located within the 'media' folder/directory. Also you have the second parameter incorrect, as when using loadMovie it should be a target object, string, or method (POST or GET), if you are targeting a 'level' you should use loadMoiveNum.
You may want to consider switching to the MovieClipLoader class, and loadClip method, which also give you more control over targeting, and provides many event handler notifications.
Relative paths should work firn on the same server. I use them without
problem... What is not working? Remember, online SWF actually have to load
in, and you can do stuff to them once onLoadInit has fired - if you're using
MovieClipLoader - which you should be.
Adobe Community Expert
Yes, I've done this all the time too, and never had this problem, which is why I'm stumped.
I've changed my code to this, with module_proxy being an empty movie clip. This works. But when I take out the URL and path, even though the swf files are in the same directory, it's doesn't play.
loadMovie (" http://www.website/media/01_Mixie_Pixie_Telegram_Service.swf", "module_proxy");
Then, I tried to create a varible for the URL/domain, so I can change it out more easily (although when I hand this off, I won't be able to do that):
var domainPath = " http://www.website/media/"
var linkToSWF = domainPath + eval(PgFile[item_chosen]);
loadMovie (linkToSWF, "module_proxy");
var swfPageLabel = item_chosen.toString();
This doesn't seem to work either. So, if swf files SHOULD be able to communicate using loadMovie, why am I having this problem? Thanks.
Are these calls directed and the loadingMovie? If so, this is because the calls are being made before the move has been instantiated on the timeline, this is why using a MovieClipLoader is better because you can use the event notification to start the next calls when completed.
(I also just noticed that in your code here, the target param should not be in quotes)
Something like this:
where's the html page (relative to your swfs) that embeds the main swf?
The html files are in the root web folder, all the swf files in the a folder called "media" inside the root. When I play the menu swf locally, everything works. The inside swf files are pulled into the menu using loadMovie(), and the audio works by LoadSound to an external MP3 file, in a folder called _audio, inside the media folder.
I know you said to take the "" out from the target, but this is how I've always done called my loadMovie swfs, inside a blank MovieClip called and with an instance name "module_proxy". I don't think this should be a problem, since it works fine when I play the swf locally on my machine.
When I try to play it online, however, the swfs do not play inside the menu swf, so I'm guessing this is a security thing. What is going on!?! Please, please help...
your relative path should be from your main html file to the loading swfs. the location of your main swf is irrelevant.
Thank you! Although I wish I got your message before I figured it out myself. Seems like such an obvious fix, but unfortunately it took me about 3 more hours of testing different things to figure that out... duh.
Thanks for the response.