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




Buttons Inside Animated Movieclips Not Working



Hi Guys,This is my first post although I have been browsing for a long time and getting lots of help from here - thanks!What I am making is an animated menu panel (movieclip) with about 4 buttons inside it (as movieclips)I know the reason the buttons are not responding to my script because the movieclip they are in is animated. (I tested this with a static version and the button script works)How can I make the buttons inside the animated movieclip work is my big question!?Here is part of my code (the revelant bit) on 1st frame of Root:
Code:
// Menu animation script:this.menu_mc.onRollOver=function(){ menuTween(mx.transitions.easing.Strong.easeOut); _root.menu_mc.useHandCursor = false;}this.menu_mc.onRollOut=function(){ menuTweenReturn(mx.transitions.easing.Strong.easeOut);}//Button within menu_mc script:this.menu_mc.but_goddess.onRelease=function(){ _root.galleryLoader_mc.loadMovie("goddess.swf");}
Please help!!btw I am using Flash cs3 with AS2 codeThanks in advance



KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 02-17-2008, 06:37 PM


View Complete Forum Thread with Replies

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

Buttons Inside Movieclips Not Working
So. I have a splash page. I use a javascript code in my getURL to make the splash page, which contains a button, open my main page in a fixed size window. The main page has draggable movieclips that have buttons in them. (Well, right now only one has a button.) I used the exact same coding on this button with only a different url to open another new page with a photogallery, and it won't open at all. But if I place the button by itself on the main timeline (not nested in an MC) it will open, but not in a new window.

Anyone have any idea what's going on?

This is the link to the website zipped.

Buttons Inside Movieclips And Working With Parents?
Hello I am having some issues that I am sure is very common however I jus am not able to grasp onto what exactly I should do to fix this problem.

I have menus that scroll horizontally with mouseover to left and right and are de-activated when mouse off, there is a mask and stroke around the area so it knows when the mouse is present this stroke is also a movie clip.
This is in my code which you can see below, however the buttons inside there are not working?

I am sure this is due to needing a parent class maybe or creating instances for each button? just am unsure of what to do and could use some advice or code for the buttons to activate them any ideas? so my buttons are trapped inside this...


panel3.onRollOver = panel3Over;

function panel3Over() {
this.onEnterFrame = scrollPanel3;
delete this.onRollOver;
}

var d = stroke3.getBounds(_root);

function scrollPanel3() {
if(_xmouse<d.xMin || _xmouse>d.xMax || _ymouse<d.yMin || _ymouse>d.yMax) {
this.onRollOver = panel3Over;
delete this.onEnterFrame;
}

if(panel3._x >= 0) {
panel3._x = 0;
}

if(panel3._x <= -485) {
panel3._x = -485;
}

var xdist = _xmouse - 600;

panel3._x += Math.round(-xdist / 20);
}

Any ideas or solutions would be greatful...

Animated Buttons In Movieclips
How is it possible to embed an animated button within a scrolling movieclip (image changes position due to cursor location)?

Any ideas will recieve a great prize!!!

Animated Mouseover Buttons (as Movieclips)
I'm using AS3 with Flash CS4. I have three movieclips, all using buttonMode, which animates when the mouse is over the MC (MOUSE_OVER) and when the mouse leaves the MC (MOUSE_OUT), using listeners. Or in fact, when the cursor is over one MC the other two animates. My problem is that when i move the mouse cursor from one MC directly to another one, the MC's aren't done animating the MOUSE_OUT-animation before it starts to do the MOUSE_OVER-animation. Probably a recurring issue with an easy solution.

Is there a way to check what frame the MC's are currently at and then use an IF-statement to check what should happen next?
Or how am i suppose to approach this problem you think?

I'm sort of a Flash newbie, i've just taken some lynda.com courses. Hope you can help me solve my problem, thanks!





























Edited: 11/26/2008 at 07:13:41 AM by Juri Wadecki

MC Buttons Inside Animated MC?
I am trying to make a drop down menu and ran into a snag. Can you have animated MC buttons inside animated MCs? Here is what I'm working with, very simple, but I suppose there is something I'm doing wrong.

http://www.jbnight.com/help/menuhelp.zip

Animated Buttons Inside Movieclip, Roll Out Problems.
hey guys,

i have some buttons, they are inside a movie clip so when you roll over it plays the animation of the button then stops, and when you roll out it plays the rest of the animation.

it works, but if you roll over to quickly it doesnt play the rest of the animation and the buttons stay in the over state and a lot of them end up staying in the over state unless you go back to them.


does anyone know how to fix this problem.

heres my fla file if any one cud take a look and figure it out, id really appreciate it. thanks

Buttons Inside Movieclips
Hi, using FlashMX(6) here and i am having trouble with buttons inside movieclips. I have a basic dialog in the form of a MC that comes up with "ok" and "cancel" options. Within my Actionscript i have

EXAMPLE;

attachMovie("NewDialogue","myDialogue",2);

myDialog.OKButton.onRelease = function(){
myCode;
}

Here is the thing. It works perfectly fine when the dialog is called up from the main script (like above), either within a function or outside.
But when this dialog is attached via clicking on another button, the Dialog appears but the buttons not longer work when you click them.

EXAMPLE;

attachMovie("NewButton","Button",1);

CreateDialogueButton.onRelease = function(){
attachMovie("NewDialogue","myDialogue",2);
}

All i can think of it resorting to Hit-testing, but i would prefer to find out why my current method does not work.

Thanks for your time

irreal

Buttons Inside Movieclips
ok, so i'm making a site, for the links banner i have a movieclip that scrolls in a infinite loop. the banner is a single image and i'm using invisible buttons over the different parts for the links.

the problem is that even though i know the code on the buttons is correct, they just don't work. my guess is that it has something to do with the fact that the buttons are inside another movieclip. the movieclip the buttons are inside already have some code that uses the mouse (it's one of those deals where the position of the mouse over the movieclip determines the speed the movieclip moves at). i think that since the outer movieclip is already using the mouse, it's blocking the buttons inside it from getting recognized.

but that's just my guess. any help would be great.

thanks.

Buttons Inside Movieclips
Hello everybody....

I am relitivley new to Flash and using action script and I am having a problem getting the buttons in my menu to work.

I have a menu which slides in from the bottom when a invisible button is rolled over and slides out when you rollout of the menu, this works fine....

inside this movie clip I have 5 navigation buttons which fade in when the menu has slided out completely but the problem is they dont work....

I have tried putting the code on the keyframe of the mc when the menu is fully out and is in a static position and also inside the buttons themself but neither worked....


Code:
contact_btn.onRelease = function(){
getURL("http://google.co.uk");
}

Code:
on(release){
getURL("http://google.co.uk");
}
I can make working buttons on the main stage no problem but I am pulling my hair out trying to get buttons that are inside a movieclip to work, am I going about this the wrong way or have I missed something?

any help is greatly appreciated.

Buttons Inside Movieclips
I have a movieclip named blueHome...
in my first frame, I use the following code:

Code:
blueHome.useHandCursor = false;
blueHome.onRollOver = function () {
blueHome.gotoAndStop(2);
}
blueHome.onRollOut = function () {
blueHome.gotoAndStop(1);
}
in frame 2 of blueHome, I have 3 buttons that don't work (as in, when I rollOver them, the hand cursor does not appear, the buttons do not switch to the "Over" frame, and when I attempt to click on them, it doesnt work...
Why is this happening, and what can I do to make the buttons work?
I've tried moving the buttons outside the movieclip and into a frame just above it (so that when I rollOver the movieClip, it makes the buttons visible, and when I rollOut, it makes them invisible)...but the problem is, when I rollOver the buttons, then macromedia treats it as if I've rolled out from the movieClip...
are there any other options?

Buttons Inside Movieclips
I nested my footer buttons inside a movie clip so that I could align them all to the bottom of the stage without changing their distribution to one another. However, when I test my flash movie these buttons are not affected by a mouse rollover or when they are clicked. How can I get a button's down/over roll over effects to act from within a movieclip? I've attached the fla source so u can better understand my dilemma. All suggestions welcome n thanks in advance for the help!

Buttons Inside Movieclips
Hey fellas, I got a problem with this image scroller panel I made. It's made out of a movieclip, and inside there are 9 thumbnails, which all are buttons. Now my problem is that I don't know how to address the buttons inside my movieclip. I want to give the buttons inside my movieclip and action like, oprelease gotoandstop. Basically just jump to another frame in the timeline. THis is my code for the image panel scroller. It scrolls up and down depending on the mouse position inside the stroke. This is the code.


Code:
panel.addEventListener(MouseEvent.MOUSE_OVER, panelOver);

function panelOver(event:MouseEvent):void {
panel.removeEventListener(MouseEvent.MOUSE_OVER, panelOver);
panel.addEventListener(Event.ENTER_FRAME, scrollPanel);

}



var b:Rectangle = stroke.getBounds(this);

function scrollPanel(event:Event):void {
if(mouseX < b.left || mouseX > b.right || mouseY < b.top || mouseY > b.bottom) {
panel.removeEventListener(Event.ENTER_FRAME, scrollPanel);
panel.addEventListener(MouseEvent.MOUSE_OVER, panelOver);
}

if(panel.y > 617.6) {
panel.y = 617.6;
}
if(panel.y < 387.7) {
panel.y = 387.7;
}
var ydist = mouseY - stage.stageWidth / 2;
panel.y += -(ydist / 7);
}
Now this works fine, I have a problem however when I want to give the buttons INSIDE the MC an action. I want the project to jump to a certain frame on the timeline, when u click on a button. So i got the advice to add the following code to my actions.


Code:
/*--------------------------------------------------------------------------------------------------
mouse events will, by default, propagate down to the children of the movieclip "panel".
This script should work as is for an unlimited number of nested movieclips.
Weak reference is set to true in the event listener to improve GC performance.
--------------------------------------------------------------------------------------------------*/

panel.addEventListener(MouseEvent.CLICK, imgClick, false, 0, true);
var imgName:String = "";

function imgClick(e:MouseEvent):void {
imgName = event.target.name;
trace(imgName);
gotoAndStop(imgName);
/*--------------------------------------------------------------------------------------------------
This function sends the playhead to the frame label that matches the instance name of the event.target.
So, for example, if you click image "img1", the playhead will go to frame label "img1".
All you have to do to make this work is to name your frame labels accordingly.
--------------------------------------------------------------------------------------------------*/
}
So I added it, gave frames in my timeline a label name, matching the buttons instance name. So theoretically it should jump to the label on the timeline. However I get the following error.


Code:
1120: Access of undefined property event. source: name=target.event.name;
Does anyone know how to solve this? Thanks in advance!

Buttons Inside Movieclips
code on root timeline
stop();
var links = new Array("about", "closet", "contact", "links");
for (var i = 0; i<links.length; i++) {
link = links[i]
trace(links[i]);
_root[links[i]].item_button.onPress = function() {
trace(links)
trace(i)
trace(links[i])
trace(links[1])
};
}

i dont understand why this does not work.
the links array are movieclip names
and item_button is the button inside the movieclip names.
example about.item_button.

everything traces except when i try to access an array index using the variable i it returns undefined! but when i access an array hardcoding the number it returns the correct value. very akward...

Buttons Inside Movieclips
Hey fellas, I got a problem with this image scroller panel I made. It's made out of a movieclip, and inside there are 9 thumbnails, which all are buttons. Now my problem is that I don't know how to address the buttons inside my movieclip. I want to give the buttons inside my movieclip and action like, oprelease gotoandstop. Basically just jump to another frame in the timeline. THis is my code for the image panel scroller. It scrolls up and down depending on the mouse position inside the stroke.

panel.addEventListener(MouseEvent.MOUSE_OVER, panelOver);

function panelOver(event:MouseEvent):void {
panel.removeEventListener(MouseEvent.MOUSE_OVER, panelOver);
panel.addEventListener(Event.ENTER_FRAME, scrollPanel);

}



var b:Rectangle = stroke.getBounds(this);

function scrollPanel(event:Event):void {
if(mouseX < b.left || mouseX > b.right || mouseY < b.top || mouseY > b.bottom) {
panel.removeEventListener(Event.ENTER_FRAME, scrollPanel);
panel.addEventListener(MouseEvent.MOUSE_OVER, panelOver);
}

if(panel.y > 617.6) {
panel.y = 617.6;
}
if(panel.y < 387.7) {
panel.y = 387.7;
}
var ydist = mouseY - stage.stageWidth / 2;
panel.y += -(ydist / 7);
}

Can't Get Animated Buttons To Play Inside Of A MC When Swapdepth Code Is Attatched.
Hey all, I have this flash file with 5 MC's inside each of the MC's is a button the button on it's over state animates and increases in size so that it overlaps the other buttons.

this is the code that I have attatched to the MC's


Code:
on (press, rollOver) {
_root.zclothing.swapDepths(1);
_root.zclothing.Play();
}
this code is swapping the depths correctly I experimented and found the swap depth code is working correctly , but it's causing the buttons not to animate?

here's the link to the file if anyone can maybe help me out?

http://www.bestguttercleaning.com/gd01.fla

thanks,

Casey

I'm Lost: Two Buttons Inside An Animated Movie Clip On Roll Over?
So I'm a bit of a noob... be gentle.

I've designed this little navigation widget for my site.

It starts as a simple icon. When the user rolls over the area with the icon, I want two buttons to slide out, revealing the navigation to other areas of the site.

I made the animation a movie clip. And tried to set the clip to play on mouse over, and to reverse back to its off state when you roll off.

The animation seems to work... but my buttons don't work.

I'd really appreciate any help anyone could offer me here... I'm attaching the Flash project file.

FYI: I'm just planning on putting this little flash object inside a simple html page under an embedded quicktime movie.

Thanks.

ANIMATED BUTTONS WEB LINKS NOT WORKING
Hi, forum!
OK, I created the exact effect I want on my animated buttons. But no matter what I try, I can't get the text on my menus to link to another site.
Basically, my animation works as follows: On rollover, the menu button changes color and a dropdown menu of selections appears. I want those text selections to link to other sites/pages.
I think the problem is in how I created the text. I typed it out in the font I wanted, then saved it as a graphic, not a button. When I tried saving it as a button, I had the 4 UP OVER DOWN HIT stages to deal with, and those didn't jive with my animation. I'm not sure what to save my text menu selection as, to make this work, so that the font I use appears on anyone's screen, since it's not a standard one.
Anyway, my main button is a graphic symbol called "women," and the first submenu text is saved as a graphic symbol called "whatsnew," and the menu appears as "What's New" on the site. Here is my code, and I also attached my file. Thanks for any help! You guys rock! I finally got my ActionScript 3.0 book, but that'll take awhile to read and absorb.
TCmenubarbuttons.fla [ 929 KiB | Viewed 228 times ]

Getting Buttons To Work Inside Movieclips
I'm having troubles getting buttons to work inside of a movieclip - the clip is draggable, but buttons only affect actions within that clip and not the Stage.

So how for instance, would I get a button inside a movieclip, to change scenes via the Stage when clicked?

Any ideas would be appreciated. Thanks.

Buttons Inside Draggable Movieclips
Hey

This is probably really stupid but it's really puzzling me...

I have a movie clip which I can drag around but would like to have buttons and scrollbars in it... Obviously if I try and put them inside of the movieclip when I try and click them it's just the same as dragging it but on the other hand if I try and put them outside the movieclip they don't get dragged around with it.

What do I do

Any help would be fantastic
Thanks

Accessing Buttons Inside MovieClips
Hi

I have MovieClip menu and there are some buttons inside the MovieClip. Im trying to access the buttons and I want the code all together so I dont want to put the code inside the button.

However I dont seemed to be able to access it outside. Im using the code below.

myMovieClip.myButton.onRelease = function() {
trace("Hello");
};

Can some please help?

Buttons Inside Nested Movieclips
I have a movieclip (mc1) which consists of a mask and another movieclip (mc2). mc2 has 3 buttons. One code that I attached to one of the buttons (and which doens't work) is as follows:
on (release) {
getURL("http://science.nasa.gov/");
}
why doesn't that work?
mc1 has the following code:
on (rollOver) {stop();}
on (rollOut) {play();}
which works ok.

[Flash 8]Movieclips Inside Buttons
Hey Kirupa,

I'm working on a game right now, and I'm having a bit of trouble. I would like it to be if a certain Boolean, lets call it variable1 is equal to true, then Movieclip "disk" (which is located inside a button) goes to the next frame.

I set up the variable as such:


PHP Code:



var variable1:Boolean = false; 




I then set up a function:


PHP Code:



function checkDisk() {if (variable1 == false){mybutton.mymc.nextFrame();}} 




I put the function in an event handler, but when I tested it, and performed the action which sets variable1 equal to true, the disk stayed how it was.

I tested it on a movieclip not inside a button and it worked fine. Any suggestions?

Loading Scenes With Buttons Inside Movieclips
HY!
Ive made a movie where i have a main movie clip in my 1st scene. Then, inside this movieclip y have another movie clip for a menu, inside that menu-movieclip, i have some buttons and i cant seem to load scene 2 form these buttons. I know its beacuse the buttons are inside movie clips on the 1st scene. I think i remember that intsead of calling a scene i should name a keyframe on the second secene and call that key frame insteada of the scene, but it doesnt work!
help please...
how else can i do this!?

Loading Scenes From Buttons Inside Movieclips
HY!
Ive made a movie where i have a main movie clip in my 1st scene. Then, inside this movieclip y have another movie clip for a menu, inside that menu-movieclip, i have some buttons and i cant seem to load scene 2 form these buttons. I know its beacuse the buttons are inside movie clips on the 1st scene. I think i remember that intsead of calling a scene i should name a keyframe on the second secene and call that key frame insteada of the scene, but it doesnt work!
help please...
how else can i do this!?

(CS3) Slide Navigation From Buttons Inside Movieclips
Hi all,

I've got a Flash Slide project with a complicated nested slide setup. I use navigation buttons that directly reference slide names to navigate about the app.

My problem is I can't seem to get buttons created inside movieclips to properly navigate to other slides the same way buttons directly on the stage work.

I realize that on a normal flash file for a button that goes to a frame outside of the movieclip you have to add a level0 tag to the button code. But in this case the level0 tag only takes me out to the same timeline as the movieclip is on. With slides, each slide has it's own timeline.

here is a striped down version of my fla

link

3 buttons as traditionally made to navigate between slides and a mc with buttons that are supposed to have the same functionality but don't work.

Thanks,

Movie Clip Buttons Inside MovieClips?
Hey wutsup guys,
OK i Have a Timeline problem. Basically my question is... can you place movie clip buttons inside other movie clips? The problem I am having is my button_mc are working...but since they are not on the main timeline, and is in a movie clip, the cursor is not detecting the buttons. So is there a way? do I need like an "_root" or "_parent"? any theory or help would be appreciated. Incase you need a visual:

http://www.chriscerros.com/site.html

basically when you slide over a certain area to the left, the sliding_mc contains thumbs that are movie clip buttons....but I am not sure how to call them out in scripting. they are just going to load external swf's into the placholder where you see the image in the background.

Thanks Dood's.

(CS3) Slide Navigation From Buttons Inside Movieclips
Hi all,

I've got a Flash Slide project with a complicated nested slide setup. I use navigation buttons that directly reference slide names to navigate about the app.

My problem is I can't seem to get buttons created inside movieclips to properly navigate to other slides the same way buttons directly on the stage work.

I realize that on a normal flash file for a button that goes to a frame outside of the movieclip you have to add a level0 tag to the button code. But in this case the level0 tag only takes me out to the same timeline as the movieclip is on. With slides, each slide has it's own timeline.


here is a striped down version of my fla


Code:

www.transcendents.net/work/menu_buttons.fla

(sorry for getting around your new user url filter like this. Not spamming, just looking for help!



3 buttons as traditionally made to navigate between slides and a mc with buttons that are supposed to have the same functionality but don't work.

Thanks,

How Can I Set Actions To Buttons Inside Dynamically Created Movieclips?
Hello thank you for coming! I am trying to put Actions in a button that is inside a Blank Movieclip. This Blank movie clip gets duplicated dynamically. Although it does not seem to work!

Inside the Blank MC I put a button. I clicked on this button an set it to do an action but it doesn't work!

Can someone help please! Any type of help will be greatly appreciated.

AS3 Global Variables And How To Access Buttons Inside Movieclips
Hi, I am making a simple game and I have an option to change the player appearance.
Problem is I tried to use a variable to detect and change clothes but it doesn't work.
I have already declared the variable using var playerClothes= "normal"; but it seems because the clothes movieclip is in another movieclip, it can't access the variables.

I've tried package to make global variables, but it says my package is unexpected although the code checker says there are no errors. I put the package in the first frame.

I have also the same problem when trying to access a button inside a movieclip it can't find it....

Buttons Not Working In Movieclips
Hi,

I have a movie that has a movieclip containing some buttons in it.
The buttons when pressed call up another movieclip within the movie the buttons reside.
When viewed though the movieclip the button activate doesn't play?
although when the scene is viewed within the movieclip the buttons reside the movieclip does play?

Any idea's or is this a mx BUG?

Spence

Buttons Not Working In Movieclips
Hi,

I have a movie that has a movieclip containing some buttons in it.
The buttons when pressed call up another movieclip within the movie the buttons reside.
When viewed though the movieclip the button activate doesn't play?
although when the scene is viewed within the movieclip the buttons reside the movieclip does play?

Any idea's or is this a mx BUG?

Spence

Array With Movieclips/buttons Isn't Working For Me...
Hello, I have a problem with adding in arrays with movieclips. This is my code, I have 1 background("bg") so far in the arrays, but I will have some soon. This is my code:
Code:
movespeed = 7;
grass = new Array("_root.bg0.grass0", "_root.bg0.grass1");
bg = new Array("_root.bg0");
_root.guy.onEnterFrame = function() {
if (Key.isDown(37)) {
bg[0]._x += movespeed;
}
if (Key.isDown(38)) {
bg[0]._y += movespeed;
}
if (Key.isDown(39)) {
bg[0]._x -= movespeed;
}
if (Key.isDown(40)) {
bg[0]._y -= movespeed;
}
if (grass.hitTest(this)) {
if (this._x<grass._x) {
bg[0]._x += movespeed;
}
if (this._x<grass._x && this._y<grass._y) {
bg[0]._x += movespeed;
bg[0]._y += movespeed;
}
}
};
This is it so far, but I have one background("bg") and two grass fields so far("grass"). I can't get them to work properly.
Quote:




NOTE:This is a scrolling background, so don't get confused with the movement, oh...and I am using Flash MX 2004 PRO!

Buttons Inside Of MC AS3 Not Working
sorry for the n00b question
I have wasted a day of google searches and tutorial searches trying to figure out what I am doing wrong.

this is what I need done

I want a Movie Clip to house 5 buttons that will link to frame labels on the main time line.
(this will be my main menu navigation)

I have created 5 separate buttons
then created a Movie Clip.
dragged each of the 5 buttons into the movie clip
gave instance names for all of them.
then I dragged the movie clip to my main timeline and gave that an instance name.

I then went into the Movie clip and attempted to use AS3 to get the button instances to navigate to the frame labels.

no go

when I test my movie it keeps looping through the whole main timeline no matter how many stop commands I put in the main timeline or in the Movie clip itself.

if I have no AS in the Movie clip then the movie tests with the Movie clip working (no
scrolling through the timeline and rollover works fine but I still can not command the CLICKs)

I am sure I am overlooking something simple
any suggestions would be greatly appreciated.

as a post script I have tried so many AS variables I thought it best to not enter any here
and see if someone could help me from scratch instead of fixing an already confused problem.

THX

MC As Button With Buttons Inside (Not Working)
As part of a drop-down menu I'm using a movieclip as a button using _up, _over, _down labels and a separate movieclip as a hitArea.

Also inside this movieclip are additional, traditional buttons.

The traditional buttons do not work.

What are the workarounds or what is the best practice in this situation?

I made a dummy fla to try to narrow down the problem - if anyone wants to see it I will attach it.

Thanks for your time

Jim

Buttons Inside Moive Not Working
hey my site Im working on

http://thegaffney.com/

in the scrolling movie on the left with the pictures

i made each picture a button and made all those buttons into 1 movie clip

none of the buttons do anything though such as change to the down position when you click on them, also i have a script linking to a url on the pictures and none of them are working either?

the bottom movie clip on my site ( the one with the home drawings and guestbook links ) work just fine and its the same idea pretty much

the only difference is the scrolling movie is in a movie which is in a movie which is in a movie

any ideas whats wrong? iam i missing something

(links on the site arent working iam still makin them)

[F8] Buttons Inside Drop Down Not Working
I've searched and searched this topic over but can't seem to get it fixed. I have movieclip that drops down to reveal the buttons inside of it. Of course, after reading what I have read this just doesn't work as is the case with mine. Right now on the stage at the end of the timeline I have my MC_menu labeled "menu" and on a seperate layer the actionscript:

stop();
menu.onRollOver = function() {
this.gotoAndPlay("menudown");

};
menu.onRollOut = function() {
this.gotoAndPlay("menuup");

};

This part of course works - the menu comes down but the simple buttons on it don't do their mouseovers, so long as I have the above script on the timeline. As I understand it, the master button, being "menu" overrides the buttons inside of it making them not activate on rollover. So what is the work around to this?

Thanks a lot for any help.

Buttons Inside A Loaded Swf Not Working Help
Can anyone help please!!

I'm quite new to Flash 8 and am trying to build a website for myself. I have a main timeline with buttons which when pressed load a swf into a holder mc I have put on stage. That swf loads in its place fine, but my problem starts when I try and click on a button inside that swf, this button should add an item to my pay pal shopping cart (in a seperate window) this button works (and connects to pay pal) if I just test that swf, but not when the whole web site is published.

If anyone could help, that would be great. My coding for loading the swf (including use of a preloder) is as follows:

var mcl:MovieClipLoader = new MovieClipLoader();

var mclL:Object = new Object();

mclL.onLoadProgress = function(target,loaded,total) {
loader.percent.text = Math.round((loaded/total) * 100) + "%";
}

mclL.onLoadInit = function() {
loader._visible = false;
loader.percent.text = "";
}
mcl.addListener (mclL);
mcl.loadClip("wbailey.swf",holder);

w50bailey.onRelease = function(){
loader._visible = true;
mcl.loadClip("wbailey.swf");
}

The coding on the button inside the swf (to load pay pal shopping cart) is like this:

on (release) {

var paypalObj = new Object();
paypalObj["add"] = 1;
paypalObj.cmd = "_cart";
paypalObj.business = "my paypal name";
paypalObj.item_name = "Trevor Bailey";
paypalObj.item_number = "TEBw50";
paypalObj.amount = "50.00";
paypalObj.page_style = "Primary";
paypalObj.no_shipping = "2";
paypalOBJ.undefined_quantity = "1";
paypalObj.no_note = "1";
paypalObj.currency_code = "GBP";
paypalObj.lc = "GB";
paypalObj.bn = "PP-ShopCartBF";
paypalObj.shopping_url = ("javascript:window.self.close()");
var sUrl = 'https://www.paypal.com/cgi-bin/webscr?';
for (var o in paypalObj) {
sUrl += o+"="+paypalObj[o]+"&";
}
trace(sUrl);
getURL(sUrl, "paypal", "POST");
}

Could it be something to do with levels/roor/parnt/child? I'm really not sure about all that yet...still soo much to learn!
If anyone could help as I'm struggling that would be wonderful... look forward to hearing from anyone!!!! thanks!!

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

Buttons Inside Movieclip Not Working- Flash 8
I have 3 buttons and a graphic inside a movie clip which is located on the root stage. Each button has an onRelease action in the mc's actions layer.

BUT-

I only want those buttons to be visible when I RollOver the mc.
I added RollOver/gotoAndStop actions to the mc via the root actions layer, and moved the btns to frame 2 of the mc (leaving the frame 1 blank except for the graphic).

SO-
When the user rolls over the mc, the buttons appear, but are not clickable and wont go thru up>over>down when mousing over them.

My thoughts are that the onRelease is preventing them from being selectable.


Please advise

Thanks

Buttonless Scrolling MC, Buttons Inside Not Working
I have done it on other Flash sites and the method worked (as per tuts here)... a button inside a buttonless scrolling MC that's to link to another scene.... isn't working to save my life. The scrolling PROJECT SECTION thumbnails are supposed to click and take you to a scene with a description of the project, and I intend to use this technique also for the Executives section. (if I can get it to work). I only have the left three thumbs set up as linked buttons so far (if they worked)

http://designsourceadvertising.com/ndc-help.zip (2.6MB .FLA)

Any help would be much appreciated. pleezpleezpleez

Buttonless Scrolling MC, Buttons Inside Not Working
I have done it on other Flash sites and the method worked (as per tuts here)... a button inside a buttonless scrolling MC that's to link to another scene.... isn't working to save my life. The scrolling PROJECT SECTION thumbnails are supposed to click and take you to a scene with a description of the project, and I intend to use this technique also for the Executives section. (if I can get it to work). I only have the left three thumbs set up as linked buttons so far (if they worked)

http://designsourceadvertising.com/ndc-help.zip (2.6MB .FLA)

Any help would be much appreciated. pleezpleezpleez

Buttons Inside Movieclip Not Working After AttachMovie()
Hi everyone,

I'm attaching a movieclip dynamically, and the movieclips (which should act like buttons) inside it aren't working.

Here's my actionscript:


Code:


stop();

// imports the easing and tween class for use globally
import mx.transitions.easing.*;
import mx.transitions.Tween;
// ballTween defined out of function now accessible

var roomTween:Tween;

// move clip
function moveCaruth(begin:Number, end:Number):Void {
var seconds:Number = 1;
var useSeconds:Boolean = true;
roomTween = new Tween(caruth_mc, "_x", Regular.easeInOut, begin, end, seconds, useSeconds);
}

function moveHamptonInLeft(begin:Number, end:Number):Void {
var seconds:Number = 1;
var useSeconds:Boolean = true;
roomTween = new Tween(hampton2_mc, "_x", Regular.easeInOut, begin, end, seconds, useSeconds);
}

function moveHamptonOutLeft(begin:Number, end:Number):Void {
var seconds:Number = 1;
var useSeconds:Boolean = true;
roomTween = new Tween(hampton2_mc, "_x", Regular.easeInOut, begin, end, seconds, useSeconds);
}


/* -- [ begin button attachments ] -- */

// moves caruth to the left and hampton is in view
caruth_mc.caruth_door.caruthArrow1_mc.onRelease = function() {
attachMovie("hampton_mc", "hampton2_mc", 1, {_x:544, _y:0});
moveCaruth(0, -540);
moveHamptonInLeft(544, 0);
};

// moves hampton to the left and lacerise is in view
hampton2_mc.hampton_door.hamptonArrowR_mc.onRelease = function() {
moveHamptonOutLeft(0, -544);
unloadMovie("caruth2_mc");
}



The initial movieclip (caruth_mc) is already on the stage, and when the button is clicked I attach another movieclip off the stage and tween it in to the left.

For some reason the movieclip to act like a button inside that attached clip isn't working.

I did set the linkage on hampton_door and hamptonArrowR_mc, both are set to be that name in the identifier area.

Does anyone know what I'm doing wrong?

Thanks!

-Brian

[F8] Buttons Not Working Embedded Inside MC Attached File
Hey Everyone,
I'm having some trouble with getting buttons to link to frame lables in other scenes, the code I used to get this to work normally has stopped working when the buttons are embedded into a movie clip..

At the moment i'm trying to get the 'Photography' button on the main page to link to scene 2 'Photos' frame lable, but when I click it, nothing happens!

I have attached a flash 8 file for anyone to look at! any help would be greatly appreciated!


thankyou!
James

Working Buttons Inside A Draggable Movie Clip, Lil Help Please
First I just want to introduce myself and say Hi to everyone, This is the first forum I joined and I am an actionscript noobie so if I seems a bit "slow" I hope to get into the groove with all your valuable help. Anyway, I'm curious. I followed the swapDepth tutorial with the draggable movie clips. Still I was wondering how to next another button within the movie clip. It seems that the only onRelease code only work on the draggable object and not the button I nested inside my movie

Basically I have an instance of a poloroid photo and if you drag them around, the photo fades in, and a little post-it note appears on the photo and give you the title. Then when you clock on another photo, the first photo fades back to it original state,

I would like to add a button into one the the clips with a link to my resume but I can't seem to find the VooDoo to Do Do it. Can one of you Flash GODS possibly help?

I'll trade you a really good fried chicken recipe for the answer to my probelm
THANKS!

-A

Buttons Inside Scrollpane Not Working In Main Movie It Is Loaded Into
Caio rigazzi,

I have a scrollpane with a movie that contains a movie clip in it. That movieclip contains buttons which are capable of bringing up a pop-up menu and should display a sample image when "rolled over". The problem is when I use :

on (rollOver) {
_root.rollover.gotoAndPlay ("1FLUX");

}
on (rollOut) {
_root.rollover.gotoAndPlay ("1BACK");
}

The "roll over" function does not work in the main movie this scroll pane is loaded into.

Basically, the scroll bar in a swf named VIDEO, is loaded into a DESIGNWORK1.fla, which is loaded into a main video: INDEX12
(courtesy of the Transitions between External SWFs( 1, 2)

How can I get this scroll bar to work?


aswg

Buttons Inside MC Not Working When Event Handler Function Is Assigned To MC
Please help!

I have a button on the stage that I assigned an event handler method to:

button1_bt.onRollover = function(){
animation1_mc.gotoAndPlay(10);

This is perfect. It plays the animation which is a drop down menu then stops in the dropped down state. However, I want "animation1_mc" to play it's pull up animation, starting on frame 21, when the MC is rolled off of. So I added this event handler method:

animation1_mc.onRollOut = function(){
animation1_mc.gotoAndPlay(21);
}

This also works, EXCEPT, the buttons inside the MC "animation1_mc" do not work! How can I have the pull up animation play on rollout o th e MC without disabling the buttons inside the MC???!!!

Referencing MovieClips Inside MovieClips From The Main Time Line?
is it possible to have event listeners that listen for a movie clip inside a movieclip and then execute a function from the main time line?
Or is it impossible to relate something this far removed? Sounds like a geek Jerry Springer episode!
Something sort of like this:









Attach Code

movie1_mc.closeBtn1.addEventListener(movie1_mc.MouseEvent.CLICK, closeMenu1);
movie2_mc.closeBtn2.addEventListener(movie2_mc.MouseEvent.CLICK, closeMenu1);

function closeMenu1(e:Event):void {
if (e.currentTarget.name == "closeBtn1"){
movie1.gotoAndPlay(27);
movie1.visible = true;
} else if (e.currentTarget.name == "closeBtn2") {
movie2.gotoAndPlay(27);
movie2.visible = true;
}
}

Adding Movieclips Inside Of Two Other Movieclips... XML Powered Slideshow
hello..

I have been working on this project that used part of the kirupa.com tutorial for XML slideshows as a base. What it does is takes a set of thumbnails from an XML file and puts them in a movie clip on different layers. (Each thumbnail a new movieclip on a new layer of the original movieclip)

Anyways, what I am trying to do is make a menu movieclip pop up when a button is clicked. Inside this movieclip is where I want to throw the movieclip for thumbnails to load on. The menu movieclip is working fine and whatnot, but I cannot figure out how to get the thumbnails to load inside that second movieclip.

Here is a chunk of my code:


Code:
function createThumbnailScroller(current_mc, currentThumbFile, thumbCenter) {
thumbnail_scroller.createEmptyMovieClip("t"+current_mc, thumbnail_scroller.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
target_mc._x = hit_left._x+(target_mc._width+20)*current_mc;
target_mc.pictureValue = thumbNumb[current_mc];
//trace(thumbNumbforJS[current_mc]);
target_mc.onEnterFrame = function() {
thumbWidth = target_mc._width;
};
target_mc.onRelease = function() {
//tell JS to jump to that slide
flash.external.ExternalInterface.call("jumpToSlide", thumbNumbforJS[current_mc] )
//set scroller movieclip back in its original position (go back to main screen)
yVal = 362;
scroller_move();
};
target_mc.onRollOver = function() {
fadeDown(this);
};
target_mc.onRollOut = function() {
fadeUp(this);
};
};
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(currentThumbFile, "thumbnail_scroller.t" + current_mc);
}

"thumbnail_scroller" is the movieclip which is inside of "scroller", the menu movieclip.


Thanks...


EDIT:

I got it working.. I just had to add "_root.movieclipname." in front of the movieclips I referred.

Adding Movieclips Inside Of Two Other Movieclips... XML Powered Slideshow
hello..

I have been working on this project that used part of the kirupa tutorial for XML slideshows as a base. What it does is takes a set of thumbnails from an XML file and puts them in a movie clip on different layers. (Each thumbnail a new movieclip on a new layer of the original movieclip)

Anyways, what I am trying to do is make a menu movieclip pop up when a button is clicked. Inside this movieclip is where I want to throw the movieclip for thumbnails to load on. The menu movieclip is working fine and whatnot, but I cannot figure out how to get the thumbnails to load inside that second movieclip.

Here is a chunk of my code:


Code:
function createThumbnailScroller(current_mc, currentThumbFile, thumbCenter) {
thumbnail_scroller.createEmptyMovieClip("t"+current_mc, thumbnail_scroller.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
target_mc._x = hit_left._x+(target_mc._width+20)*current_mc;
target_mc.pictureValue = thumbNumb[current_mc];
//trace(thumbNumbforJS[current_mc]);
target_mc.onEnterFrame = function() {
thumbWidth = target_mc._width;
};
target_mc.onRelease = function() {
//tell JS to jump to that slide
flash.external.ExternalInterface.call("jumpToSlide", thumbNumbforJS[current_mc] )
//set scroller movieclip back in its original position (go back to main screen)
yVal = 362;
scroller_move();
};
target_mc.onRollOver = function() {
fadeDown(this);
};
target_mc.onRollOut = function() {
fadeUp(this);
};
};
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(currentThumbFile, "thumbnail_scroller.t" + current_mc);
}

"thumbnail_scroller" is the movieclip which is inside of "scroller", the menu movieclip.


Thanks...

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