I would like to incorporate the load movie function in my movies. It would be cool to have the various texts fade in and out, rather than have a new page load up like on a coventional site.
Thing is, neither URL above explains what the difference between target and level are.
Neither link explains how you position the new movie so that it loads where you want it to on the stage. After all, you don’t want the new file loading up over your buttons or too far to the left!
Both state that you need to enter a URL address for the location of the movie to be loaded up and this is what is really puzzling me. For there to be a http://www address, the movie has to be on the internet but where do you publish them? Surely having them already loaded at another URL defeats the object of placing them within another URL?
I mean, if I have a site called http://www.office-furniture.com and I want a welcome movie to load up when a user clicks on “welcome”, surely I want the url to be http://www.office-furniture.com/welcome.htm and not http://www.office-furniture.com/loadmovie.swf?
Or does the actual URL of the swf file NOT get placed within the URL of the page?
What do you do? Do you make pages containing all the movies that you want used but hide them from the actual user?
Eg: having buttons for the welcome, order and info pages only but actuallyhaving extra pages containing the swf files you want to load up?
If the swf file has to be on teh internet, how do you load a movie if your site is not live yet but is still being made?
I tried to load a file from my C drive but it would not load. It just said “error”.
there are two different methods. One is “loadMovieNum();” and the other is “loadMovie();”. loadMovie(); loads external data into a target movie clip, loadMovieNum(); loads external data into a target level.
a target clip would be any movie clip which exists at the time that the method is called. Keep in mind that any frames or movie clips that are currently inside the target will be “writen over” by the loaded swf effectively illiminating it from activity. That is to say. if you load an swf into a target clip, then load another swf into the same clip, the previous one will be illiminated.
levels are a bit different and take some time to get a good grasp of. Levels exist in the Flash player and stack one on top of another in order. Each movie that is loaded into a target level will be lined up with the upper left hand corner of the stage and is immovable from that location. (as opposed to a target clip, where once you’ve loaded somthing into it you can move it around at your whim.)
In both cases, if there is a transparent section of the loaded swf, it will show through anything which exists under it.
In both cases, the url can be either a full url (ie “http://www.something.com/somefile.swf”), or, if you know the path to the file in question it can be addressed localy. (ie. if the swf that is being loaded is in the same file folder as the swf which is doing the loading, the url can be “somefile.swf”).
so… if I had a movie called “main.swf” which had a button which loaded a movie into a target movie clip on the stage (the target is called “holder” for this example) I would write the button scripts like so, IF the files were all located in the same folders online.
If I had the same situation but I wanted to load the movie into a level I could write
on(release){
loadMovieNum(“mainSection.swf”,1);
}
If you were testing localy and you had a full URL that is probebly the reason why you got an error. Try using the local addressing system to load your movies and it will work without uploading anything.
David, Thanks for the advice. I understand the different level settings and how they stack up. From what you are saying, I take it that levels are immovable and that only target movies are.
However, in playing around, I can only load up a new movie that overwrites the existing one - a level movie. When I choose target, nothing happens when I preview it.
Secondly, I ask about target movies because this is what I want. I ahve a web site with a background and with a left hand side nav structure. I want the background and nav bar to be visible on every page. This is why I want to load a movie over a section of the main movie and not the whole movie. If I loaded a full size movie over it - even if I included the background and the nav bar in my new movie - every time a new movie was loaded, there will be white gaps whilst the new movie is loaded over the top. Isn’t this the case - like on any standard HTML web site when pages change?
Even if it isn’t, I would still like to know how to position new target movies wherever you want. I have no idea how to do this!
Also, any suggestions why I can’t get load target to work?
Well with a target you need a target. I usually create a completely blank movie clip which I call “holder” in the library. Then you can drag an instance of the holder clip to the stage, possition it where you like, and give it an instance name… like “oNavHolder”.
You can’t load a movie into a target unless there is a target movie clip on the stage to load it into.
If that isn’t working for you correctly the only thing I can think of is that the loading swf is not located in the same folder as the swf that loads it.
What am I doing wrong?
I made a second movie so I could just load it over the top via “loadMovieNum();”.
I right clicked on a button in my main movie and selected “actions”. From here I entered all details as required.
I “test movie” but nothing happens. I checked the scripting and it looks just like the example you quote above. I even inserted this action in a frame at the end to see if it was just ne not doing the buttons correctly. In the last frame I inserted the same action but again - nothing!
Help! I haven’t even started on target movies yet!
I can’t build full Flash web sites without knwoing this loadmovie thing!! AAARGH!
hmm ok… best thing to do off the bat is to put away the file you’re working on.
go through this one step at a time.
PARTI
open a new movie. Make it’s dementions 100 by 100.
create a square of red fill 100 by 100 and place it in the center
of the stage.
save this FLA on your desktop as “loadedMovie”.
publish an swf of this movie to your desktop.
PARTII
Open up a new movie.
menu option “Insert/New Symbol”
type in “blank” in the text field. hit enter.
open your library. Find the item called “blank”.
right click on this item and select “linkage”.
check off “export for actionscript in first frame”. leave the name
as the default “blank” and hit ok.
Now if you look at the library, the object called “blank” should have the word “blank” in it’s linkage column.
Go back to the main timeline. Select frame 1
Open up the Action panel and paste the following code in it.
Save this FLA as “loadingMovie.FLA” on your desktop. (important. you must save the movie or the test flash will not have the paths correct to load the movie)
Test this movie. You should see a 100 by 100 square of red fill apear in the upper left corner of this movie.
There is no “export for actionscript in first frame” option.
I right clck the symbol (I did this twice - as a movie and a graphic) but no luck.
I only get, when right clicking and choosing “linkage”: no linkage, export this symbol and import this symbol from URL.