Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Goto Frame # Or Label In Mx Pro Fro Button



Man do I feel noobish, its so much different to me. How do I script a button to go to a frame number or label, even a scene. Can someone paste me some basic code here? I know about the goto, then " to type frame, I am lost after that. Thx



Ultrashock Forums > Flash > Flash Newbie
Posted on: 2004-05-17


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Button With Variable Goto Frame Label>HELP
greetings all

Now i'm getting kinda desperate with this one.

I am wanting to have a smart clip which has a button in it which will goto a frame label. The frame label which it goes to is variable. So using each individual instance of the movie clip, and under the clip parameters panel, I would simply enter the frame label into it.

can someone plz help.

Thanks

Button Inside Of A Movie Clip That Goto's A Frame Label
heh, ok i have (as the title implies)
a button that is inside of a movie clip, and an action connected to te button that is suppose to "go to and play" the frame label (which is on the base/main) scene NOT inside of the movie clip. make sense?

what i have is

on (release) {
gotoAndPlay ("base", "music");
}

on the button.

the names are correct
--------

i can do the exact same thing OUTSIDE of the movie clip (put a button on the main stage and have it goto a label) but it just closes the movie clip when i put the button into the movie clip and try it.

thanks in advance for the help!

Code To Tell A Button OnPress Goto Level* Then Frame Or Label And Play Then UnloadSWF
Can someone help me in deciphering the code to tell a button onPress goto level* then goto frame* or label* and play then unload MC?

I have a Parent Movie which loads an external Swf for Navigation automatically. In this navigation a have several buttons. When any of those buttons are pressed it loads external SWF's into a container clip in the parent Movie.

My goal is to reverse the load process of those externally loaded SWF's when any of the Navigation buttons are pressed, but I am not exactly sure of the way to go about it.

Thanks for any help.

Goto Frame Label?
Hi,

I have this problem,

I'm making a short intro movie for a website. I would like to know how I can 'link' an actionscript from scene 2 back to scene 1.

Example:

Scene 1 is my 'main' scene. In here all the layers are placed in frame 1, except one. The folloing layers are placed:

Frame 1:
- Background (Layer with a picture, must be visible all the time).
- Line (A dotted line surrounding the picture above, also visible).
- Logo (A movie clip is inside this layer, it plays when the scene starts).

Frame 2:
- Foto (A movie clip is inside this layer, it should play when layer 'Logo' is finished), frame label = Goes.

So basically the movie clip inside layer 'Foto' should have a small script with something like gotoAndPlay("Scene 1", "Goes"); at the end of the frames. But this doesn't work. It won't go to frame 2 in scene 1...

I hope I have explained it well enough for you guys to help me!

Thanks in advance,

-Spheron

Goto Frame Label
Hey guys,

I didn't like the combo box component, so I decided to make one of my own. I have an MC that plays the drop down menu, and it isn't activated until you mouseover, click, etc. All that works fine. I tried to make it so the last frame of the MC has the actual buttons so you can move, but it you try and click on them it resets the MC of the combo box. So i figured I'd make a new frame with the drop down menu (open) outside of the MC. So i named the specific frame 'choice' and then put "gotoAndPlay("choice"); on the last frame of the MC, but for some reason it ignores this. If that's not clear enough I can elaborate.

Thanks alot,
brennan

Goto Frame Label
i remember a long time ago (3years) i read a tutorial on menus and navigations. one thing i remember learning was being able to specify something that would be to the equivalent of gotoAndPlay(frameLabel)

basically, if in the time name you place your frame labels, you can set buttons that would go to the frame with that label, rather specifying a frame number.

that would be real useful to me now, but i cant remember, or figure out, how to do so with mx 2004.

if anyone can help me with this, i would greatly appreciated it.

gkc

Goto Random Frame Label?
anyway to write a piece of code telling a movie to goto a random frame label?


cheers,

nigel

Goto Frame Label Using A Variable
I know this can be done but I must have the syntax wrong. How do I have a button with a goto and play frame label action with the frame label as a variable. I have forward and back buttons and I want to code them once with a _level0.here +1 or -1. _level0.here is my variable that I reset at every frame label which are labeled with numbers. Here is what my back button looks like:

on(release) {
back = String (_level0.here-1);
gotoAndPlay (back);
}

Thank you to anyone who can help.

How(or Can You) Goto Next/previous Frame Label?
ive done some searching around and havent really found anything regarding going to the next/previous frame label. Is it possibe? if so how is it done?

Is There A Way To Goto Next/previous Frame Label?
i know there is no function for it, but how could i do this?

Play Label And Then Goto Frame Number
i was just wondering if there is a way to to tell a button using action script to :

goto label, play for so many frames and the goto another label or frame number or scene.

Yes - i know i could put an action at the end of a label, but i want to use the same label to goto different other labels or scenes.

for example, there are 2 buttons but both say 'play label' but one of them says 'then go to scene2' and the other says 'then go to scene3'

- am fed up with making so many copys of labels and timelines going on for ever. THANKS IN ADVANCE

Goto Random Scene Or Frame Label?
I have been unable to figure out how to goto a random or variable scene or frame label.

Here is the simple problem...you can't do this in Flash:

anyscene = "Scene 1";
anyscenelabel = "whatever";
gotoAndPlay(anyscenename, anyscenelabel);

But you can do this:

gotoAndPlay("Scene 1", "whatever");

So, how can I get the following idea to work?

scenenum = Math.ceil(Math.random()*6);
gotoAndPlay(scenenum,1);

-aaron

Load Movie Then Goto Frame Label?
Hi everyone, I have been at this board for a while however I have never really posted because I seem to always find my answers somewhere. This time however, I have not been able to find any help on my problem.

I would like to click on a button on a level 2 movie, which will then unload itself (level 2) and load a new mc on level 2 and then goto to a specific frame lable in that mc. Is this possible?

If there are exisitng posts on this could you just point me in the right direction, or could you help me figure this on out.

Thanks,
Diesel

Goto Certain Frame Label In Loaded Movie
how would i script a movie that loads on top of another movie to START on a certain frame label?

I would think this would be possible and simple, but I just started getting into flash.

Please help if possible. Thank you very much.

Plus...Is there a good resource for learning how to target movies, scenes, frames, levels, instances etc., in an action script. And in which order it has to be written out?

Thanks again for all your time !

LoadMovieNum And Goto Frame Or Label Madness
After searching the forums to find my solution I am confused and will ask for help

I have a flash file that has a button. This button has script:

code: on (release) {
_root.nav.gotoAndPlay(32);
loadMovieNum("flashx.swf", 1);
}

So as you can see the button is in a MC that is instanced "nav" that is on the main timeline and when pressed will jump to frame 32 in the "nav" timeline. Then it will call up "flashx.swf" and put it on level 1.

Now in "flashx.swf" I have multiple buttons. The buttons have script as well:

code: on(release) {
loadMovieNum("gallery.swf", 1);
}

Each button calls up "gallery.swf" and replaces "flashx.swf".

So far everything works. The part that isn't is this:

Each button in "flashx.swf" will have to goto a certain frame in "gallery.swf". I have been unsuccesful at achieving this I even tried giving the frames in "gallery.swf" that I want to goto a frame label.

Goto Frame Label Within Movie Clip
Hey Guys,
I'm stumblin' through flash at the moment and have hit a problem that I cant seem to work out myself so I hope you guys have an idea.

I have a movie clip on one frame that is an image viewer in which small graphics can be clicked and larger versions can be viewed.

The larger versions of the graphics are all in another movie clip with frame labels at the start of each image display.

I need to click on one of the smaller graphics, move the main time-line on one frame(to display the movie clip with the larger images in it) and go directly to a frame label within that clip.

So I thought that 'on press' I could move the time-line on one frame to display the movie clip, and 'on release' could tell it to go to specific frame labels within that movie clip. Seemed pretty logical.

I'm trying to use this at the moment but know I'm missing something. Any help would be greatly appreciated.

on (press) {
_level0.nextFrame();
}

on (release) {
_root.mc_intimages.gotoandPlay("pic1");
}

**where 'mc_intimages' is the instance name of the movie clip that displays when I move the time line on one frame, and 'pic1' is the frame label within that clip it needs to go to.

Thanks to anyone advance for any help given.

B

Goto A Frame Label In A Loaded Movie
I am trying to have a button on(release) load a movie into an empty container (no problem so far) but also go to a specific frame label in that loaded movie. Any help with the actionscript would be much appreciated. I things I have tried have not be successful, but I am very new to actionscript and programming in general.

thanks

Goto A Frame Label In A Loaded Movie
I am trying to have a button on(release) load a movie into an empty container (no problem so far) but also go to a specific frame label in that loaded movie. Any help with the actionscript would be much appreciated. I things I have tried have not be successful, but I am very new to actionscript and programming in general.

thanks

How Do I Use A Variable To Specify A Frame Label In Goto Statement?
Hi,
I have a flash movie which contains a movie clip (named "buttons"), that contains two frame labels: "open" and "closed".
I am interested in loading variables from a text file, and then telling the movie clip to go to one of its frame labels that is defined in a variable.
I am having difficulty achieving this.

My text file is named "status.txt"
It contains the following text:
option=open

I found some info on the macromedia site and created the following script in the main timeline:

loadVariablesNum ("status.txt", 0);
gotoAndPlay ("/buttons:" & option);

This method of using a variable in a goto statement is supposed to work according to the site, but it isn't for me. Does anyone know what I'm doing wrong or if there is a better way?
I'm targeting Flash 4 players.
Thanks!

-King Dufus


GOTO Frame Label Within MC, Back To Main TIMELINE
Can you put a goto frame label action that is within a MC and have it go back to the main timeline outside the MC (ya know 2 seprate timlines)
any help would solve the prob

Thanks
PCRIDE

Help W/ Simple Load Script To Goto Frame Label
Using MX

I am having a problem w/ the attached file.

I need to load a swf that will go to a certain frame label.

I made simple fla files to demonstrate what i am trying to accomplish.

sortCatagorys is the main level
listA and listB are loaded movies

Further explanation is in the fla files

THANK YOU for all your time. I have a feeling this is a simple problem. I just started flash authoring

Loading External SWF And Goto Nested Frame Label
Hey All,
I have been banging my head against this one all weekend and I thought I would turn to you for some help.

I am loading an external SWF into another SWF (wrapper), but I want to goto a nested frame label in the SWF I am loading. For example...

"mcHolder" is the MC that I am loading the external SWF into
"lastFrame" is the frame label in nestedMC3


Code:
on (press) {
_root.mcHolder.loadMovie("chapterOne.swf", "_root.nestMC1.nestedMC2.nestedMC3.gotoAndPlay("lastFrame");
}
Thanks in advance for your help!!!

Goto Frame Label In Main Timeline From Movie Clip
Hi..
Could somebody point me in the right direction.

I have a buuton in a movie clip that I need to point at a frame label
on the main timeline.

I am using :-

on (release) {
removeMovieClip(dultanMC);
_root.play("Scene 1", "myframelabel");
}

It does not go to "myframelabel" but to the first frame of the
main timeline.

I've tried gotoAndPlay ("Scene 1", "myframelabel");

that just removes movie and does not redirect.

Please could somebody advise.

Dilema - Get Loaded In Swf To Goto Frame Label On Main Timeline?
I have a button that is loaded into my main movie at level 2. in my main movie on the timeline I have a frame label called guestbook. I want my button, when released to go to trigger the frame label.

on my button i have the script:

on (release) {
_root.gotoAndStop("guestbook");
}

Obvously this does not work because it references the wrong timeline so i tried:

on (release) {
_parent.gotoAndStop("guestbook");
}

thinking that somehow it would see the parent swf and work - haha - me and my dumb ideas of course it doesnt work.

do you know how i can get it to work. Perhaps i should mention that the button that loads in at level 2 is inside a movie clip (for reasons of animation)

anyway enough ramblings
Can you help me?

Thank you

Dilema - Get Loaded In Swf To Goto Frame Label On Main Timeline?
I have a button that is loaded into my main movie at level 2. in my main movie on the timeline I have a frame label called guestbook. I want my button, when released to go to trigger the frame label.

on my button i have the script:

on (release) {
_root.gotoAndStop("guestbook");
}

Obvously this does not work because it references the wrong timeline so i tried:

on (release) {
_parent.gotoAndStop("guestbook");
}

thinking that somehow it would see the parent swf and work - haha - me and my dumb ideas of course it doesnt work.

do you know how i can get it to work. Perhaps i should mention that the button that loads in at level 2 is inside a movie clip (for reasons of animation)

anyway enough ramblings
Can you help me?

thank you. I will of course keep answering other peoples questions when i can as a reward for your help in this matter

Creating Slideshow, Goto Next Label/prev Label
Hi,

I have been trying create a slideshow using 2 buttons (1 next, 1 previous) I understand you can use goto next frame/scenes in the actions panel, but I would like the buttons to goto next and prev labels in my slide show. I would use the goto next frame action but each slide is on every tenth frame.

Could any one help?

Thanks

Flash Button To Take Movie Clip To The Next Frame Label Instead Of The Next Frame
I am trying to figure out how to create a button to take a movie clip to the next Frame Label instead of just to the next Frame. I have a slide show that I am working on with a fade effect from picture to picture. When I just use the nextFrame script it will literally take you from frame to frame on the fade in. Is there a script that will allow you to go to the next (or previous) Frame Label from where the movie was stopped?

Any help is greatly appreciated!

Goto "FRAME LABEL" + 10 ?
Hi, is there a way to go to a frame label + 10. Here's my code which isn't working.

gotoAndStop("usa"+10);

Also to note.. I'm inside a movie clip. Not sure if that makes any difference.

Thanks alot!

Button [ ] On Click Goto Frame 2 [X] Movieclip X Mark Button
Ok I have a movie clip first frame looks like this [ ] second frame looks like this [X] I want to apply action script to it that says on press goto frame 2. Then another that says if on frame 2 go back to frame 1! But I'm kind of lost here I don't how to make this happen!

Goto A Button Frame?
hi everyone!

does anyone know how to make a button load up on its 'over' state and stay there until the user moves the mouse back over the button?

thanks

Button To Go To Frame Label
Hi all,

trying to get the movie to move to a frame according to it's label (label is 'contact')with:

gotoAndStop("contact");

but it is not working. Any ideas? fla is attached.

TIA,

joe

Button Wth Variable Goto Frame
Greetings. I am wanting to make a smart clip with a button in it. when the user clicks the button it takes them to a frame label. simple. but i need this to be a smart clip so that i can just enter the frame label into the clip parameters panel...and we're away laughing hopefully

Random Frame Goto On Button
I have a movie clip which I want I have placed inside another movie and it has an invisable button behind it which I want to act as a random generator going to a frame from 2-20, how do I achieve this affect, what variable do I use? Any help would be greatly appreciated.

Matt

Button Mouse Over Goto Frame Ect
how do i make it so that when the person moves their mouse over a button, it moves to a certain frame in the main movie?

RollOver Button Goto Frame
Basically I've created several buttons with up, rollOver and rollOut functions following a tutorial.

As seen in scene1:
http://img88.imageshack.us/img88/1337/screen1ky5.jpg

Top button (movie clip) layers:
http://img222.imageshack.us/img222/4361/screen2nd9.jpg

Button (top layer in movie clip) actions:
http://img88.imageshack.us/img88/1082/screen3hc7.jpg

Now the functions work fine, but I want the buttons to goto a certain frame in scene 1 when clicked. Now I thought this would be pretty simple, so in the button ("hitarea") layer's actions I replaced the on press goto "down", with:

on (press) {
gotoAndPlay("Scene 1", 70);
}

(70 being the frame I wanted it to goto)

But this did nothing. I can make the button goto a certain url perfectly fine, but it wont goto a frame in scene 1.

I've read a few things with "root" in the actions, presumably to make the button action root to the original scene? But I have no idea how to make this work.

Help would be greatly appreciated

Click Button - Goto Frame 2
Never mind, I got it!

knop.addEventListener(MouseEvent.CLICK, onClick);

function onClick(event:MouseEvent):void
{gotoAndPlay(2)
// put something here that will happen when the button is clicked.
}

---------------------
Hi guys!

I'm feeling kind of stupid - got the new Flash version with AS3.0 and suddenly I don't know anything about Actionscript anymore.

I'm making a file with just two frames; in frame 1 there is a button. When you click it, it should take you to frame 2.
I understand that code in AS3.0 is being added to the timeline and not to the button itself, but still I can't figure it out.

Can anybody please help me write the right code for this easy action?
Many, many thanks in advance...!

Ingrid

Button Goto Frame On Parent MC
I think this is an easy one, but I'm just a little uncertain as to how it's done.
Any help would be appreciated:

Making a flash website.

I have a parent MC with all my content called GUI_MC, and on my timeline I have a Frame labelled "PAGE"

Within the GUI_MC I have a another MC for my navigation (NAV_MC)

In NAV_MC I have a button which I would like to gotoAndPlay the frame "Page" on the GUI_MC

Heres my button code:

on (release){
gotoAndPlay("PAGE");}

What do I need to add to make it goto the parent MC?.

Jumping To Frame Label Before Playing Desired Frame Label.
Hi, I'm new to flash as of a couple months ago. I made a project and I have a frame label that is an outro for the frame label(s) before it. I want this outro to play when the user clicks a button on my menu. Right now, when the button is pressed, it jumps directly to that frame label. Is there a way I can make a specific outro (that will change depending on the current frame label) to play before the frame label that the button calls on plays? This is probably confusing.

this is the actionscript i have so far, which is simply calling on the right frame label:
}
this.btn_home.onRelease = function(){
gotoAndPlay("home");
}

what i want to do is tell it to figure out which label its currently on, then play the outro label, then go to "home" and play that. is this possible? thanks.

Advancing From Frame Label To Frame Label Using Time Variables
I need to understand how i can advance from a frame labeled "menu" to another frame labeled "submenu", using seconds.

For example, "menu" is on frame# 1 and "submenu" is on frame# 20. I want a 15 second interval between each frame label without making it really big in frames.

I want to make my demo to be simple to edit if I have to give people a longer time to view each slide.

Button Click To Frame Label
I used to have absolutely no problem with this in Actionscript 2 but Actionscript 3 seems to be getting the better of me.

Can someone let me know what is the best (or the only way) to get a button in actionscript 3 to when clicked (released) jump to a specified frame label. I've seen a fair amount of little tutorials out there that can tell you how to link to a URL but not within the flash file itself.

I would appreciate any feedback you guys have on this particular topic because actionscript 3 is just not sitting well with me at the moment.

- Thanks

Frame Label Button Code
How do I code a button that makes you go to a certain frame label?

How Would I Link A Frame Label To A Button?
Hello there,

I am currently in need of some advice on how to link a frame label to a button. Because at the moment my links aren't working, but I need to know a code so that the button would be able to be a link.

Thank you.

Button To External SWF Frame Label
Hi there,

I don’t get much luck with forums so I am hoping someone will be able to help. I have a scroll menu as a ScrollPane component with menu buttons which take the user to a spacific frame lable within an external SWF (which is loaded form a main SWF already) My code for the botton is:

on (release){
_root.badges.gotoAndPlay("executive");
}

badges is the SWF name loaded as external SWF from a main stage (call this main.SWF) where the menu sits as well. "executive" is the frame label I want the timeline of badges.SWF to go to when you click the button, but this does not work?

It was working when I have this on another flash file. I recently had to move this into another flash file its still the same setup as in the other flash file, there is a loader clip and menu on the main timeline of my main.SWF and all it has to do is go to a specific frame label within the loaded external SWF from the main timeline of the main SWF.

Hope this makes sense. Cheers.

How Would I Link A Frame Label To A Button?
Hello there,

I am currently in need of some advice on how to link a frame label to a button. Because at the moment my links aren't working, but I need to know a code so that the button would be able to be a link.

Thank you.

Frame Label Inside Button
Hello

I've done a search and I can't believe no one else has had this problem but here goes:

I have a button (instance name "btn1"). Inside the button in the "over" state I gave it a frame label called "over". Then ON the button I put


ActionScript Code:
on(release) {
_root.btn1.gotoAndStop("over");
}


This does not work. I want my button (not MC) to stay on in it's over state when clicked

PS-that script is on my button with the frame label inside of it. The button's instance name is "btn1"

Cheers
Sandman9

Button In MC Won't GoTo Play Frame In Scene
i am fumbling my way through scripting and need help.
I have a button in a movie clip, which is in another movie clip, which is on a layer in my scene. I want that button to go to and play a frame in that scene.

going to that button in the first movie clip and telling it to GoTo and play frame 15 isn't working. I have tried telling it both "curent scene" and the scene's name.

is there some sort of scripting that I need to know to get the movie clip's buttons to control the scene?

-josh

Button Needs To Goto A Frame And Specify Scrolling Content
I need my button that is contained in a movie clip to, once clicked, jump to frame (of main timeline not movieclip) 85 and also tell the controller to move my scrolling content to a specific section, five buttons at the bottom normally controll the scrolling content so this button is in effect jumping to the content frame(85) and fast forwarding to a specific section rather then jumpin to 85 then waitin for the user to select one of the five buttons.

This is the code i'm usin it jumps to 85 but wont move the scrolling content.

on(release){_root.gotoAndStop(85);

_root.controller1.targXpos2=-150;
}

The scrolling content example that i am using is attached. Just imagine there is three of these scrollin bars set 10 frames apart and there is a button that trys to load the second of these scrolling bars say on (85) and section 3 all at once.

Is is possible thanks guys.

Goto Frame In Main Scene From Button In MC
I have a scene

-In which there is a MC

-In which there are buttons.

When hit i would like my buttons to go to and stop on a frame in the main scene.

I have got

on (release){
gotoAndStop (Frame);
}

But I relise this will have to be a frame in the MC how do i get it to refer to the frames in the main scene???

Thanks in Advance

Goto Frame X Of Swf1 From Button Of Swf2 - How?
First time i've ever needed to use this actionscript, but now I need it more than ever! I suspect it has been covered already, but after a desperate search I couldn't find it. Help is needed asap!

Extra info aside from the title - swf1 and swf2 are both loaded into swf3. Just needing the actionscript to communicate between the buttons in swf2 with swf1. Cheers for any help!

Copyright © 2005-08 www.BigResource.com, All rights reserved