I currentyl have three types of swfs....one, the master, to load all the swfs into, two the top navigation which stays the same throughout, and 3, the content swf which comprises the rest of the site.
Inside the 3rd Swfs, there is a secondary nav underneath the large background image. When the sec nav links are clicked, the content area appears in the background image...ill try to draw.
-------------------
------------------- <- top nav
| | <- big "background image"
| | <---content popup (appears on sec nav click)
| |
-------------------
------------------- <- secondary nav
heres the concept that i am stuck on....
how do i make it so when you click on the secondary nav button, the box appears with the content in it....but when you click on the next sec nav button, the previous dissapears, and the new one appears?
That's more complicated. Say in your main movie, your loading your content movies into an empty clip with the instance name of mtClip. Now, in each of your external content movies, you need a fade in animation and a stop, where it's faded in. This means, you need to make each movie portable, by building all the movie inside one movie clip, then adding that to the main root timeline, so you can fade the whole movie with one tween on one layer. You have to do that for each content movie.
On the root timeline, there is no stop in frame 1. Say the fade in tween goes to frame 15 and it's now faded in and you have a stop() there. Then another 15 frames and a fade out to frame 30. also on frame 30, you have to have some if statements that read a variable from the buttons in the main movie, so it knows which movie to load next, determined by which button was pressed. In frame 30, of each and every external content movie, add something like this;
thanks, that explaions a little but, but i was mostly set up like taht....i know that about the fade in stuff, that i figured out. BUt waht i dont know is, how does it know when you click on the link, to go to the tween the causes the content box to fade out? It would be easy if you knew which one they were going to click (obviously you dont) <- you could just add a behavior to go to and play the fade out frames. But you dont know which one they are going to click so what is the if statement that i need to tell it to : example
on click of link (Company)
{ if (previous content was Staff)
{ go to Staff and play the fade tween}
if (previous content was Press)
{go to Press and play the fade tween
if (previous content was Inquire)
{go to Inquire and play the fade tween}
ok...so this is how i am trying to do it. Inside the company.fla (which is the fla for all the company content)....I have the layers to fade in the bottom nav and the large background. Above those layers, i have a layer with a single keyframe that has a blank movie clip. when you go into that movie clip, the actionscript i add is
var myMCL:MovieClipLoader = new MovieClipLoader();
var myListener:Object = new Object();
myMCL.addListener(myListener);
myMCL.loadClip("overview.swf", 5);
to load the overview content first
overview swf is a 30 frame swf that holds the fade in and out (with the stop at fram 15) like you described above. EVerything works fine as of here....everything fades in right, and ive got the overview displayed. I get how i have to add the a.s. to the navigation buttons, but the next is where i get confused. Where do I add the rest of the actionscript to make it work with the rest of the content boxes (overview.swf, press.swf, team.swf, locations.swf, partners.swf)
Sorry if Im being slow but ive tried to work it thru and i cant figure it out...thanks for your help
That list of if statements above in post 4 would go on frame 30 of each of the content movies. Your buttons set the variable and tell the overview swf to play. It looks like you loaded it to level 5, so you have to target that to make it play past frame 15. When it gets to frame 30, it reads that code, starts to load the next movie into itself, and disappears. When it's loaded itself, it plays out to frame 15 and stops.
Here's another way to do it, where the transition, instead of being built into each movie, is built into a movie clip in the main movie. The concept is similar, and this may be easier. Right now, the transition is a sliding door, but it could be a fade in over the area, or any other animation you want to use.
Here's an example main movie and two of the four fla's this loads. Look through all of them, cause there is code everywhere.
ok i tried to setup my fla's after the above, but something is wrong and its not working, can you take a look??? the main fla/swf is company and overview is supposed to load into it::dl it here: http://www.roccagroup.com/help.zip
i feel like a tard, but i still got questions...i did everything (i think) with the exception of adding a transition effect (i gott figure out how to make it be a fade out), but anyways....i think there is a problem with my buttons, because even tho the other contents swfs dont exist yet, shouldnt the overview.swf dissapear? (even tho theres no transition effect)....
and if you could, how can i make the transition effect be a fade out?
The path ont he buttons isn't right. You need to give the menu movie clip an instance name. Call it menuMc and the buttons mc name it buttons. So instead of;
And so on. Thats why your trans wasn't doing anything. Even if you had a fade out in it. And you had the button code in two places.