Groups | Blog | Home
all groups > flash actionscript > december 2005 >

flash actionscript : action script load/unload movie



Motion Maker
12/2/2005 7:13:03 PM
I think with loadMovieNum you simply use the same depth number it should
delete the current external movie and replace with the new one.

Here is a quote from the docs:
"When you load a SWF file, you can specify any level number and you can load
SWF files into a level that already has a SWF file loaded into it. If you
do, the new SWF file will replace the existing SWF file. "

Menu Choice 1
loadMovieNum("movie1.swf",100)
Menu Choice 2
loadMovieNum("movie2.swf",100)
Menu Choice 3
loadMovieNum("movie3.swf",100)

--
Lon Hosford
www.lonhosford.com
May many happy bits flow your way!
[quoted text, click to view]
Dear all, I'm an Italian industrial designer that needs a little
information.

I'm actually working on a site made by an intro - .swf - file that, on the
last frame, have an action that load another .swf into the main stage. This
..swf contain a menu bar with 100 buttons (approx)
Each button contain a "loadMovieNum()" action and 100 "unloadMovieNum();"
actions, so that, when you press it, it loads the new movie and "clear" the
stage from any other charged movie.

As you can imagine this method is really terrible, because when you want to
add a new button (and a new movie) you have to change every single button,
and
add a new unload action (for ex.: if I design the new movie 1001 I'll add to
each button: unloadMovieNum(101);

At the moment I "resolved" adding to each button unload movie actions for
movies that still don't exists - unload (120)/(121)/(122)..., so that when
I'll
add new movies I'll not have to change every single button.

NOW THE QUESTION...Does exist an action that allow you to say: unload ALL
movies except movie num x?

thank you vary much for the attention!

[quoted text, click to view]

Federico

roroarro
12/2/2005 11:04:38 PM
Dear all, I'm an Italian industrial designer that needs a little information.

I'm actually working on a site made by an intro - .swf - file that, on the
last frame, have an action that load another .swf into the main stage. This
..swf contain a menu bar with 100 buttons (approx)
Each button contain a "loadMovieNum()" action and 100 "unloadMovieNum();"
actions, so that, when you press it, it loads the new movie and "clear" the
stage from any other charged movie.

As you can imagine this method is really terrible, because when you want to
add a new button (and a new movie) you have to change every single button, and
add a new unload action (for ex.: if I design the new movie 1001 I'll add to
each button: unloadMovieNum(101);

At the moment I "resolved" adding to each button unload movie actions for
movies that still don't exists - unload (120)/(121)/(122)..., so that when I'll
add new movies I'll not have to change every single button.

NOW THE QUESTION...Does exist an action that allow you to say: unload ALL
movies except movie num x?

thank you vary much for the attention!

[quoted text, click to view]

Federico

Motion Maker
12/5/2005 9:15:37 AM
Super!

--
Lon Hosford
www.lonhosford.com
May many happy bits flow your way!
[quoted text, click to view]
it works! it's amazing...
the site was originally made by another person an i just hereditad the
structure she gave to the site...but i have always thought that it was
strange
to load movies with all this numbers, load 89 load 90 load 91... and that
there
should have been a rapid way to do this.
followng your suggestion I'll consider the number as a Layer, so the intro
will be LAYER 1, the men? bar will be LAYER 2 and all the movie will load on
LAYER 3...
now it's all vary clear, thank you again Lon

roroarro
12/5/2005 1:48:20 PM
wow, this could change my life ;-) hehe
roroarro
12/5/2005 2:04:08 PM
it works! it's amazing...
the site was originally made by another person an i just hereditad the
structure she gave to the site...but i have always thought that it was strange
to load movies with all this numbers, load 89 load 90 load 91... and that there
should have been a rapid way to do this.
followng your suggestion I'll consider the number as a Layer, so the intro
will be LAYER 1, the men? bar will be LAYER 2 and all the movie will load on
LAYER 3...
now it's all vary clear, thank you again Lon

AddThis Social Bookmark Button