I’m working on a flash project that has a bunch of different parts. It sort of complicated to explain but i’m going to give it a shot.
I have a main file that has some animation and a few buttons. Each button loads a different swf file into an empty movie clip. These are the different “pages” of my site. I am basing this part off of the tutorial I found here.
Each one of those pages has its own sub navigation, some of which have even more sub navigation. So to give an example:
Main Pages
Home
Projects
About
Click on Projects
(brings up sub navigation as follows)
housing
commercial
religious
Click on Housing
(brings up sub sub navigation as follows)
Project 1
Project 2
Project 3
Now comes the part I dont get.
I would like to use the tutorial found here to show off the photos of the projects. I think what I want to do is create an empty movie clip and load it into the Main Pages area. Then I would like to use that thumbnails tutorial to fill in that empty movie clip to show the photos. This is the part that I get hung up. I can get the empty movie clip but as soon as I click on the project button which is coded like below, all of my flash document goes away and all you see is the swf that is loaded into the movie clip.
Actionscript I use on the button that creates empty movie clip:
ActionScript Code:
[LEFT]p1_bt.[COLOR=#0000ff]onRelease[/COLOR] = [COLOR=#000000]function[/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]
[COLOR=#0000ff]trace[/COLOR][COLOR=#000000]([/COLOR][COLOR=#ff0000]“Project 1 button is working”[/COLOR][COLOR=#000000])[/COLOR];
[COLOR=#0000ff]_root[/COLOR].[COLOR=#0000ff]_root[/COLOR].[COLOR=#0000ff]_root[/COLOR].[COLOR=#0000ff]_root[/COLOR].[COLOR=#0000ff]createEmptyMovieClip[/COLOR][COLOR=#000000]([/COLOR][COLOR=#ff0000]“project_mc”[/COLOR], [COLOR=#000080]3[/COLOR][COLOR=#000000])[/COLOR];
[COLOR=#0000ff]_root[/COLOR].[COLOR=#0000ff]_root[/COLOR].[COLOR=#0000ff]_root[/COLOR].[COLOR=#0000ff]_root[/COLOR].[COLOR=#0000ff]_root[/COLOR].[COLOR=#0000ff]loadMovie[/COLOR][COLOR=#000000]([/COLOR][COLOR=#ff0000]“housing_p1.swf”[/COLOR], [COLOR=#ff0000]“project_mc”[/COLOR][COLOR=#000000])[/COLOR];
container.[COLOR=#0000ff]_x[/COLOR] = [COLOR=#000080]0[/COLOR] ;
container.[COLOR=#0000ff]_y[/COLOR] = [COLOR=#000080]0[/COLOR] ;
[COLOR=#000000]}[/COLOR];
[/LEFT]
I have used AS like the before where I load a swf on top of other swfs using levels but never with an empty movie clip. I dont understand why the project button that I think is supposed to load this housing_p1.swf on top of the other swf replaces the original swf instead.
What am I doing wrong. Is this technique a bad way to go about it, should I be doing this a different way? Please any help would be great!
Josh