Menu In>Out

Hmm, I have buttons that make a movie clip appear (table with the content flashing in), the problem is going from one table to another different one, ie when you click a different button the table flashes out, then another flashes in. This is probably very simple but I cant figure it out! :smiley: \r\rthanks,\rjohn\r\rBTW I use a lot of movie clips inside movie clips…

Hard to tell without looking at the fla…\r\rpom 0]

I think i know where you’re trying to get at. I have a similar movie where you click a button, and a lil branch stems off it, when you click it again, the branch goes away. I also used this with another movie inside my main movie. If this is similar to what your doing, read below.\r\rAll i did was make a variable called Menu_switch. very simple…in the beginning of the movie, the Menu_switch is set to -1 which is off so it won’t show at first. \r\rNow, for the actions of the actual button that will decide whether to show the branch or not…\r\rEvery time the button is clicked, the Menu_switch will be multiplied by -1. That way it keeps bouncing from 1 to -1 and so on every time u click the button. Now I added the following code with the button…\ron (release) {\r \rMedia_switch = (Media_switch * -1); //switch media_switch\r \r if (Media_switch == -1) { //if switch is turned off\r&nbsp &nbsp &nbsp &nbsp tellTarget (“MediaShow”) { // hide switch\r gotoAndPlay (9);\r }\r }\r \r if (Media_switch == 1) { //if switch is turned on\r&nbsp &nbsp &nbsp &nbsp tellTarget (“MediaShow”) { // show switch\r gotoAndPlay (2);\r }\r }\r}\r\rThis just determines if the button is on or off, and it will display the movie properly. There’s alot more tho…but maybe this might help if u need more ask

Thanks for the help, at first your code was completely new to me, since Im not really good at the actionscripting aspect of flash… but I think i get it now. So basically it acts like a switch with a -1 value meaning off, and 1 meaning on? But then whats the gotoandplay for? And do I put the code in the menu movie clip?\rThanks alot, im learnin alot here…\r\r-john

No problem! \r\r Yep that’s basically all there is to it! Pretty simple. Alright but now to you’re question…lemme start off by explaining the tellTarget feature. tellTarget is almost like a goto feature for actionscript. My movie that i wanted to display when the movie hit the button was called “MediaShow”. so from: tellTarget(“MediaShow”), that tells that I want to now go into that movie and target it for whatever reasons. \r The gotoandplay command tells what frame i want to play in my tellTarget movie. They both work together. In my “MediaShow” movie, frames 2 - 9 displays the branch appearing, and frames 9 - 15 displays the branch disappearing. \r Here’s a simple way to look at it…\r\r1) User pushes the button\r2) tellTarget the movie that will be affected when the button is pressed\r3) Determine if i should show, or hide the “MediaShow”\r4) Goto the proper frame to display the movie appearing, or disappearing. \r\rNow to your other question about where to put the codes. For the coding of the button that determines if the button is on or off, put a similar code i showed u into that button. (Right click button, then hit actions). However, when the movie starts right away you want to make the button turned off. In that case, make a new layer in ur main movie area and make an action to say something like… your_Variable = -1; that way ur switch is off to begin with. Otherwise ur variable will start at 0 and -1 * 0 will always be 0, and nothing will happen in the movie. Ok, last thing!!! When you click the button, u want a movie to show. That movie that you want to show, needs it’s own coding too but it’s tricky at first but very simple. On the first frame of the movie that u want to show, there should be an action of “STOP”. That way, the movie won’t play right away when u start the movie. Also, on the first frame, there should be no graphics at all. So basically, ur movie should start on frame 2, with frame 1 only being blank. From frame 2 on to whatever frame it takes, then you can place ur movie appearing whatever way you like. On the frame where the movie is to stop appearing, you want to have another STOP on that frame…im gonna stop here because there’s alot of things i just went through. So if u have questions so far ask cause i know this can be confusing…if u don’t have any questions i’ll proceed.\r\rSorry so big! \r-Eric

Awesome i think i got it down with good’ol fiddlin around. :smiley: I knew what gotoandplay was, I just didnt see what you were using it for. But another problem has arisen, I have the main content (“main”) to play as soon as the movie starts, and its nested in another movie clip (along with all other movie clips that have content). \rThe navigation buttons is on the main timeline inside a movie clip, and the problem lies in the code I set for the buttons to tell the movie clips:\r\r

 on (release) {\r\r    tellTarget ("_parent.menu.profile")  {\r\r        gotoAndPlay(1);\r\r    }\r\r}\r\r

\r\rThe thing is when “main” is finished playing and is sitting there, the movie is in THAT timeline, thus making the navigation buttons useless!! See what I mean here:\r\rjohnmai.com/index2.htm\r\rAgain thanks for the help!\r-john

Urg I always end up solving my own problems after I post… :smiley:

Awesome site, it’s different, but different is great. I’m glad i helped you out with it, and if u still have more questions just post em up! It was no problem helping you out tho. \r\r-Eric