ActionScript 1/2 :: Buttons To Activate MovieClips On Layers
Dec 7, 2009
My main scene in only on 2 frames. On the second layers I have some buttons that activate my movie clips (on the third layer)... These buttons can be pressed 'randomly' and after the muvie clips are played my buttons (one by one) disappear to reveal what on the first layer. Here there's another button, but I want it to be active only after all my movie clips have been played. What kind of ActionScript should I use to tell flash to go to the second frame of my time line (where my button on the first layer is active) only after all the mcs have been played.
My file at the moment is in AS2... This should be a second part of a game. People who arrive at this stage should now which are the right buttons to press. If they press the right one a pop up opens and some buttons disappear to reveal the massage that's behind. When all the right buttons have been pressed I need to play the frame 'end' on my timeline... The attached fla is an example of mine animation the right buttons are the red ones.
Attachments:
example.swf (14.1 K)
example.fla.zip (269.8 K)
View 1 Replies
Similar Posts:
Oct 22, 2008
Is it possible to add layers, re-order layers, move movieclips from layer to layer or specify which layer a duplicate movieclip appears on at runtime with AS3?I am aware of the depth properties and the functions associated with that but it would be easier to have a concept of a layer because I am dealing with masks.I have a nasty feeling I'm gonna be told that layers don't really exist within an swf and that depths and setmask are all there is to work with.
View 4 Replies
Jun 24, 2010
I have done up a flash demo which uses the computer mouse to navigate. Now instead of using mouse, I want to use keyboard (arrow up, down, left, right) to highlight buttons and then hit "enter" key to click the button.
View 2 Replies
Jun 24, 2010
I have done up a flash demo which uses the computer mouse to navigate. Now instead of using mouse, I want to use keyboard (arrow up, down, left, right) to highlight buttons and then hit "enter" key to click the button.
View 6 Replies
Apr 28, 2009
I'm into a personal project with the Tween Method:
A menu with 5 buttons inside the movie clip instanced from bt1 to bt5.A main movie clip that extends the stage dimensions.When buttos are released they shall target to the respective Y value and stop.So..
Importing classes
import fl.transitions.Tween;[code].....
I'd like to activate the 5 buttons for this navigation.. Insted of it, only 3 buttons navigates.. The other buttons i don't know how active them to navigation.
View 2 Replies
Mar 12, 2005
how to activate buttons from external swf timelines?
i have this menu that loads external swfs. One of the swfs is an animation of the mouse cursor rolling over the menu. At that point i want to start one of the button animations and action.
View 2 Replies
Nov 9, 2007
Is it possible to have 2 buttons work on the same rollover when they are on top of one another?
View 1 Replies
Mar 12, 2005
how to activate buttons from external swf timelines?
i have this menu that loads external swfs. One of the swfs is an animation of the mouse cursor rolling over the menu. At that point i want to start one of the button animations and action.
View 2 Replies
Jun 22, 2009
I created a Flash CS4 document which contains 2 buttons. I used the code below to link the two buttons to well known web sites, tested them in Flash and the buttons work fine.
[Code]....
View 2 Replies
Mar 30, 2011
I currently have a game that allows the player to Start, Stop and Pause sound clips.
Currently the Start button only becomes active after the Stop button has been pressed.
I would also like is the play buttons to become active as soon as the sounds complete playing. This is the code on frame 1 of the main timeline that creates two sound objects
[Code]....
View 0 Replies
Jan 5, 2004
Is it possible to have movieclips, on two seperate layers, both located on the first frame of their layer, to have an AS where when MovieClip1 reached frame 5 of the movieclip MovieClip2 goes to frame 5 of its movieclip but MovieClip1 continues to play even though the AS was triggered?
View 4 Replies
Jan 19, 2010
Situation: I have a project I'm working on where I have buttons which make click sounds on their own, and also take you to other scenes where a sound will immediately play. There are also three movieclips involved, total my base movieclip and two independent ones that load on top of that. Problem: I want to include a Mute button so that you can turn off all sounds, but can't figure out how to do that..As I understand it, stopAllSounds won't work for me, because as soon as someone hits another button, a new sound will play.
View 5 Replies
Mar 21, 2011
I have an asset file (FLA) that will be updated a lot by other team members during the project. I would like to have an JSFL script that moves all selected movieclips in the timeline to a new layer (named using the movieclips library name).[code]...
View 1 Replies
Jun 28, 2011
My goal is to have a map that I can drag around within the frame of a webpage. Finding the right code to move the map in a restricted frame wasn't too easy but I managed to find that (which works like a charm):
zoom3.addEventListener(MouseEvent.MOUSE_DOWN, dragArea);
zoom3.addEventListener(MouseEvent.MOUSE_UP, dropArea);
[Code].....
Now the catch is that I'd like the map to be dragged simultaneously with a movieclip situated above, that contains names of regions, cities etc.. Both can't be on the same layer as I need to put a layer of texture in between.
Is there a simple way to link both layers and make them move at once?
View 1 Replies
Feb 1, 2010
i have common trouble with buttons. I have the map of county, divided to a regions. And if i rool over on the button (region) with AS2 calling animation some region. Problem begin if i need one animation on stage with information strip on top level and i need hide this strip if roll over on all stage. But not played animation in the regions.
View 4 Replies
Aug 11, 2009
I have a cascading/collapse flash menu.There are about 7 layers, each one of them a different page that slides and covers the other layers.for some reason, all the buttons on the bottom layer (layer 1 for instance) can be clicked on even when the 6 other layers are ontop of it with their own links and buttons. How can I make it so all my buttons don't shine through all the other layers. I can't slide the layer away to get ride of the buttons because it is still partially viewed when the other layers are ontop of it. I can't figure out why the buttons in layer one can be clicked in layer 2 when its on top of layer 1, or layer 3,4,5,6,7 when they are on top of layer 1-i assumed these layers would block out the buttons and links in the first layer(which is on the way bottom)
View 2 Replies
Jul 27, 2011
I am trying to create a Flash website that with multiple pages. Each page has input text areas to collect a number of something. I would like to do the following :
Have multiple pages that keep the user's input data as they navigate back and forth between pages Allow the user to hit a simple "calculate" button to take the kept information on each page and show the end calculation of the entered data on each page on the main stage or page.
I would assume that to keep input information intact, the pages would all have to reside in FRAME 1 where the actionscript is kept and the main guts of the calculations occur. So, is there a way to make a multi-page website in Frame 1 only using only multiple layers where the page buttons simply only go to another layer rather than page. Or, can I create a multi-page website over many frames, keep the user entered data intact while navigating to each page and propigate/calculate that data when the user hits the "calculate" button on the main page?
View 1 Replies
Apr 2, 2012
Using Flash CS3 and AS3 to build a learning module that will load different layers of SWF files based on buttons on the main screen. Got this working with no problems. What I want to do is add buttons to provide learners some functionality, specifically a forward button, back button and a check box that will keep advancing automatically. I've done massive searches and so far nothing seems to work. Seems like what I am acccessing so far is the main layer, not the new layers as they are loaded. Below is what I have been trying with the back button; the foward button uses nextFrame and is Handler2. It isn't working. Not even sure how to start with the checkbox for auto advance.
[Code].....
View 5 Replies
Oct 22, 2009
I have created a button which contains a movie for each county, when a user rolls over it pops out and displays a list of names. The problem I have is each button is on a layer and when you roll over the bottom button it's hidden below the others. Is there a script to bring each layer to the front automatically? I'm new to flash so if possible could you please explain in layman's terms.
View 6 Replies
Aug 10, 2009
I'm using a really simple bit of code on some fading in/out buttons which overlap each other slightly to ensure that the one with the cursor resting over it sits in front of the others:[code]problem being that this brings the button in front of everything across all layers. How do I change my swapdepths to make sure the layers above the buttons STAY above? - or do I need to add something to the other layers to give them a fixed 'depth'?
View 11 Replies
Sep 24, 2006
i'm trying to make a website in a number of buttons and layers. In one section i need to have an if statement on the buttons as where in the timeline they go is dependant on where the user is (this location is set in a variable called "destination".
The problem is that when i have = in the if statement it bypasses the first section and only does the else action (ie trace ("else")), and if i put == in the statement it only does the first action (ie trace ("gallery")) no matter what "destination" is.
here is my code:
on (release){
if (destination = "gallery"){
trace ("gallery");
}else{
[code]....
View 9 Replies
Jan 11, 2010
I'm trying to do a presentation of some Adobe Illustrator graphics in flash for an architectual presentation. I want to zoom in on some content and have new layers fade in and out. I guess this is done by tweens, as I had som succes in that direction.The problem becomes obvious when I want to control my presentation. I want to set cue points/keyframes/whatever so that the presentation will start at the click of a 'next button' or a click og the mouse. Then I want it to stop at some point when the tween/moving around of objects is done, so that I have talking time before playing the next tween with a click etc.
View 3 Replies
Aug 1, 2011
I want to create multiple layers where each layer has some graphics and buttons on it. I am using Flex so I like to do this using actionscript.
Does anybody know how to create a layer in actionscript?
How do you attach these layers to your stage?
View 4 Replies
Feb 25, 2011
-this is supposed to make multiple buttons with text(not clickable yet) -it seems to coppy over, or remove the previous myButtons[i] movieclip each time it goes through the loop. -there are 3 strings in buttonText.length -on the output i get 0,1,2 -but on the screen I only see one gradient (its only a pink box, but one problem at a time) -the box appears where roughly the 3rd button should be. -full code attached
View 14 Replies
Sep 10, 2005
the snow effect always acts like the top layer, ok what i mean is, i have 3 layers, (1)toplayer= a car, (2)middle= snow, (3)low= background.I want to make the snow to be seen behind the car...i hope you understand what i mean , whenever i put the code from the link above it acts as the top layer and appears in front of everything.
View 4 Replies
Jan 21, 2010
I have been using Flash since it was Flash 3 and AS2 for about 3 years now. I have never ever ever been a fan of buttons. I find them limiting and icky. I just moved to AS3 and OOP this week (it's about freakin time, I know). I am just wondering who here likes to use buttons and why? Is there a point to them? I mean, apparently with AS3, you just have to add "mc.buttonMode = true" and you are well on your way to having all the functionality you need without all the hassle or up states and all that.I am open to adopting new techniques and strategies if they are worthwhile so I am just curious as to what the community thinks. What are the pros and cons to using MovieClips as buttons instead of using an actual SimpleButton.
View 6 Replies
Sep 25, 2009
ActionScript Code:
#initclip 1
//Constructor
FSimpleButton = function(){
[code]....
when to play the script. but then it should act as a button, but then it just stay and can't click on it.
View 0 Replies
Jan 20, 2010
I created a movie clip (let's call it "mysymbol") that contains several buttons, as well as functions for MOUSE_OVER and MOUSE_OUT events ("mover" and "mout"). Everything works when the mouse enters "mysymbol" for the first time (mover is being called), but if I move the mouse inside mysymbol to another button, the MOUSE_OUT function (mout) is being called first and then immediately mover. Obviously, I don't want there to be any function calling at all! I have found a way to circumvent this, but since I'm new at this I struggle to get it to work properly:
If mysymbol is a button instead of a movie clip, then I can move my mouse freely within mysymbol without triggering any MOUSE_OVER or MOUSE_OUT events. However, there is another problem: I somehow can't get movie clips to work inside a button(I assume this is by design), so how do I get my animations etc. to work inside this button? is there an alternative to using a button as a container?
View 5 Replies
May 8, 2010
I'm trying to create a portfolio site and I'm running into some problems. I've built my main site on the timeline and all my buttons work fine the AS is very simple:
function goForward(event:MouseEvent):void {
if(currentFrame == totalFrames) {
gotoAndStop(1);
} else {
nextFrame();
}} next_btn.addEventListener(MouseEvent.CLICK, goForward);
But when I make Movie clips of a scenes with buttons in them (children?) to try and simplify the site, AS doesn't seem to recognize the instance name for the button in the Movie Clip. I get an error message:
1120: Access of undefined property next_btn.
I've put an invisible button over the mc and given it the next_btn instance name and it works although I would like to fix the buttons in the MC properly. Is it better to condense a site into movie clips and single frames or should I just have a long linear timeline that spans many frames?
View 3 Replies
Feb 28, 2012
I want to temporarily deactivate some movieclips that are used as buttons. Currently I don't keep track of the EventListeners that got added to these buttons. I want to be able to deactivate and reactivate them later.
myMc.mouseEnabled=false;
works, but then they are still select- and clickable using the TAB key on the keyboard.
View 3 Replies