ActionScript 2.0 :: Array Of Buttons - Disable All Other Movie Clips, Once The First One Is Clicked

Jun 12, 2008

not sure how difficult this is going to be, but I have 30 movie clips, which will all be sequentially numbered. (pos1, pos2, pos3......pos30). They will all have the same functions, with the only change being the number. I know there is a more efficient way to write this code using arrays, but I will need help with it. I would rather have 10 lines of code than 150. I also need help with writing the code, that will disable all other movie clips, once the first one is clicked. Also, not sure how tricky the javascript part will be. Below is the code i am trying to achieve, but the long version.

[Code]...

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Using An Array To Assign Movie Clips To Buttons?

Dec 22, 2009

I've got 5 movie clip buttons.  When a user rolls over a button, I want one movie clip to play. When a user clicks on that button, an alternate movie clip plays. I'm trying to use an array to assign certain movie clips to certain buttons and actions, but I'm not doing something quite right. I can get one button to work correctly, but then am having issues getting the other buttons to work.
 
Here is the code I have:
 
var currentPage:MovieClip;
var currentScreen:MovieClip;
var prevPage:MovieClip;

[Code].....

View 3 Replies

ActionScript 3.0 :: Disable Buttons For 3 Seconds When Another Button Is Clicked?

May 20, 2009

I'll explain the problem I have having as Im sure there are a few solutions, I have a flash website which has four main links, HOME, SERVICES, BLOG, CONTACT.

When the services button is pressed 5 more buttons come in from the right hand side each is slightly delayed to give a stacking effect.

The problem is if the user clicks on the Services button and then quickly presses the another button the service buttons tween in onto the wrong page!

The solution I am thinking is to set a time delay on the services button so when it is pressed the other buttons are delayed for a few seconds to give time for all teh serivecs buttons to tween in.

If so how could I implement it? I have bene trying many things to get it to work, I almost have it, but the delay only works the first time the button is pressed and I cant seem to get the timer to reset!

View 7 Replies

Disable Nextpage Button Till All Other Buttons Clicked?

Oct 26, 2011

I am creating a learning document. I would like to disable nextpage button till all other buttons clicked and movieclip finished.I try to use if stamement but I could not be successfull because my nexpage button is on main frame and my other buttons on movieclip.

I disable nextpage button mainframe and I use following code using AS2.

btn1.onPress = function(){
_parent.forwardBtn._visible=false;
}

[code]....

I have three picture and buttons. Therefore user need to enlarge picture by pressing buttons after viewing all image. Then user need to move next page. The next page is another movie clip. I would like to disable nextpage button here to till MC complete.

View 1 Replies

Multiple Movie Clips On Stage - Buttons Not Working In Movie Clips?

Jul 15, 2009

I have multiple movie clips on stage (all in separate layers, of course) as well as buttons on stage to play each movie clip. There are buttons inside each movie clip. The problem is that the buttons inside the top layered movie clip work, but the others in the movie clips below don't.

View 2 Replies

ActionScript 2.0 :: Disable The Movie Clip Form Being Clicked

May 26, 2003

if i wanted to disable something like a movie clip from being clickbale (i have already linked it to a function) if i want to diable the movie clip form being clicked unless something else has been pushed how would i do this and where would i put it? also if its not too much trouble could you explain the code a little bit

View 3 Replies

ActionScript 3.0 :: Movie Clips Not Disable

Jun 11, 2010

What will my movie clips not disable here. They are still clickable? I get my trace 24 times. what am i doing wrong. I have 24 cards all named card0_mc - card23_mc.[code]

View 2 Replies

ActionScript 2.0 :: Frame When One Of 7 Other Movie Clips Are Clicked?

Sep 16, 2007

Im breaking my heart to try and figure this out. Basically I have a movie clip (Test), which I want to jump to a specific frame when one of 7 other movie clips are clicked. I can get it to work when I tell it to just go to a specific frame. But when I try and create and array for each of the frame numbers nothing happens.The script I have is as follows:

[Code]...

View 6 Replies

ActionScript 1/2 :: Disable Visibility Of Group Of Movie Clips?

Nov 17, 2009

How do I set up an array (or other method), to disable the visibility of a group of movie clips all at once?

I've tried this...

var invisibleMCs:Array = new Array ("MC1", "MC2", "MC3");
invisibleMCs._visible = false;

View 1 Replies

ActionScript 3.0 :: Detect Wheather The Button Is Clicked Or Not And Disable It If Clicked?

Jun 9, 2010

I have 4 navigation button and like home, about us etc....  And i want to disable home when it is click and cannot clicked it until the user click another button first. means if a visitor is at home page then home navigation is disabled, and all other are active, and when they click at aboutus button then the pages goes to the about us page and the about us button is disabled and other get active. I want this solution in AS3 with oop concept.

View 6 Replies

Actionscript 3.0 :: If / Else - Certain Movie Clips Execute A Motion Tween When A Button Is Clicked

Jun 5, 2009

I'm creating a game where certain movie clips execute a motion tween when a button is clicked, and stay still when not clicked. I know that this sequence would probably use coding such as if...button pressed execute movie clip/else...

But I'm not sure how to code it. Also is it better to have the motion tweens as a nested animation in each movie clip, or should I just create the tweens on the main stage. And if I make them nexted animations how do you say in a function to play the nested animation?

View 2 Replies

ActionScript 3.0 :: Creating An Array To Disable A Group Of Buttons?

Jan 26, 2011

New at AS3, more of a designer than coder but I try. This will probably be easy for this forum's pros: I have 6 main buttons and 50 other buttons. When people click on one of the six main buttons, I need the 50 other buttons labeled from t_1 to t_50 to be disabled (mouseEnabled=false)

I don't want to write the same line of code 50 times so I'm trying something like this. This is the code for button#6:

butt6.addEventListener(MouseEvent.CLICK,menu6Handl er);
function menu6Handler(e:MouseEvent):void
{
//other tasks, etc...

[Code].....

View 4 Replies

ActionScript 3.0 :: Creating An Array To Disable A Group Of Buttons

Jan 31, 2011

I have 6 main buttons and 50 other buttons. When people click on one of the six main buttons, I need the 50 other buttons labeled from t_1 to t_50 to be disabled (mouseEnabled=false).I should add that all 50 buttons are in a sub group:this.wholeTree.t_1

I don't want to write the same line of code 50 times so I'm trying something like this. This is the code for button#6:

butt6.addEventListener(MouseEvent.CLICK,menu6Handl er);
function menu6Handler(e:MouseEvent):void
{
if(this.menu6.currentFrame==15){

[Code]....

This returns 2 errors: The first one is warning 3596 Duplicate variable definition: I tried assigning the variable definition just once at the beginning of the function but then it no longer works and the buttons 1 to 50 don't get disabled. The second error is TypeError: Error #1010: A term is undefined and has no properties.at main_Sustainability_fla::MainTimeline/menu6Handler()

View 7 Replies

Actionscript 2.0 :: Radio Buttons - When Clicked, An Array Is Pushed To Store A Value?

Jan 29, 2009

i have a series of radio buttons that when clicked, an array is pushed to store a value. i would like this value to be spliced from the array with the help of a variable if the person unchecks the checkbox, but all i've been able to come up with is splicing the first value out regardless of which button is unchecked.

Code: Select allmyArray=new Array
if (myArray.length>0){
myText.text=myArray;[code].....

View 1 Replies

Using Multiple Movie Clips For Separate Buttons And Mouse Over Buttons?

Nov 24, 2009

I am using Flash CS4 with ActionScript 3 and I am fairly new at it. I am struggling with two things.
 
1. How can I start a movie clip while scrolling over a button? I know how to start a movie clip when a button is clicked.
 
2. How can I use multiple movie clips for seperate buttons?

[URL]

View 3 Replies

ActionScript 2.0 :: Unload/Load Movie Clips In Parent Movie From Buttons In Child Movie?

Feb 12, 2009

I Have 3 Movies:MAIN.SWF, contains loading movie actions for Nav.swf and Home.swf.NAV.SWF, contains navagation menu loaded on Level 2 in Main HOME.SWF, contains slideshow for home page loaded on Level 1 in Main In NAV.SWF, there is a MOVIE CLIP "graphmc", which contains a BUTTON "graphicbtn", When this button is clicked, I'd like the HOME.SWF (which is loaded into Main.swf on Level 1) to fade out and unload, and load and fade in Graphics.SWF in place of it.

View 6 Replies

ActionScript 1/2 :: Disable Buttons In A Movie Clip?

Sep 4, 2009

I have a screen with transparency that pops up over a movieclip full of buttons.I need to disable the movie clip and/or buttons so they don't function when the pop up comes up.Can't get it to work with this code:

myMC._enabled=false;
or
myMC.myBTN._enabled=false;

[code].....

View 11 Replies

ActionScript 3.0 :: Can't Disable Movie Clip Above Buttons?

Apr 12, 2011

I have some buttons, and above them a movie clip with a 20% transparency which I use for some graphic effects in my page. But the buttons can't be accessed (they are not working) because the layer covers them.I have used the following code to disable the graphic layer:overlay_mc.buttonMode = false;overlay_mc.enabled = false;overlay_mc.mouseEnabled = false;but none of these solves the problem. The buttons are still covered and inactive.

View 3 Replies

ActionScript 2.0 :: Possible To Disable Buttons On Movie Layer Below

Nov 14, 2009

Loading a movie above another movie at level1 the btns below are still active. Can I disable the btns on the movie layer below.
btn.OnPress = function(){
loadMovie("movielevel.swf",1);
}

View 3 Replies

ActionScript 2.0 :: Disable/Enable Buttons Under Movie Clip?

Jan 22, 2010

I am attempting to disable buttons that lay under my movie that loads. This code works all the way up until I close my exit button and then the buttons do not enable again.

on(press) {
align_callout.gotoAndPlay(2);
(stop);

[code].....

View 6 Replies

ActionScript 3.0 :: Show Movie If Button Clicked Is In Array?

Aug 21, 2009

I am trying to show a movie if the button clicked on is in my array...
ActionScript Code:
function showmenus(e:Event):void {
//store my buttons in an array
var threecolorbuttons:Array = ["menusilver33940mm3c", "menusilver343mm3c", "menugold33940mm3c"];
//loop through all buttons of movie and if theyre in array show 'myMovie'
for each(e.target.name in threecolorbuttons) {
myMovie.visible=true;
}}

However this presents me with the following error....
Error: Error #2078: The name property of a Timeline-placed object cannot be modified.
at flash.display:isplayObject/set name()
at newchip_fla::MainTimeline/showmenus()

View 4 Replies

ActionScript 3.0 :: Inserting Movie Clips Within A Movie Clip Into An Array?

Dec 7, 2010

i am making a sidescroller and i'm working on the collision and the way my teacher suggested was to give all the movie clips an instance name (which i did), but i'm not too sure on how to put them into an array for collision detection

the movie clips are within a movie clip simply named levelOne (and lvlOne_mc for as) which is exported for action script. the pieces within are well named and have an instance name (for example the first platform instance name is Pf01) but i don't know how to set up the array so i can set up collision detection between the character and the objects

View 1 Replies

ActionScript 3.0 :: Movie Controls - Stop At Every 5 Frames Each Time One Of The Buttons Is Clicked

Jun 28, 2010

i want to control a movie clip with two buttons, one backwards and one forwards, the movie is 25 frames long and needs to stop at every 5 frames each time one of the buttons is clicked. Below is some code i have been trying to get to work

[Code]...

View 1 Replies

Movie Clips And Buttons

Mar 12, 2009

i just started tackling Flash and Actionscript 3.I know how to have a button react to a click by going to and playing (gotoAndPlay) a certain set of frames within the same scene [code].themselves are in a movie clip, and the "aboutpage" frames are in another movie clip back outside in the main timeline... How do I tell it to target that other Movieclip thats on the main timeline and contains the frames called "aboutpage"?Ive seen somethign like: currentTarget.gotoAndPlay ("aboutpage");But currenttarget i think looks for stuff within the target/Movieclip it lies in.. what is the code to do this:

View 2 Replies

AS2 :: Connect Swf With Buttons And Movie Clips

Mar 14, 2009

I have connected 2 pages to the index page with movieclips and buttons. I have used this action script on the button "fotoalbum"; [code]This takes me to the page called "bilder".My question is: how do i get from the flashpage "bilder" directly to the other page called " tekst" using the button "om meg"? As it is now i have to use the Home button to go back to the index page...and from there to the other pages.I have attached some test files as im sure my explanation is a bit akward.

View 3 Replies

ActionScript 3.0 :: 50 Different Buttons With 50 Different Movie Clips?

Mar 5, 2009

I'm creating a timeline of events with about 50 different points to click on. When each event is clicked on, a movie clip needs to appear (or tween onto) the screen. Then, when another event is clicked on, the previous content needs to go away so that the new content can appear.

A prefect example of what I'm talking about can be seen here:

[URL]

I've created a custom class of "TimePoint" that has a public property of date, so that I can assign a date to each individual instance of my TimePoint class.

In my fla, he timeline itself is a movie clip that needs to scroll back and forth as the mouse is moved. It contains the nested instances of my TimePoint class. I already have the scrolling movement taken care of, and I also have a tooltip date appearing over each point in time. Now I just need to figure out how to manage 50 different movie clips, each with and without graphics, bitmaps, etc.

I'm just wondering if there is any way to do this without having to create 50 different event listeners and 50 different classes just so that I can add/remove children. I'm thinking I need to use an array, but I don't know how I would implement it. I'm also not very familiar with XML.

My progress so far can bee seen here:
Timeline
version 2

View 4 Replies

Using Movie Clips As Buttons To Navigate?

Jul 13, 2009

For my online gallery, I'm using movie clips as buttons to navigate. I was having the movie clip play when you scrolled over it and off of it. Now i have it so when you click on it, it stops at the mid-way point. What on is to get it to go back to its original state when I click on something else. So basically I'm looking for a way to go back to frame 1 when a different movie clip/button is clicked on. I want it to revert back to what it was in an inactive state when I click on a different part, but I don't know how to do that

View 1 Replies

Professional :: Buttons And Movie Clips (on And Off)

Jul 15, 2011

I'm working on my own personal website for my graphic design work and I'm using flash for the intro movie, which you can either skip or after an elapsed time, sends you directly to the home page. On that intro movie (which ill call animatedface_mc) i've put two other movie clips with the eyes blinking (left and right). The eyes would be constantly blinking, as this page is open. That one is working. Off to the side are buttons of names of famous celebrities and once clicked it adds movie clips to the main animatedface_mc. For example if i clicked on the monroe_mc, it adds that famous Marilyn Monroe mole (using either mask or opacity, depending on the facial feature) on the animatedface_mc. If I clicked on tyson_mc, it adds his face tattoo. I've used the following code for this:

[Code]...

View 6 Replies

ActionScript 2.0 :: Buttons In Movie Clips?

Jul 10, 2009

I have 2 movie clips on my main timeline (let's call them MovieClip1 & MovieClip2). I have buttons inside MovieClip1 that I'm trying to (on release) direct to a specific frame in MovieClip2. Is this possible? I've tried COUNTLESS different gotoandplay and gotoandstop codes, but nothing works.

View 5 Replies

ActionScript 2.0 :: Concerning Buttons Within Movie Clips?

Jan 14, 2004

Being rather "green" with actionscripting, I am having difficulties using a sliding menu (very similar to the "infinite menu" tutorial here on kirupa) in conjuction with some actionscripting to interact with some external movies outside the main movie I am working with. What I want to do is to use each button within the menu to reference a flash movie outside the menu bar (which is a movie clip). Before I sound even more vague let me show you the code first....

aboards.onRelease = function() {
loadMovie("aboard.swf", "target");
};

So here I have a button instance (aboards) of one of the 10 buttons in the menu. I want to then reference a movie clip called "target" in the main scene of my movie to then load and display the movie aboard.swf at this reference point.

This code works well with static buttons on the main scene, but here each of the 10 buttons are located within the movie clip that makes the sliding menu work. The instance "aboards" of course works if I assign the instance to the movie clip, but then that of course means that ALL 10 buttons then will be assigned "aboards". What code change can I make to fix this issue so that each of the 10 buttons (within the movie clip) carry their own instance that can be referenced from the main scene?

View 14 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved