ActionScript 3.0 :: Click Two Buttons && GotoAndPlay (next Frame)?

Nov 12, 2011

The objective is when user clicks on any combination of 2 buttons you would then gotoAndPlay a new page based on the two specific buttons you have selected? Ideally user would be able to intermix the button combinations. I've attached a simple diagram that visually explains objective of actionscript.Code below only works for two specific buttons, but doesn't allow to intermix button clicks.[code]

View 0 Replies


Similar Posts:


ActionScript 3.0 :: Click Two Specific Buttons Then GotoAndPlay New Frame

Nov 7, 2011

I want the user to click two specific buttons (order doesn't matter), then gotoAndPlay a new frame. In other words, the user must click two buttons before going to the next frame. I've been trying different methods, but I am honestly not brilliant with conditional statements or booleans.
Button1 then Button2 = next Frame

This is what I've got so far...
about_btn.addEventListener(MouseEvent.CLICK, clickAbout);
home_btn.addEventListener(MouseEvent.CLICK, clickMain);
if (function clickMain(event) && function clickAbout(event)) {
trace ("holy cow!");
}

View 4 Replies

ActionScript 2.0 :: MovieClips With Buttons - GotoAndPlay Frame

Mar 30, 2009

I have my main stage upon which I have 4 movieclips with buttons over the top of them. The movieclips are essentially boxes and are all on the left hand side of the stage. I am making a presentation of various projects I have been working on and the idea is that when I click on a button, the movieclip below moves slightly to the right (clear of the other buttons) and gets larger to fill the rest of the space on the stage. My project is then displayed in that box.

When I click on the button the movieclip underneath it is told to goto frame 2 and play. For this example lets call it MC1. Once the button is clicked it goes to frame 2 of MC1 and plays a shape tween (basically the box moves and gets larger). I disable all other buttons on the page. Once it has finished I have added a button in the top right to basically do the reverse (i.e move the box back to its orginal size and location. I then enable all of the buttons.

This works fine in principal because I can view all of the movieclips individually but just have to close them before I can look at the next one. The only reason I disable all of the buttons is because if I don't do that and happen to click on one of the other buttons they do the same thing as the first MC1, but MC1 stays in place and doesn't return to its original size. Is there actionscript to basically do the following:

1) I click on MC1 - it opens and shows my project.
2) I then happen to click on MC3 and it will close MC1 and then open MC3.

However, the order in which I press the buttons could be completely random so I could go from MC2 to MC4, MC 2 to MC1 etc. I know that I cant just add code that says on(release) of a button gotoAndPlay the frame that makes the Movieclip back to its original size, for all of the movieclips simply because not all of the movieclips are open it is just one of them. Is there some sort of script that remembers the last button or movieclip that was used? I am sure there must be some 'If' ''Then' statements involved but again I am stabbing in the dark.

View 2 Replies

ActionScript 2.0 :: Click All The 5 Buttons That It Will Move On The The Next Frame?

May 26, 2010

i am making a spot the difference in macromedia flash mx 2004 (which i think is actionscript 2.0) i need it so when i click all the 5 buttons that it will move on the the next frame.

View 4 Replies

ActionScript 3.0 :: Remove A Dynamic Textfield When I Click One Of 2 Buttons Which Moves To Another Frame?

Nov 11, 2009

I am trying to remove a dynamic textfield when I click one of 2 buttons which moves to another frame.I can't seem to get it off the screen. removeChild works but it removes it totally and its not there when its suppose to be.

View 4 Replies

ActionScript 3.0 :: GotoAndPlay Command - Play Frame To Frame

Nov 29, 2009

In this bit of code is there anyway to adjust the gotoAndPlay Command to play from frame 114 to frame 200. Are there any commands that will do this. I want it to play from frame 114 to frame 200 when a button is pressed.

[Code]...

View 1 Replies

Flash :: Single Frame Loop - Gotoandplay Same Frame

Nov 7, 2011

I'm having trouble with something that should be incredibly basic, yet i have no idea how to solve my problem.

[Code]...

it shows x as being 3 when you hit the button but it reverts back right away, so it looks like gotoAndPlay(2) is still playing frame

1. how do i stop it from reseting my variables?

View 1 Replies

ActionScript 2.0 :: GotoAndPlay A Particular Frame (frame A) When The Cursor Is On A Button

Jul 10, 2007

I am making a website with a flash menu. I want it to gotoAndPlay a particular frame (frame A) when the cursor is on a button. When you roll the cursor off of the button I want it to gotoAndPlay a different frame (frame B). That part was easy enough. But here is the problem. If you click on the button I want it to continue playing frame A even when you roll off.

View 3 Replies

Flash :: GotoAndPlay() Jumps To Frame 2 Instead Of Frame 3

Sep 7, 2011

I am really confused about this issue ...

In the first Frame i wrote the following code:

stop();
var currentInterInfo:IntersectionInfo = null;
var currentInter:Intersection;
gotoAndPlay("Frame3");

[Code]....

When I run it, i get "Frame 2" in the output although i should get "Frame 3" as a result ... and When I debug, i get "Frame 3" ...

View 1 Replies

ActionScript 2.0 :: GotoAndPlay From Frame Xx Then Stop On Frame Xx?

Nov 4, 2009

wondering if this is possible. I have a button and want it to play from let's say frame 10 to frame 15I'm starting with this:

on (release) {
//Movieclip GotoAndPlay Behavior
this.gotoAndPlay(10);

[code].......

View 3 Replies

ActionScript 3.0 :: GotoAndPlay In Reverse / Frame To Frame

Sep 7, 2011

I currently have 3 major sections in my Flash file, and need to be able to play the frames backwards, within each segment, if the user so chooses to click the back button.Let's say it's on Frame 250 (or any other spot on the respective timeline for each section) and the user clicks the back button, I want to be able to "gotoAnyPlay" Frame 225 to Frame 220.So, jump from current Frame 250, start playing on Frame 225, play to 220, and then stop.

View 4 Replies

ActionScript 2.0 :: XML Preloader In The Same Frame With Out Using GotoAndPlay(); To Next Frame

Dec 22, 2006

does anyone knows any way to code xml preloader? i need the XML preloader in the same frame.....not in two frmaes or with out using gotoAndPlay(); to next frame...

View 3 Replies

ActionScript 2.0 :: GotoAndPlay X-frame Of MC When Another MC Reaches Y-frame?

Apr 24, 2007

how can I gotoAndPlay x-frame of MC when another MC reaches y-frame?

View 1 Replies

Stop Movie Then GotoAndPlay On Mouse Click

Apr 9, 2009

I have a presentation which is one movie clip in one frame on the main timeline. The movie clip has quite a lengthy timeline. What I need to do is stop the movie at a frame then play on mouse click and in some cases gotoandplay, then stop again. There are no other movie clips inside the main movie clip and I want there to be no buttons. Just proceed to the next bit on mouse click.

View 2 Replies

ActionScript 3.0 :: Gotoandplay Error On Double Click?

Aug 4, 2009

I have made a flash site with AS3. All links works fine but the error is when I double click on anylink it goes to next defined link automatically.

You can check the website at: [URL]

bt_home.addEventListener(MouseEvent.CLICK,clickFun ction1);
function clickFunction1(evt:MouseEvent):void {
gotoAndPlay(1);
}

[Code].....

View 1 Replies

ActionScript 3.0 :: Changing GotoAndPlay Value With Mouse Click?

Feb 13, 2012

I have a movieclip on my stage, within this movieclip there are two frames, frame 1 shows a sun, frame 2 shows a moon. The way i determine which is shown at the moment is by using the getTime function. Quite nifty as it displays the sun in the day and the moon at the night.However i wish to demo this to my client (without sitting there at midnight to witness the change ).So i want to be able to quickly show them what it does, just by clicking the moon, but this isn't working, im guessing the getTime if statement is overriding my measly mouseClick authority.

Code:
import flash.events.Event;
import flash.events.KeyboardEvent

[code].....

View 3 Replies

IDE :: GotoAndPlay A Frame In An MC, Within A Swf Within A Swf?

Oct 22, 2009

hen you click on a button within my swf it loads an external swf into an MC that sits on top of the 1st swf, which continues to play underneath.Within swf2 I have lots of pages that you can navigate to, which works fine on its own, but not when I try to play it through swf1.When I click on any of the navigation buttons they don't work.I've tried making an MC within swf2, putting all the pages in there and on the navigation buttons doing:

on(release){
_root.swf2MC.gotoAndPlay("frame");
}

[code]....

View 2 Replies

ActionScript 3.0 :: Buttons - GotoAndPlay At Different Frames

Mar 19, 2009

I got 2 buttons that i want them to gotoAndPlay at different frames... here is the code

[Code]...

when i play the .swf i get an error message

View 3 Replies

GotoAndPlay(frame#); Not Working?

Sep 28, 2009

I've got a simple button that when clicked needs to go to a particular frame and stop when it hits the stop(); however when I test it I get a type error #1009 Cannot access a property or method of a null object reference. at PostCard_fla::MainTimeline/frame25()

I need to be able to tell it what frames to go to manually so the user can jump around the time line using short animated transitions between pages (set up like a web page) in AC2.0 this was easy, but its different in AC3 and I'm not quite sure what I'm doing wrong.

This is my code:

stop();
btn_flip.addEventListener(MouseEvent.CLICK, buttonClick);
function buttonClick(event:MouseEvent):void{
gotoAndPlay(28);
};

View 1 Replies

ActionScript 2.0 :: GotoAndPlay(20) Going To Frame 1?

Jan 13, 2009

I am using Flash CS3 with AS2 to write code that will fade images in and out, looping from the last frame back to frame 20. Loading the images with XML is working, as is the fading in and out. Unfortunately, when it reaches frame 390 it loops back to frame 1 instead of frame 20.In frame 390 I tried using gotoAndPlay(20) to code the loop. Then I tried using _root.gotoAndPlay(20); but this did not work either. I am not sure why it is playing frame 1 instead of 20.

View 3 Replies

ActionScript 3.0 :: Gotoandplay From A Different Frame?

Aug 20, 2009

Quick way to write the following code please (i know it's simple - i just don't know how)

if (images.currentFrame == 24 || images.currentFrame == 25 || images.currentFrame == 26|| images.currentFrame == 27|| images.currentFrame == 28|| images.currentFrame == 29)
{[code]....

basically; if the MC frame number is between 24 and 29 (greater than 24 but less than 29) i want it to gotoandplay from a different frame.

View 6 Replies

ActionScript 3.0 :: Can't Get To The Next Frame() Or GotoAndPlay

May 6, 2010

I have a flash file that the action scripts doesn�t appear to work. It is regarding a form turned into a movie clip. I copied the action script and format from a tutorial from this web site (Kirupa Flash_php_email.fla). It�s a fairly easy tutorial, but I can�t get it to work. Essentially, after the user fills out the name, email, and message fields, he clicks on the send button. I�m trying to copy the same concept into my fla file. The send button loads the variables and sends an email out to the user. I�ve been able to get that portion to work with the email.php file. It will return an email to the user, but the movie just seems to pause and not advance to the next frame. The data the user inputs remains on the screen. I�m not sure if a stop command is preventing it from moving to the next frame or not. What I can�t get the done is to go to the next frame where the user is told �Thank You� and clicks on the Continue button.

I have an action script layer and on frame 118 it has the stop(); command I have a layer called �txt�. On frame 118, all the input text fields named, name, email, and message have been grouped together then converted to a movie clip called form. On that same layer, on frame 119 I have labled those group of frames �ThankYou�, which also displays the Thank You and a Continue button.

Here is the actionscript on frame 118 for the movie clip �form�

[original script from tutorial]
onClipEvent(data){
//show the welcome screen
_root.nextFrame();
}

[code].....

View 5 Replies

ActionScript 3.0 :: Use GotoAndPlay Comand With Multiple Buttons?

Oct 15, 2009

How do I use gotoAndPlay comand with multiple buttons.
 
WORKS:

AA.addEventListener(MouseEvent.CLICK, release);function release(evt:MouseEvent):void {gotoAndPlay(5);}
 
DOESN'T WORK:

AA.addEventListener(MouseEvent.CLICK, release);function release(evt:MouseEvent):void {gotoAndPlay(5);}
BB.addEventListener(MouseEvent.CLICK, release);function release(evt:MouseEvent):void {gotoAndPlay(10);}

View 4 Replies

ActionScript 3.0 :: GotoAndPlay Buttons Want To Play Movie?

Dec 17, 2009

I have buttons that i've created to play a movie clip.My movie has labels for different parts of the movie.
 
on_btn.addEventListener(MouseEvent.CLICK, turnOnTv);
 
function turnOnTv(event:MouseEvent):void{    gotoAndPlay (20);}
 
Do I have to put the name of the movie clip that should play?

View 2 Replies

ActionScript 3.0 :: Linking Buttons On Webpage With GotoAndPlay

Apr 16, 2011

I'm making a simple web with 4 buttons. And I made the respective links, with gotoAndPlay in as3. Everything is working good, but when I click on the last button, the btn 4, and then want to go to the btn 3 it doesn't work. It only work, when I want to go from button 4 to 2, and 4 to 1. Why is happening this?

Here is the code:
stop();btn1.addEventListener(MouseEvent.CLICK,funcion1);
function funcion1(evt:MouseEvent):void { gotoAndPlay(10);};
btn2.addEventListener(MouseEvent.CLICK,funcion2);
function funcion2(evt:MouseEvent):void { gotoAndPlay(20);};
btn3.addEventListener(MouseEvent.CLICK,funcion3);
function funcion3(evt:MouseEvent):void { gotoAndPlay(30);};
btn4.addEventListener(MouseEvent.CLICK,funcion4);
function funcion4(evt:MouseEvent):void { gotoAndPlay(40);};

I'm sure all the buttons have the instance name in all frames (10;20;30;40)

View 5 Replies

ActionScript 2.0 :: Loadmovie And Gotoandplay A Frame?

Feb 23, 2009

I have a created a menu and the pages are on a seperate swf file which is to be loaded onto the top of.

firstly i used this code but it still only went to frame 1 of the laoded movie:

on (release) {
loadMovie("a2.swf", 1);
_level1.gotoAndStop(15);
}

then i found this code. But i cant get it to work correctly. does it go on frame one of the movie or on the button instance?

[Code]...

View 1 Replies

ActionScript 2.0 :: GotoAndPlay From First Frame On Same Timeline

Mar 23, 2010

I've got a timeline and four buttons which each gotoandplay from the first frame on the same timeline. But I want each button to Stop() at different frames on the same timeline. So is it possible to do a GotoAndPlay ... And Stop function on a button in flash?

View 3 Replies

ActionScript 3.0 :: GotoAndPlay Going To The Wrong Frame?

Feb 24, 2010

I am trying to create a Play Again button on my game. When the game finishes a menu comes up on the screen with a play again button. The menu is created using a class and the button event is created and handled in the actionscript in the current frame. The button event handler makes a call to gotoAndPlay(currentFrame, "scene").
 
Whenever the button is pressed however it takes me to the next frame, for example if the current frame is 3 it will show frame 4. Usually the button is removed from the stage when the button is clicked but if i disable that and the button remains, you can click on it again and it it will take u to the correct scene, and again will take you to the next scene and back again and so on..

View 5 Replies

Flash - Countdown From 60 To 0 Then GotoAndPlay Next Frame

Feb 24, 2010

My timer counts down from 60 to zero. I want my movie to go to the next frame at zero count. How would I make a condition to go from frame 1-2? I need to find the right operator and values, but I get lost in the strings.

What I am trying
If (something is <> == true false);
gotoAndPlay(2);
stop();
//
var timer:Timer = new Timer(100, 300);
timer.addEventListener(TimerEvent.TIMER, countdown);
[Code] ....

I'm making several experiments like this to understand conditionals. I need to build objects that function similar to preloaders.

View 3 Replies

ActionScript 3.0 :: GotoAndPlay Frame In External Swf

May 19, 2010

Im going to make a page in flash as3, and now I have build the most of it. I will now load an external swf into the main swf, to save people for too must waiting time... my issue with normal words: I want to have a number of buttons. When you click on button 1 the first external swf load with a fade animation. Now when I would see whats behind button 2, is should animate the first swf out and remove it from the stage, to save wating time.... and the same should happend if i have 5 menu buttons...

[Code]...

View 0 Replies







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