Simple load movieclip

I know how to load external swf movies,

but what action script do I need for a button to load a movieclip from the library.

do the movieclips have to be on the stage?

I would like to create a gallery by loading several movieclips and Change Stacking Order (swapDepth)

http://www.kirupa.com/developer/actionscript/swapdepth.htm

a simular result can be found in the portfolio of this site

http://www.gonzalovillanueva.com/home.html

thats easy, first of all, you need to export the library object you want to use, lets say “myObject” is located inside the library

lets export myObject,

go to your library, select myObject, and click LINKAGE, then select “EXPORT FOR ACTIONSCRIPT”, and give it an identifier name, just give it the default name (= library name, in this case, myObject)

now that myObject is exported, you can open an actionscript panel

normaly with creating empty mc’s you use, createEmptyMovieClip(), this time, we gonna use attachMovie() to use an linked object from the library…

on whatever event you wanna load myObject, use this code


_root.attachMovie("myObject","newname",1)

this will copy myObject from the library, and will be located on x0 and y0 of the _root on level 1…

conclusion, mc’s dont have to be on stage, hope you understand it…

with the gallary i cant help ya…