-
The mysterious "loadmovie" command
I've been attempting to design an entire site using just flash. And, to ease loading, I was planning on setting up subsequent pages using the "loadmovie" command. However, for some reason it's not working, and I think it's because I don't totally "get" how the command works.
I have navigation buttons on my main .swf. Then, when each respective button is pushed, I want it to load another .swf on to the main flash movie. However, as of right now, when the buttons are pushed, nothing happens. I'm a real beginner to actionscripting, so please don't laugh at the simplicity of the code I am using to try do this. For each button, I have something like this:
/////////////////////
on (release) {
_root.contents.loadMovie("about.swf");
}
////////////////////In that little snippet, "about.swf" is the movie I want to stick on top of the main page. So, In my understanding of loadmovie, "about.swf" should come on top of the main flash movie and perserve the background below it, right? If so, what am I doing wrong?
Any help would be appreciated. Thanks for helping out yet another n00b!
-
5+5=55
this.createEmptyMovieClip("loader", 888);
loadMovie("about.swf", loader);
Try that.
-
You're a genius! Thanks so much. THANK YOU!
But, uh, why does it work? What's the deal with that crazy 888? Some type of secret code only flashers know about?
-
FK's Geezer Mod
888 is the level it loaded to. It could be from 1 to 16000.
The drawback is anything loaded to a level will always be on top of anything else in the layers of a movie.
Your code would work, but you need an empty movie clip on stage, on a layer, and give it an instance name of contents, then the button code.
on (release) {
_root.contents.loadMovie("about.swf");
}
To get things above or below something else on a layer, just drag the layer up or down in the stack.
Last edited by Ask The Geezer; 06-21-2006 at 10:55 PM.
-
A.T. Geezer,
I think this coding was a very valuable piece of the puzzle for my own web site, when I want to call various streaming videos to play. Am I right?
If I were to have dozens of streaming videos in my categories lists and a viewer spotted one category that they wanted to review, then I would need buttons that took the viewer from the general index to that category and then to another list. And then finally to this code to trigger the movie to play.
Am I thinking right on this?
-
FK's Geezer Mod
Yes, if each category is in a separate swf movie. loadMovie is for loading external swf's, so everything doesn't have to be built into one movie, which would take forever to load. Each external movie can have it's own preloader built into it also.
-
Very helpful. Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|