View Full Version : stop and loadmovie doesnt work
alternation
11-10-2007, 04:57 PM
I'm facing a prob with some action scripting. Its a noob prob ...
I've got a intro.swf movie to play and at the end of the frame, its supposed to load a new movie called home.swf ...
when i preview it locally, it works. But not once it uploaded though. The files are in the same directory, so i very much suspect my codings are completely wrong.
It looks like this :confused:
stop();
loadMovieNum("home.swf", 0);
jamiller
11-10-2007, 05:33 PM
It's your path that's wrong. You must path the swf relative from the html file that your main swf is in.
Basically use the same path you used to load the main swf in your html. Should looks something like swf/main.swf or something and use that same path in your flash file to load home.swf. Your code should now be something like loadMovieNum("swf/home.swf", 0); But now it shouldn't work locally, which will be a good thing.
BLiZZaRD
11-10-2007, 05:53 PM
Actually there is more wrong than that. Unless you don't want it to work exactly right.
Firts when using loadMovieNum() you need to use more than relative paths, use absolute paths (meaning include the "http://yoursite.com/path/to/file.swf" )
Also:
When you load a movie, you can specify any level number and you can load movies into a level that already has a SWF file loaded into it. If you do, the new movie will replace the existing SWF file. If you load a movie into level 0, every level in the Flash Player is unloaded, and level 0 is replaced with the new file. The movie in level 0 sets the frame rate, background color, and frame size for all other loaded movies.
As no one will be able to tell which level your files are loaded in I prefer to use a high level to avoid any overwriting. something like 1 or 2 will work better, but you can also use 9999, 10001, etc.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.