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


Similar Posts:


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

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 :: Linking Buttons Inside Movieclips To Frame Labels?

Feb 17, 2009

I've been working on a new issue while giving a break on cracking the other one.I have a movie clip acting as a button with rollover/rollout animation- we'll call it menu_mc for simple reference.I'm basically creating a rollover submenu. I've set it up a few different ways but the most user friendly has been hiding the submenu_mc (which has 4 linked buttons to root frame inside) by doing:

_root.sub5_mc._visible = false;
then inside the menu_mc with the rollover I have the submenu trigger set to show:
_root.sub5_mc._visible = true;

[code]........

View 3 Replies

IDE :: Make The Movieclips That Act As Buttons Play Certain Frame On Time Line?

Feb 24, 2009

URL...My question is how can i make the movieclips that act as buttons play a certain frame on my time line? ....i don't know where or what to insert.

View 1 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

GotoAndPlay Any MovieClips Timeline In Library?

Nov 23, 2010

I was wondering if there is a way to tell flash to navigate to a movieclips timeline without that movie clip being on stage or having an instance...

For example i have MovieClip1 in my Library and its named MovieClip1...but its not located on the stage...

View 6 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

ActionScript 2.0 :: GotoAndPlay - MC1 Has Stopped On The First Frame?

Oct 11, 2004

i am having trouble with my gotoAndPlay in my MC.i have An MC1 on main stage then inside it i have another MC2. Now on my MC1 i want wen it comes to frame 15 to go and play starting frame2 on MC2,so in MC1 frame 15 i put mc2.gotoAndPlay(2);But nothing happens.Oh yea MC1 has stop on the first frame.

View 2 Replies

ActionScript 2.0 :: GotoAndPlay To Another Frame With The Value Adds To 5?

May 6, 2008

I have two buttons one that adds 2 and one that adds 3.

Code:
score.text = 0;
add2.onPress = function():Void {
score.text = Number(score.text) + 2;[code]....

I want to gotoAndPlay to another frame with the value adds to 5. Say if I press the add2 button and the add3 button, I want to go to another frame.I tried making score.text a variable and it didn't work.

If (score.text =5){
gotoAndPlay(1);
}

View 2 Replies







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