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




Trouble With Buttons Inside Movie Clips



I made a movie clip with a button inside of it. I want to use the "goto" action to progress to a different scene when clicked. Unfortunately, it isn't working. I tried to put the actions on both the movie clip and the button inside. Any suggestions?

bulldog



FlashKit > Flash Help > Flash MX
Posted on: 08-04-2002, 10:39 PM


View Complete Forum Thread with Replies

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

Trouble Getting Buttons Inside Movie Clips To Work
i've made some animated dropdown menus for the navigation bar on a site i'm working on, but can't get the links inside the dropdown menu (which is a movie clip) to work. i've used the simple gotoandplay script, and i think i need to tell it to leave the movie clip and return to scene one, but can't find it in my flash book or in the help section of the program. how can i make it work?

Trouble Instatiating Multidimensional Array Of Movie Clips From Inside Of A Class
I am trying to set up a script that will generate a matrix repeating the same symbol X by Y times. For example, b(3,2); should generate...

OOO
OOO

...and after many days of being tested by this problem I have narrowed the location of my problem down to what can be seen up in the following.


Code:
for (a=0; a<4; a++){
for (b=0; b<4; b++){
var z:Number = ((a*4)+b);
_root.attachMovie("Light", ("L" + z), _root.getNextHightestDepth(), {_x:(a*45), _y:(b*45)});
}
}
For some reason, that loop will only attach one copy of my "Light" movie. I cannot seem to figure out why more are not added. I am putting that code on the first frame of my movie. There is nothing else in my project yet.

I have compared my array to http://www.kirupa.com/developer/acti...ays_attach.htm but I am still unable to find the problem. Any help is greatly appreciated.

ActionScript In Buttons To Reference Movie Clips Inside Buttons
I want to reference a movie clip inside a button, to use tell target on the button. Is there a way to use something like:

tellTarget (this.movieclipname) {
}

that way i can use multiple instances of one object, rather then having to make a different action for every single time i want to use it.

Buttons Inside Movie Clips Inside Buttons Inside Movie Clips
Hi I'm having super trouble with a website I am trying to make. I have a really complicated navigation system with a top bar that is a movie clip which contains a button. Inside the button on the OVER phase is another movie clip, which has animations and stuff and generates yet another button inside it.
The major problem I am having is when writing the code, it doesn't recognise the movie clip in the OVER phase. Is there something else I have to write in the code to acknowledge it is OVER rather than UP? I've wasted so much time with this already.

Thanks heaps.

Trouble Controlling Two Different Movie Clips With 2 Different Buttons
I am somewhat new to flash and am having some trouble trying to control two different movie clips with two different buttons. Currently when either one of the buttons is pressed both movie clips start to play. How can I set file up so that if button 1 is pressed movie clip 1 will play and if button 2 is pressed movie clip 2 will play. Any help is much appreciated.

Buttons Inside Movie Clips>>
so i've got a draggable m/c with buttons within it, and those buttons within set this m/c to a certain x/y coordinate on release. but i also need this button thingy within the m/c to go to a frame label on the main stage (same scene). its not working! the x/y portion of the script works fine, just not the goto portion.
any ideas?? thanks.

Buttons Inside Of Movie Clips?
I have created a movie clip which has four buttons inside..I cant get the buttons to do anything. when I edit them it wont let me put in any scripts...
what am I doing wrong?

Buttons Inside A Movie Clips
I've created a button that contains a movie clip on the 'over' stage, that movie clip also contains a button, does flash allow me to do this?

Buttons Inside Movie Clips
How can I make button inside a movie clip go to another part in the movie clip, dumb question but I need to know, thanks

Buttons Inside Movie Clips?
I want to get buttons inside a movie clip to do mouse events. I tried placing the actions on the buttons inside the movie clip but once i put the movie clip into a scene the buttons won't work.
WHAT AM I DOING WRONG?!?!?!?!

Buttons Inside Movie Clips
-to start i make an action script layer and tell it to stop on the first frame

-then I insert a second scene,make an image on one layer ,and make an action script layer that tells it to stop

-Next I make a simple button

-then I make a movie clip. I put the simple button into the movie clip, enable simple buttons and assign the following script to the button

on (release) {
gotoAndPlay ("Scene 2", 1);
}



-finally I put the movie clip into the first scene



what I am trying to do is make a toolbar that can move be clicked on to go another part of the script then go back the the same point without having to use Html. I have flash 5 and MX so if you know of another way of doing this please tell me. It's allright if it involves HTML I was just trying to stay away from it.

Buttons Inside Movie Clips
I am relatively new to Flash MX and have hit a problem with nested buttons. In order to manipulate the visibility of a button, I have nested it in a movie clip. The problem is when I attach a gotoAndPlay action to the button inside the clip, it is not doing anything when I test the movie, even though I have used the frame label in the action. I am wondering whether I am getting confused about which layer is which and the correct path to put in the gotoAndPlay action. Or, perhaps there is an easier way to have control over visibility of buttons which won't require nesting? Can anyone help me with the correct script? It is important that the frame be printable as well, with all of those elements with visibility set to false not showing up in the printout.

Buttons Inside Movie Clips
In my site there are several movie clips that are just filled with links. I had to make them movie clips so that I would be able to scroll and mask them. However, the links need to control the main movie. This is probably really simple but I've been working on this for so long now my brain is fried and I need a boost. If I have a button inside of a movie clip, how do I use it to control the frames in the main scene?

This is all I've tried:

on (press) {
gotoAndPlay ("main", "frame2");
}

(I'm using frame labels.)

Thanks,
Cheese

Buttons Inside Movie Clips
im creating a demo site for a record company and on the main page i have differant buttons that should go to differant parts in the movie (and if i can get that working differant movies altogether.) The buttons are all inside movie clips to look fancy but they wont work. ive tried simple gotoandplay commands and getroot commands. i apologize if this sounds confusing. think it'd help if i used MX?

Buttons Inside Movie Clips
Hello all,
I have a square (movie clip) that is draggable and can be thrown to bounce off the walls. I want to have some buttons and text fields in the square. Is there any code for this or a way that I can link
a button or graphic to follow the movie clip? Hopefully I make sense.
Thanks in advance.

Buttons Inside Movie Clips...
hello, i have this problem...
my file has 5 scenes... in the main scene I created a movie clip, wich has 3 buttons inside, i want that those buttons when i press them take me to other scenes.

I tried with the regular command

on (release) {
gotoAndPlay("scene", 1);
}

but this command is used for buttons that are outside a movie clip. They are directly on the main timeline.

pleaseeeeeeeeeeeee respond meeeeeeeeeeeee someone!!!
thanks

pachu

Buttons Inside Movie Clips
Hey all,
Quick question. I have a movie clip that is a drop down menu, and the buttons are to go to different scenes in the main timeline. My problem is getting the buttons to go to the scene I want. I can get it to start playing the main timeline from the start but I want a specific scene. I THOUGHT the code would be
on (release) {
_root.thesceneiwant.gotoAndPlay(1);
}
Doesn't work though. If I use
on (release) {
_root.gotoAndPlay(1);
}
it works but it starts at the beginning of the movie. Any suggestions? TIA!

Buttons Inside Movie Clips
Hi,
I am trying to make my navigation menu work. I have created a blue bar which moves horizontally towards each button as you roll over it, it is all in a movie clip. The problem is linking, I have the button inside the movie clip but cant seem make it so when you click on the button it goes back to the main scene, I can get it to link to a frame that is inside the same movie clip, but cant seem to get it back out. I am not very experienced in action script so any help would be much appreciated. Thanks

Chris.

Buttons Inside Of Movie Clips?
I have a menu that is a movie clip that slides in from the left. My problem is that the buttons inside the menu are not active. If anyone knows how to make buttons inside of movie clips work, It would be amazing. The buttons are used to change the content inside a scrollPane, using the code


Code:
this.ScrollPane_mc.contentPath = "content.swf";


Thanks in advance for any help!

Buttons Inside Movie Clips?
How do I assign commands to buttons that are located inside a movie clip? None of the on(rollOver), on (Release), etc. commands seem to work.

Buttons Inside Movie Clips
I hope someone out there can help me out.....

I'm creating a website using Flash CS3 & Action script 3.0. I was wondering if someone could help with out with how I can create a button inside a movie clip. I current have a movie clip which slides buttons across the screen, from one side to the other. Once the movie clip reaches the other side of the screen I want the buttons to be able to jump to a different label/frame.

Can someone please help me out?

Thanks,
Alan

Buttons Inside Movie Clips
Good day All,

I'm currently creating a website in FLASH CS3 using ACTIONSCRIPT 3.0.

On my main timeline I have several buttons which direct you to different frames using the following code:

function onGD_WB_butClick(evt:MouseEvent):void {
gotoAndPlay("Web Solutions");
}
GD_WB_but.addEventListener(MouseEvent.CLICK, onGD_WB_butClick);

with GD_WB being my button.

I have one button on the main timeline that sends you to a frame which plays a MOVIE CLIP and inside that movie clip I have a buttons. What I need help on is making the buttons inside the movie clip once clicked on will send you to a frame on the Main timeline. I have the frames all labelled.

can anyone help me out by providing me with Actionscript 3.0 script or refer me to a tutorial?

I would appreciate any help or advise you could provide me.

Thanks in advance,
Alan

Buttons Inside Movie Clips
Hey, I'm a new flash MX user (been learning it for the past few months) and I'm having some trouble with my actionscripts for buttons inside movie clips.
Here's the issue: I have a button nested inside a movieclip, which is nested inside another movieclip. I am using the following code for the button:

on (release) {
_root.gotoAndPlay("home");
}

I want the button to go to the frame labeled "home" inside the main timeline. But for some reason, with this script, you have to click on the button TWICE for the movie to go to "home". When you click on it once, it does nothing. Does anyone know why this is happening? I would appreciate any assistance you can give.

Thanks in advance!!!

Buttons Inside Movie Clips
i have a movie clip, wich contains several buttons. I treated the buttons has usual and added the following script:

on (release) {
gotoAndStop("Inicio",15);
}

i tought this would work, but it doesn't.. everything works ecept that it doesn't move to the frame i pointed(or any frame at all). Is there any limitation with using buttons inside movieclips? how do I solve this.

Movie Clips Inside Buttons
Hi,

I have animated clips of characters talking inside a button so that when the user rolls over it, the animated head of the character talks. Sometimes when I test it, the sound comes on when rolling over the button but the animation does not play or sometimes I hear the audio start again over top the other one. Are there settings that need adjusting for the movie clip and the audio?

Buttons Inside Movie Clips...HELP
I have a flash piece that I am working on, and it has a total of 6 scenes. I have simple arrows that let you navagate from screne to scene, but I also have a jump to menu that appears as well. THe jump to menu is a movie that I made and put into each timeline of each scene. Now the roll overs of the buttons for the pop up menu work fine. But what I can't get to work is the action scripting, I just want each button to go to that scene and play. I think I have to use the root. to make this work but I'm not really sure. Any help would be great!
Thanks

Help With Buttons Inside Movie Clips
I've been following some tutorials to create simple rollover drop down menus and a scroll bar without buttons (http://www.flashkit.com/tutorials/In...909/index.php). The problem I'm running into is that for some reason buttons within the movie clips won't react to the normal onReleasegoto stuff or any action within the flash file, it will only function to get URL.

Any help would be greatly appreciated.

Thanks
Holden

Buttons Inside Movie Clips
Hey, I've got a scrolling thumbnail movie clip.

Inside the movie clip are 5 buttons.

I can't get the buttons to work.

I know to put the actionscript(2.0) ON the button and not IN the button.

The sripting is a simple on press gotoandplay frame# command.

yet it won't work.

Is there something specific I'm missing when putting buttons inside a movie clip?

Buttons Inside Movie Clips....HELP
I have two movie clips with buttons inside them. I'm trying to get the two buttons to jump to a frame on the main timeline.

I used the following code on the first button:


Code:
this.onEnterFrame = function() {
choose_statement.Through_Btn.onRelease = function() {
_root.gotoAndStop("page03a");
};
};
It works fine.

I tried using the same code on the second movie clip and button and it doesn't work.


Code:
this.onEnterFrame = function() {
Plan_Name.inland_btn.onRelease = function() {
_root.gotoAndStop("page03b");
};
};
The second button and movie clip show up 20 frames AFTER the first button and movie clip.
I double checked all spellings and instance names and nothing!

Any help would be greatly appreciated. FYI the flash file is built in AS2.

Thanks,

Ezi

Buttons Inside Movie Clips...HELP
I have a flash piece that I am working on, and it has a total of 6 scenes. I have simple arrows that let you navagate from screne to scene, but I also have a jump to menu that appears as well. THe jump to menu is a movie that I made and put into each timeline of each scene. Now the roll overs of the buttons for the pop up menu work fine. But what I can't get to work is the action scripting, I just want each button to go to that scene and play. I think I have to use the root. to make this work but I'm not really sure. Any help would be great!
Thanks

Targeting Movie Clips From Buttons Inside Mc's
I have a movie clip in SCENE 1. The movie clip contains a button. I want to use that button to target a movie clip on SCENE 3?
Or from that same button (in the movie clip, which I use to rotate the buttons on stage)in SCENE 1, how do I target a frame in SCENE 3?
I think the changing of scenes is crossing me up.
Thanks
Anthony

Buttons Not Working Inside Movie Clips
Hey

I'm in the process of creating a Flash banner for my site, and I have a problem. When I put a button (one that links to a particular page) INSIDE a movie clip it works fine, but when I add a behavior to that movie clip, the buttons inside dont work anymore. Any help?

Thanks

Can You Make Buttons Inside Of Movie Clips?
i have a movie clip and inside of it i have several buttons on different layers but when i assign an action to each button it gets screwed up and one action applies to all the other buttons, etc. needless to say, when i publish the movie the buttons dont show up. am i doing something wrong????

i admit i dont use flash on a daily basis but wtf?

[MX] Problem With Buttons Inside Movie Clips. Please Help
I have 2 frames in my main timeline. The first has a movie clip in it. The movie clip has several frames. In the first frame of my movie clip, there is a button, and I want that button, when clicked, to go to the second frame in my main timeline, but every time I try it just goes to the second frame of my movie clip. There's probably something really obvious I'm not doing. Sorry. I just know basic actionscript. Please help! This flash is for a class and it's due tomorrow. Thanks!

Help Needed With Buttons Inside Movie Clips
I have the following problem.

I have two movie clips on the root timeline. Let's say the movie clips are called "myself" and "family" . Inside each of these clips there is a button with a name corresponding to the name of the other clip. Supposedly, when clip "myself" is played, the user sees the button with the text "family" on it and click on that button, which makes the playhead of the root timeline jump and stop in the frame (on the root timeline) where the clip "family" is located. Now the user can jump back to clip "myself" if he hits the "myself" button which is inside the "family" clip. In short, one can jump back and forth between the two movie clips with the help of those buttons.

Nothing below has worked for me:

1) on (release) {

gotoAndPlay(_root.family);

}


2) on (release) {

loadMovieNum("_root.family", 0);

}


3) on (release) {

_root.myself.family.onRelease = function () {

gotoAndPlay("_root.Family");

};

}


Where is my mistake? I know there should be a way to use _target , right??? Any ideas? Please help to get this thing to work!

Thanks guys.

Linking Buttons Inside Movie Clips
hello. i am trying to link some buttons inside my movie clip to go to another scene at a certain frame (that is labeled) when i test the movie the buttons are not working. can some help me.... i am new, also - do not understand actionscript very well.

this is what i have currently assigned to the button and it is not workig.

on (release) {
_root;
gotoAndStop("portfolio", "cas");
}

thanks.

Using RollOut On Movie Clips W/Buttons Inside
Hi there, I was hoping someone here could help with a problem of mine. I'm using Flash MX 2004.

So far I've been using invisible buttons to simulate a menu disappearing, but I've found that it has its flaws and I'd rather use a rollOut method instead.

Here's my dilema: In my main timeline, I have a series of buttons. When you roll your mouse over each, they send you to their respective frame later in the timeline for each different menu. The menus have buttons inside that lead to different webpages.

The unselected buttons use the code:


Code:
on (rollOver) {
gotoAndStop(20);
}
To achieve the rollOut effect I've used (on the menu itself, a movie clip, in the main timeline):


Code:
on (rollOut) {
this._parent.gotoAndStop(1)
}
This works great, although there's one problem. The menu now acts as a giant button and I cannot select any of the button entries inside.

Thanks for reading,
A solution would be very appreciated!

Buttons/links Inside Of Movie Clips
sorry, but i'm actionscript challenged and it's been a LONG day...

i have a button inside of a movie clip, and when you click the button, it's supposed to go to another scene. i tried using the gotoAndPlay (scene, frame) option, but it didn't work for obvious reasons.

is there something i'm supposed to put infront of gotoAndPlay?

HitTest Fun: Trouble Getting Buttons To Work In Clickable Movie Clips
hey everyone,

i've got a button inside of a clickable movie clip that i can't get to work and it's driving me nutz.

can anyone take a look at it and find out why the button housed in the MC isn't working?

please see the FLA attached.

Buttons & Movie Clips Inside Scroll Panes
Hi. im new to flash. well, im intermediate.

i built a scroll pane that contains a movieclip with lots of buttons.

myScrollpane is my instance name of the scroll pane

myScrollpane contains thumbnail_mc - a movie clip that consists of about 50 buttons in a long strip.

I want each of these 50 buttons to load an external .swf

i want to them to load the external .swf into a blank, empty movie clip called targetMovieholder_mc

i have created a "test" .fla to test it - i call this .fla "scrolltest.fla"

if i use this AS on the buttons inside thumbnail_mc -
it loads the movie, but not in the desired targetMovieholder_mc
on (press) {
loadMovieNum("external-swf-location.sfw",2);}

I do want to use levels so that the external .swf will play on top of my main 'template' site
and since it is not loading into targetMovieholder_mc - the movie doesn't play in the right location. it registers to upper left.

however - if i use this AS on the buttons in thumbnail_mc - NOTHING happens
on (press){
targetMovieholder_mc.loadMovie("external-swf-location.swf",2);}

its like loadMovieNum works, but loadMovie does NOT work.

and to top it off - loadMovieNum works in my "scrolltest.fla" == but not my real-deal project that i WANT it to work in.

i have tried importing the .swfs and controlling internally - but i cannot import the .swfs either.

is my syntax wrong -??-
what am i doing wrong here? this cant be that hard?!?!

thanks
ellare

Buttons & Movie Clips Inside Scroll Panes
Hi. im new to flash. well, im intermediate.

i built a scroll pane that contains a movieclip with lots of buttons.

myScrollpane is my instance name of the scroll pane

myScrollpane contains thumbnail_mc - a movie clip that consists of about 50 buttons in a long strip.

I want each of these 50 buttons to load an external .swf

i want to them to load the external .swf into a blank, empty movie clip called targetMovieholder_mc

i have created a "test" .fla to test it - i call this .fla "scrolltest.fla"

if i use this AS on the buttons inside thumbnail_mc -
it loads the movie, but not in the desired targetMovieholder_mc
on (press) {
loadMovieNum("external-swf-location.sfw",2);}

I do want to use levels so that the external .swf will play on top of my main 'template' site
and since it is not loading into targetMovieholder_mc - the movie doesn't play in the right location. it registers to upper left.

however - if i use this AS on the buttons in thumbnail_mc - NOTHING happens
on (press){
targetMovieholder_mc.loadMovie("external-swf-location.swf",2);}

its like loadMovieNum works, but loadMovie does NOT work.

and to top it off - loadMovieNum works in my "scrolltest.fla" == but not my real-deal project that i WANT it to work in.

i have tried importing the .swfs and controlling internally - but i cannot import the .swfs either.

is my syntax wrong -??-
what am i doing wrong here? this cant be that hard?!?!

thanks
ellare

Accessing To The X And Y Coordinates Of Movie Clips Inside Of Other Movie Clips
lets say I have a movie clip with an instance name of "char" and another movie clip inside it with an inctance name of "ball" and when I try this I get zero:

_root.char.ball

why?

thanks in advance because you flashkit users know everything about flash in and out.

Movie Clips Inside Move Clips. How To Control?
I have an object in this case a foot with toes on it. the toes animate as well as the whole foot moving with the nails on it. I have instance names assigned for all the mc's problem is that the toes are buried about 3 layers down inside the foot_mc so they will move with the foot as well. When I assign a function to them the error compiler does not know where the nails are . What is the best way to fix or re-do this layout?

I am a total newbie to Flash and AS3, so any help would be great


I FIGURED IT OUT.

Problem With Buttons Inside Movies Clips
Here's a link to what I'm working on.
http://www.chohoh.com/modproductions/modprod2.html

I cannot get the button inside the movie to work.
Can you put a button inside a movie?
Any suggestions?

Buttons Inside MC Clips With Button Events
I have a MC clip with the following actionscripts:

on(rollOver) {
trace('hi');
}

on(rollOut) {
trace('bye');
}

Inside my movie clip, I have a button with the following actionscript:

on(release) {
trace("it's me");
}

I can't get "it's me" to fire when I have the events on the outer movie clip. If I take the events of the movie clip, it work perfectly.

Is there a way to make the button fire?

Thanks!

Lacy

Behavior On Buttons Inside A Movie Clip Inside A Button.
I would like t create an animated button with menu inside, how do i do it.

something like on here http://www.demarchelier.net

hidden menu on left side (contents) but on flash. I have flash 8. any tutorial that explain how to do that ?

Is It Ok To Duplicate Movie Clips Inside Movie Clips?
is it ok to duplicate movie clips inside movie clips? Seems to be a problem here...

Creating Movie Clips Inside Movie Clips
Hello,

I am having difficulties creating movie clips within other movie clips. The following works to create a movie clip on stage with no problems...


Code:
//Create movie clip and load image into it
_level0.createEmptyMovieClip("tn1",this.getnextHighestDepth());
mcl.loadClip(String(albums[0].photos[0].image),"tn1");
However, I want these movie clips inside another movie clip (mcPics1). For this I attempt...


Code:
mcPics1.createEmptyMovieClip("tn2",this.getnextHighestDepth());
mcl.loadClip(String(albums[0].photos[0].image),"myPics1.tn2");
Can anyone tell me where I have went wrong?

Thanks!

Targeting Movie Clips Inside Of Movie Clips
I am a AS3 newbie and am working on an animated cell phone text demo for my company's web site. I have three phones, each are a movie clip with a time line animation. The three phones are all inside of another movie clip where I animate their intro. I have a stop on the first frame of each of the three cell phones so that their screens are static as they fall into place. Their animations begin on the second frame of each of their respective time lines, and I would like the animations to begin when the phones are clicked. I'm not sure if these clips should be targeted from the main time line with the rest of the global script or if it should be on the time line of the nested MC. Even if I knew where to put it, I'm not really sure exactly what the script should be. Please help! My boss wanted this done last week!!!

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