To the second question, Use loadMovieNum()
loadMovieNum(url:String,level:Number [, variables:String]) : Void
Parameters:
url - The absolute or relative URL of the SWF or JPEG file to be loaded. A
relative path must be relative to the SWF file at level 0. For use in the
stand-alone Flash Player or for testing in test mode in the Flash authoring
application, all SWF files must be stored in the same folder and the filenam
es
cannot include folder or disk drive specifications.
level - An integer specifying the level in Flash Player into which the SWF
file will load.
variables - An optional parameter specifying an HTTP method for sending
variables. The parameter must be the string GET or POST. If there are no
variables to be sent, omit this parameter. The GET method appends the variab
les
to the end of the URL and is used for small numbers of variables. The POST
method sends the variables in a separate HTTP header and is used for long
strings of variables.
Use your thumbnail hits and onPress or onRelease to load your movie into the
desired level. You can have many movies loaded at the same time, seeing thro
ugh
where there is no content. You can load your thumbnails in a high level then
the other movies under. If you want your thumbnails to be on stage already,
they will load into level 0. To load subsequent movies below, go to Publish
Setting... and select Top Down for load order. Then your other movies will b
e
below your menu. It may not matter which is on top or bottom. When you load
a
movie into a level, the movie already there, if there is one, will be replac
ed.
To unload a movie without loading a new one, load a blank movie into that
level. I use a 1px X 1px movie called "blank.swf".
This is some code where I have a movieclip instance "index" containing
thumbnails for campgrounds. The thumbnail hit loads the campground movie int
o
level 4, replacing the previous one. I have a master menu that loads the mov
ie
containing the index, It also loads mountainbiking trail maps, slideshows, e
tc.
You can make realy cool apps really easily like this.
index.agnewHit.onPress = function() {
loadMovie("Resources/agnew.swf", 4);
}
index.aspenHit.onPress = function() {
loadMovie("Resources/aspen.swf", 4);
}
index.bigmeadowHit.onPress = function() {
loadMovie("Resources/bigmeadow.swf", 4);
}
|