PDA

View Full Version : Button within a movie clip not linking to Frame Label?


tinychicken
12-04-2000, 07:25 PM
I have created a menu that is an animated movie clip within Scene 1. I have created several buttons on the menu. I am trying to link those buttons to frame labels which are also in Scene 1. I am using the following actions with Flash 5.

on (release) {
gotoAndPlay ("Scene 1", "Home");
}
This is doing nothing but closing my menu. Is there a trick to allowing buttons within movie clips to include these actions? (telltarget?) Please let me know ASAP if you have any answers.

Jesse
12-04-2000, 11:36 PM
Yeah, because you're referencing from within a movie clip you must use a full path, so try:

on (release) {
_root.gotoAndPlay ("Scene 1", "Home");
}

Cheers

Jesse

tinychicken
12-05-2000, 06:56 AM
For some reason the full path is still not giving me the results I want. As a matter of fact it isn't doing anything. Is the action script

on (release) {
_root.gotoAndPlay ("Scene 1", "Home");
}


only good if referring to another named movieclip or can it refer to a frame label such as above? Just trying to learn!

Jesse
12-05-2000, 10:04 AM
_root is a property defining the basis of a call. It's like C:\ in DOS. You can use root for many purposes. In Flash 5 you reference files using their path with dots in between. For istnace if you have a MC on your stage called 'a' and inside it is a clip called 'b' and you want to tell the 'b' clip to goto and play a certain frame you use:

_root.a.b.gotoAndPlay ();

etc, etc

Yes, you can send me your .fla and I'll take a look. [email protected]

Cheers

Jesse

limpduck
12-11-2000, 12:43 PM
ive got some bad news the way your takling this is wrong as you know because it dont work and it wont. basicly because flash wont do buttons within movie clips that look for frame actions, the hit area of the button has to be on the main area of the movie screen. i hoped this problem would be resolved for flash 5 but it aint.
basiclly the way around this would be to place every thing on the main movie screen in a movie clip. and do a tell target fuction from the button. but i havent had much luck with this either in flash 5.

Jesse
12-11-2000, 10:48 PM
No limpduck, he sent me his source and I fixed it using Tell Target. No problems.

Cheers

Jesse

limpduck
12-12-2000, 10:36 AM
well i did say the only way to do it would be with tell target.

elquent
03-30-2005, 11:00 PM
Kudos for your service Jesse! You rock!

I was combing through these and need to suggest something. I know it's an old posting, but there are newbies looking into this.

//The suggestion of setting the target to ("Scene", "Home"); isn't all correct. True, the script should read the following without "Scene".

on (release) {
_root.gotAndPlay ("Home");
}

The frame name should sit alone. If the MC is in Scene 1, then the target is already directed to this level.

OVER AND OUT

ELQUENT

limpduck
03-31-2005, 07:57 AM
wow dude this post is like 5 years old (ok maybe just over 4) :eek: geeees im getting old :rolleyes:

dreamrrr
12-13-2005, 03:23 AM
im having the same problem. i have 5 buttons on one frame in the main timeline. those buttons link to certain single frames (with labels) that have a movieclip ontop of them, one each. so, for example, frame 50 has a movieclip over it, and a stop action, frame 51 has a different movieclip on it, as well as a stop action. so, im simply using buttons from the main timeline (not nested in a movieclip) to link to certain single frames with movieclips in them. for some reason, it will go to that frame fine, but then, from that frame, if i click the same button again, it just goes to the frame beside it. like, lets say, im on frame 49, the main area, and theres my buttons at the bottom left, if i click "comapny" it will go to frame 50, labeled "company", and have a movieclip play, then if i'm on that frame, if i click the company button again, it will just go to frame 51 (which is another labeled frame with a movieclip in it). any ideas what the problem is? this is my actionscript for the buttons on the main timeline....

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

and so on

PLEASE HELP.:eek:

Krome
01-16-2008, 12:25 PM
Hi,

I have 2 MovieClips on my main time line.

Movie1 which is on layer1 frame1

and

Movie2 which is on layer2 frame2.

In Movie1 there is a button.

When I test the movie I want to be able to click the button and the playhead jump to movie2 and start playing....thats it.

I have tried frame labels....tell target commands,goto root commands etc etc and everything else on the forums....but I cannot get this to work and am comtemPlating giving up with flash - Coz if i cant work what i think is a basic function..there is no point carrying on....

Some-one kindly posted me a fla. movie to to help but it won't open in flash and causes the application to quit straight away....


If you are a flash genius...please hit me up....

atomic
01-16-2008, 02:12 PM
Can you attach your own .fla?

voodoo465
07-31-2008, 01:46 PM
Hello,

I am having a similar problem as he is having, I tried your suggestions but doesn't seem to be working correctly.

Basically I have a drop down menu with about 20 buttons on it. I want each button to link to a different frame inside a Movie Clip on the stage.

The best I can get it to do is play the first frame of that particulaar movie clip.

Any suggestions? Thanksss for your help

atomic
07-31-2008, 03:02 PM
Attach your .fla to this forum....

It needs to be zipped up before you can attach it.