Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Jump to frame...(GO TO ACTION) 2

Status
Not open for further replies.

flasher

Technical User
Mar 4, 2002
245
US
I would like to create a button and when you click on it, it jumps to a certain frame and text will appear and animations will start playing... Obviously this is very common. One tutorial said that you simply put a "go to" action in the button telling it go for example to frame 5 and then it'll start playing.

Well,say I have 10 buttons each jumping to 10 different places on the timeline! Where does one set of frames stop and the next begin? Does each button link to a different scene perhaps? They have to be separated somehow!thank you.
 
The 10 different buttons can jump to 10 different places on the main timeline.

Just have something like:

on(release){
gotoAndStop(5);
}

in one and :

on(release){
gotoAndStop(15);
}

in another etc.

Better still you can use labels so that you don't get lost in a sea of frames. There's a panel called "frames" that lets you add a text label to a frame and then you can target the frame by refering to that label...


on(release){
gotoAndStop("label_1");
}
 
Question on your answer:

Do you put the content of the target frame right in the main timeline too or do you target-for example-frame 5 and put a movie clip in frame 5? b/c if the content is right in the main timeline, how does the movie know to play from frame 5 to the end of that content ONLY and not to continue playing right into frame 15 which is for the next button??
 
If I had 10 buttons and 10 frames... I would put a separate mc in each one which will begin playing immediately when the playhead is told to go to that frame.

keep in mind that each frame in the main timeline would need a stop() action. Ya' Gotta Love It!

 
Let me clarify... to keep things simple I normally make a mc for about us, 1 for portfolio, 1 for contact, etc.

If I have 4 frames 1 for home, 1 for about us, etc. then that mc would go on the corresponding frame. Obviously the main structure such as the buttons, logo and title would be on the main timeline on its own layer. Ya' Gotta Love It!

 
Just want to be sure I got it straight. Can you just read and tell me if it's correct? thanx.

First you create a layer for the "background" of the site. (logo,heading,etc., DO BUTTONS GO ON THIS LAYER?)

Next you create a second layer with (for ex.)4 frames.

You insert a movie clip in each frame plus a stop action in each.

Finally, you assign an action to each button that on release-it should jump to a particular frame.

Am I missing anything?
Your help is much appreciated!
 
That is pretty close to how I do it however, I am a bit of a fanatic about layers...

I usually have the following layers on a normal total flash site:

Actions
Framenames
Buttons
Content
Structure
Background

It really helps when you find you need to tweak something... you can then turn things off, lock them or just get them out of the way for a bit while you work.

BTW...content is where the separate mc's would go.

Regards,
TulsaJeff Ya' Gotta Love It!

 
Your help is tremedous! It's really simple when someone shows you so clearly. Thank you again!

Only what's the difference btw the structure and background layers?



 
Sometimes I will have a big rectangle as my background and it covers up the gridlines. Therefore I put it on its own layer so I can turn it off and lock it if I need to see the grid or just get it out of my way for a while.

Structure would be like side bars, horizontal lines,little niches for the buttons, etc. Ya' Gotta Love It!

 
That makes sense. One more thing I can think of for now:

When inserting a movie clip into a frame, you need to lay it directly over the original image. correct? I can't get it to be perfectly straight and mine are always noticeably off... There must be a way to lay one object perfectly over another...? thanx!
 
If you select the symbol, you can then in the Info panel, position and scale it very accurately, by entering it's x or y parameters, or it's width & height.

Regards,
new.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top