Making a button open a scene when clicked

Im guessing this is linked to actionscript,
Ive made 2 buttons, One named Home, And another Exit,
When home is clicked i want it to open a certain scene in this case called S Home,
And when exit is clicked i want it to open the scene S Exit,
How to do this?
I will explain my problem more if needed,
You could maybe call this linking a button,
Only it opens a new scene rather than .html or an website

I figured it out. I read something about a "stop();" at the start of the second scene. What I figured out is that you have to add "stop();" to the start of any scene. (Excluding Movies I think.) So, to make a completely new scene with 1 button, and 2 scenes, do this: (Follow above topics as well.)
Scene 1:
stop();
myButton.addEventListener(MouseEvent.CLICK.doClickButton);
function doClickButton(e:MouseEvent):void {
     trace:("clicked");gotoAndPlay(1,"YourSecondSceneName");
Scene 2:
stop();
Thats it!
Thanks.

Similar Messages

  • Is it me or?, Window Buttons Do Not Work When Clicked

    Is it me or?, Window Buttons Do Not Work When Clicked
    What is going on in Snow Leopard.
    It seems Window buttons (X, -, +) Do Not Always Work when clicked.
    Sometimes window does opens, closes, minimizes and often times it does not.
    You have have re click like crazy
    Message was edited by: macguitarman

    What app are you using?
    Here's something strange I've noticed in Mail a couple times.
    For some reason Mail opens several viewer windows all stacked on top of each other.
    So while click the close button does close the window, there's an identical on behind it.
    So it almost seems like clicking the close button has done nothing but it really has.
    Could this be what your seeing?
    Matt

  • Multiple windows open in safari when click on web site.  Also can't change/edit DNS servers or any other changes in advance window of network tab

    macbook pro
    osx - mavericks
    multiple windows open in safari when click on web site.  Also can't change/edit DNS servers or any other changes in advance window of network tab.
    Basically every time i click on website other windows open and get redirected to other websites selling something (same as that mackeeper site which seems to open often)  Really ***** as in just a few minutes on the web I have many windows open and many are the same pages.  Can't make changes in the advanced tab of network as options are greyed out and the + & - symbols do nothing when clicked.  Hope there is an easy answer as surfing net is really sucking right now

    I hope to get some more info on a similar situation.
    I have a new Mac Pro, less than 2 months old. OSX 10.5 updated to 10.5.2. Quicktime updated too. When I use the Desktop and Screen Saver system pref, I can easily select and use one of the Apple supplied desktop pictures as a desktop background.
    But I wish to use a Photo from an iPhoto (iLife 08) folder / album as the desktop background. I can find all the albums, I can see all the icons for the pictures, I can select an iconed pciture and it appears in the top left of the preference pane (showing the effect of "fit to window" or "stretch to fit", etc). But all I get is a pale blue screen (which might be my default desktop colour). I don't get any of my iPhoto album pics to appear as a dektop background.
    There is one minor note on this, I don't keep the pictures in my iPhoto Library, I just reference them, and the originals are on a different internal disk.
    I've tried the suggestions above, trashing finder and desktop plists, killall Finder, etc. restart. Nothing gets it working again. It did work originally, for most of the time I've had the Mac Pro, then I changed the dektop to an Apple supplied picture of Earth.
    This affects both an Admin, and a standard user. The photos (and enclosing folders) are read / writable by the admin user, and readable by the Standard user. Both users can easily access the photos in their iPhoto. They open the original files on the second internal drive, and performing a right click - Show File shows the original file as expected. I've even emptied the iPhoto library completely and rebuilt it, just in case there was an issue here.
    Any ideas ? or anyone else seen this ? I don't really want to start reformatting disks and reinstalling the OS, but any suggestions short of this are extremely welcome.

  • I just updated to Firefox 17.0.1 and now I can't click on a bookmark to open it or open new tab when clicking new tab button.

    In FF 17.0.1 I have several bugs to mention. I am only able to open bookmarks by right clicking them and selecting Open In New Tab from the drop down menu. I am unable to open a new tab by clicking on the new tab button or by clicking open new tab from the FF drop down menu at top of browser. Also, none button work in FF, such as Home, Back, Forward, or refresh. This is so aggravating!!

    After I posted this, I restarted with add ons disabled and it worked..deleted a cpl of addons for compatibility checking and that fixed it.

  • New windows in Firefox 29 on Windows 8.1 don't open fully maximized when clicked through a link

    New problem in firefox 29:
    When I click a link that opens the new page in a new window, the window pops open in the last partially maximized state that it was in. Should I maximize the new window (in Windows 8.1) and close it and re-click the original link, the window opens again in the partially maximized state, not the last fully maximized state that I previously closed it in.
    To create it as I've encountered it:
    -go to https://news.google.com
    -click on any article. the default behavior should be to open the article in a new window
    -the window won't be maximized in my experience
    -you can maximize the window and then close the window/ article
    -re-click on the same article and the new window should appear again in the non-maximized state, not the fully maximized state that you closed it in previously
    One point of note. Right-clicking the same link that opens the new window and specifically choosing "Open Link in New Window" DOES open the new window in a fully maximized state. I repeat, the new window does open fully maximized when you choose "Open Link in New Window" from the right-click drop downs menu. But, this doesn't happen with the simple left-click, which I'm concerned with.

    Reverted back to version 28.0, 29 just isnt working, layout is a mess. (Ok i got the old layout back by installing and setting up Classic Theme Restorer, but once you remove the orange title bar, the screen resize bug appears.) Also its a very bad thing such a large graphical overhaul took place without prior notice. If i wanted google Chrome i would have just installed that, dont need FF to provide me with it. Might upgrade again if bugs and layout are changed, otherwise ill stay with 28.0 or maybe start using Waterfox.

  • Will not open new tab when clicked on the + next to open page

    firefox does not open new window when I click on the new tab +
    also does not open new tab when going through the file menu

    This issue can be caused by the Ask<i></i>.com toolbar (Tools > Add-ons > Extensions)
    See:
    * [[Troubleshooting extensions and themes]]

  • How to Open GUI Transaction when clicking in Hyper Link

    Hello All,
    I want to open GUI Transaction  when user will click on Hyper Link created in a particular column in a table view. For that I have created  Transaction Launcher ID using Transaction Launcher  Wizard. Then what will be the next step, i'm not getting. Can anybody help me out on this?
    Thanks in advance,
    Madhusudan

    Hi,
    Here is the sample code:
    DATA: lr_navigation TYPE REF TO if_crm_ui_navigation_service.
    lr_navigation = cl_crm_ui_navigation_service=>get_instance( me ).
    CHECK lr_navigation IS BOUND.
    lr_navigation->navigate( iv_link_id = 'ZLINKID' ).
    -ASB

  • Finder Windows always open new windows when clicking subfolders

    since i upgraded to 10.5.6, my finder windows only open new windows when I click on a subfolder. this is no matter what I do with the setting in preferences.
    Also, my finder windows no longer display the side bars with folder icons.
    I searched my library (and whole computer) for the finder preferences .plist file and can't find it. (was going to delete it and re-create it).
    Any ideas here?

    Thanks for the star.
    The default of Finder’s Find will not search that folder, but you can change the pulldown menu just beneath where it says Search, from Kind to System files by selecting Other from that menu and then scroll down the next window and check the box next to System files. You’ll then need to change the pulldown menu next to that to “include” instead of “don’t include.”
    The next time you do a search using Find, that pulldown menu will have System files as an option, if you think you might want to search for something in your home folder.

  • edited by host HARD DRIVE ICON WILL NOT OPEN ON DESKTOP WHEN CLICK

    my HD will not open on desktop when i click on it. For 4 years i had no problem on this every.
    why does this happen now?
    what is wrong with the icon?
    could my HD start becoming bad?
    what are some signs that i should be "aware of" is this one?

    You might try booting from DVD or another drive and running Disk Utility and Disk Warrior.
    Or Single Users Mode (command s on startup) and follow on-screen instruction command
    /sbin/fsck -fy
    to repair your boot drive
    ... or a Safe Boot with shift key held down.
    Corrupt prefs, directory, could be a number of small or major things.
    But, in any case, make sure you have backups, and a bootable backup clone, maybe an emergency boot drive as well (install OS X on another drive if you don't have one now).

  • How to open an image when clicking in a word.

    Im working in a demo for an interactive book for ipad using the Digital Publishing Suite > Folio Builder and i need to be able to open a specific image when clicking in a word. I havent found any tutorial that shows how to do this can somebody please point me in that right direction?  thx so much

    Download Bob Bringhurst's DPS Tips app from the app store and/or watch my lynda.com DPS Essentials Course. If you don't have a subscription you can get a free one week trial here: lynda.com library | Trial Subscription

  • I lost the function of opening new websites when clicking on icon Firefox on desktop

    Hi!
    Previously, when I had e.g. hotmail open (or any other actual web site), and wanted to check up on other web sites for answering questions, or for checking up informations on other web sites (e.g. Wikipedia, or Library services etc.) I could open these sites by clicking on the Firefox icon on my desktop. Now, I only seem to be able to open one site, no matter how many times I click on Firefox icon; nothing happens. In order to open up other sites, I have to close down the actual open site and click up the wanted site by clicking on the F. icon.
    I would like to be able to open several windows and check upon information from various sources.
    What can I do to get the function back?
    Best regards,
    K. Henriksson

    Can you open a new window using File > New Window or {Ctrl + N} ?
    If not, do you have that problem when running in the Firefox SafeMode? <br />
    [http://support.mozilla.com/en-US/kb/Safe+Mode] <br />
    ''Don't select anything right now, just use "Continue in SafeMode."''
    If not, see this: <br />
    [http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes]

  • Apps open then close when clicked

    Some of my apps open and then close real quick, unable to open at all, sometimes when I do an update ( of an unrelated app) then the programs will open when clicked? One of the apps are iBank. Any ideas.

    Buddy i am also  facing the same problem in my apple iphone4 i make try to sync all the apps through itune , and i think so that you solve your issue through this effort , just tell me after using this process

  • Making a button open up another JFrame when clicked? [NetBeans]

    Im having trouble with this.. Im using NetBeans.

    sorry about being snarky, but if the op wants a helpful answer, then s/he needs to ask a helpful question. Just saying "I'm having trouble with this" tells us nothing. To the OP if still out there:
    1) Describe your problem. Be as specific and precise as possible.
    2) Show code that you have tried and describe what doesn't work and where. If you get error codes, post the entire stack trace (but read it carefully first -- your answer is often found there).
    3) Put as much care and dilligence in asking your question as you'd like someone to use in answering it.
    Good luck.
    /Pete

  • PLEAS help opening a frame when clicking a button

    i have a applet and when i click on a button it opens a frame. i have atried a couple of things but the frame does not open. Can anybody Please help
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    public class mainscreen1 extends Applet implements ItemListener, ActionListener
    private Image layout1;
    private int frame;
    private int xpos,ypos,xdir,ydir;
    public TextField tn, tt1, tt2, total;
    public int value, ticketnum, sum;
    public Label title, seat, need, payable;
    public Button b1, b2;
    Mydialog1 d;
    public void init()
         setBackground(Color.pink);
    setSize (600, 460);
    setLayout(null);
         xpos = getSize().width/-1400;
         ypos = getSize().height/12;
         layout1 = getImage(getDocumentBase(),"layout1.gif");
    title=new Label("Almeida Theater booking system");
         title.setBounds(150,0,185,30);
         add(title);
    seat=new Label("Please choose a seating location:");
         seat.setBounds(300,40,190,25);
         add(seat);
    payable=new Label("Total Payable:�");
         payable.setBounds(300,390,100,30);
         add(payable);
         need=new Label("Please enter the number of seats needed:");
         need.setBounds(300,180,245,30);
         add(need);
         CheckboxGroup radio = new CheckboxGroup();
         Checkbox Stalls = new Checkbox("Stalls", true, radio);
         Stalls.setBounds(490,40,60,25);
         add(Stalls);
         Stalls.addItemListener(this);
         Checkbox Balcony = new Checkbox("Balcony", false, radio);
         Balcony.setBounds(490,65,65,25);
         add(Balcony);
         Balcony.addItemListener(this);
         Checkbox Concessions = new Checkbox("Concessions", false, radio);
         Concessions.setBounds(490,90,94,25);
         add(Concessions);
         Concessions.addItemListener(this);
    Button b1=new Button("Quote");
         b1.setBounds(20,395,80,30);
         add(b1);
         b1.addActionListener( this );
         Button b2=new Button("Confirm booking");
         b2.setBounds(110,395,100,30);
         add(b2);
         b2.addActionListener( this );
         tt1=new TextField(60);
         tt1.setBounds(300,250,270,30);
    add(tt1);
         tt1.addActionListener(this);
         tt2=new TextField(60);
         tt2.setBounds(300,300,150,30);
         add(tt2);
         tt2.addActionListener(this);
         tn=new TextField(3);
         tn.setBounds(545,180,30,30);
         add(tn);
         tn.addActionListener(this);
         total=new TextField(5);
         total.setBounds(400,390,45,30);
         add(total);
         total.addActionListener(this);
    public void itemStateChanged(ItemEvent e)
         String c1 = (String) e.getItem();
         if (c1 == "Stalls")
              value = 20;
         else if (c1 == "Balcony")
              value = 15;
         else
              value = 10;
         tt1.setText("You have chosen to sit in the " + c1 + " area");
         tt2.setText("Each seat will cost: �" + value);
         repaint();
    public void actionPerformed ( ActionEvent e )
    if( e.getActionCommand() == "Quote" )
         //String sum = (String) e.getItem();
    //sum = value*ticketnum;
         //Ssumtotal
         //total.setText(sum);
    else if( e.getActionCommand() == "Confirm booking")
    d = new Mydialog1(new Frame());
              ticketnum = Integer.parseInt(tn.getText());
              repaint();
         public void paint(Graphics g)
              g.setColor(Color.black);
              g.drawString ("You have chosen:" + ticketnum +" seats", 300, 365);
              g.drawImage(layout1,xpos,ypos,null);
    Above is the 1st screen and when i click
    confirm booking it don't open the frame, which is below:
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Mydialog1 extends Frame implements ActionListener
    public Label title;
    public Button b1, b2;
    public void init()
         setBackground(Color.pink);
    setSize (600, 460);
    setLayout(null);
         setLocation(320,140);
         setVisible(true);
         Mydialog1(Frame f);
    title=new Label("Almeida Theater booking system");
         title.setBounds(150,0,185,30);
         add(title);
         Button b1=new Button("Close");
         b1.setBounds(20,395,80,30);
         add(b1);
         b1.addActionListener( this );
         Button b2=new Button("Proced with booking");
         b2.setBounds(110,395,100,30);
         add(b2);
         b2.addActionListener( this );
    public void actionPerformed( ActionEvent e )
    if( e.getActionCommand() == "Close" )
    this.dispose();
    else if( e.getActionCommand() == "Proced with booking")
    setBackground(Color.blue);
    Can anyone help also can anyone explain how i do calcualtions on the mainscreen.calss. the bit that says Quote. it has // cos i canot get it to work
    PLEASE PLEASE

    no, you dont have to create a new class.
    here is your own code. This time we pass the parameters to another method, and
    not the constructor.
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    public class mainscreen1 extends Applet implements ItemListener, ActionListener
    private Image layout1;
    private int frame;
    private int xpos,ypos,xdir,ydir;
    public TextField tn, tt1, tt2, total;
    public int value, ticketnum, sum;
    public Label title, seat, need, payable;
    public Button b1, b2;
    Mydialog1 d;
    String c1;                   // obs
    public void init()
    setBackground(Color.pink);
    setSize (600, 460);
    setLayout(null);
    xpos = getSize().width/-1400;
    ypos = getSize().height/12;
    layout1 = getImage(getDocumentBase(),"layout1.gif");
    title=new Label("Almeida Theater booking system");
    title.setBounds(150,0,185,30);
    add(title);
    seat=new Label("Please choose a seating location:");
    seat.setBounds(300,40,190,25);
    add(seat);
    payable=new Label("Total Payable:�");
    payable.setBounds(300,390,100,30);
    add(payable);
    need=new Label("Please enter the number of seats needed:");
    need.setBounds(300,180,245,30);
    add(need);
    CheckboxGroup radio = new CheckboxGroup();
    Checkbox Stalls = new Checkbox("Stalls", true, radio);
    Stalls.setBounds(490,40,60,25);
    add(Stalls);
    Stalls.addItemListener(this);
    Checkbox Balcony = new Checkbox("Balcony", false, radio);
    Balcony.setBounds(490,65,65,25);
    add(Balcony);
    Balcony.addItemListener(this);
    Checkbox Concessions = new Checkbox("Concessions", false, radio);
    Concessions.setBounds(490,90,94,25);
    add(Concessions);
    Concessions.addItemListener(this);
    Button b1=new Button("Quote");
    b1.setBounds(20,395,80,30);
    add(b1);
    b1.addActionListener( this );
    Button b2=new Button("Confirm booking");
    b2.setBounds(110,395,100,30);
    add(b2);
    b2.addActionListener( this );
    tt1=new TextField(60);
    tt1.setBounds(300,250,270,30);
    add(tt1);
    tt1.addActionListener(this);
    tt2=new TextField(60);
    tt2.setBounds(300,300,150,30);
    add(tt2);
    tt2.addActionListener(this);
    tn=new TextField(3);
    tn.setBounds(545,180,30,30);
    add(tn);
    tn.addActionListener(this);
    total=new TextField(5);
    total.setBounds(400,390,45,30);
    add(total);
    total.addActionListener(this);
    public void itemStateChanged(ItemEvent e)
    c1 = (String) e.getItem();
    if (c1 == "Stalls")
    value = 20;
    else if (c1 == "Balcony")
    value = 15;
    else
    value = 10;
    tt1.setText("You have chosen to sit in the " + c1 + " area");
    tt2.setText("Each seat will cost: �" + value);
    repaint();
    public void actionPerformed ( ActionEvent e )
      if( e.getActionCommand() == "Quote" )
        //String sum = (String) e.getItem();
        //sum = value*ticketnum;
        //Ssumtotal
        //total.setText(sum);
      else if( e.getActionCommand() == "Confirm booking")
        int nr_seats = Integer.parseInt(tn.getText());
        total.setText("" +nr_seats*value);
        d = new Mydialog1();
        d.set_text(c1, nr_seats); // pass the c1 and the nr_seats vriables to the
                                  //  set_text method in the Mydialog1 class.
      ticketnum = Integer.parseInt(tn.getText());
      repaint();
    public void paint(Graphics g)
    g.setColor(Color.black);
    g.drawString ("You have chosen:" + ticketnum +" seats", 300, 365);
    g.drawImage(layout1,xpos,ypos,null);
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Mydialog1 extends Frame implements ActionListener
      public Label title;
      public Button b1, b2;
      TextField tf; ///***/
      public Mydialog1()
        setBackground(Color.pink);
        setSize (600, 460);
        setLayout(null);
        setLocation(320,140);
        //Mydialog1(Frame f);
        title=new Label("Almeida Theater booking system");
        title.setBounds(150,0,185,30);
        add(title);
        Button b1=new Button("Close");
        b1.setBounds(20,395,80,30);
        add(b1);
        b1.addActionListener( this );
        Button b2=new Button("Proced with booking");
        b2.setBounds(110,395,100,30);
        add(b2);
        b2.addActionListener( this );
        tf = new TextField();                    //new
        tf.setBounds(230, 395, 100,30);   //new
        add(tf);                                       //new
        setVisible(true);
      public void actionPerformed( ActionEvent e )
        if( e.getActionCommand() == "Close" )
          this.dispose();
        else if( e.getActionCommand() == "Proced with booking")
          setBackground(Color.blue);
       *  Folowing method can take two parameters. One string and one int.
      public void set_text ( String seat_type, int nr_seats ) 
        tf.setText (seat_type +". "  +nr_seats);
    }

  • How to make a button appear boxed in when clicked

    For my Prototyping class I have to make an interactive fast food ordering system. I have majority of frames made I just need to add the interactive part to it. I am using AS2 in Flash CS3. I have the picture and the text grouped and are classified as a button. I want to make it so that when the picture or text is clicked it will make a black box appear around it, making it 'selected'. I've tried to add an Event Listener but couldn't figure out how to make the box appear on it. Any suggestions?
    These pictures are basically what I'm trying to accomplish.
    Keep in mind, I'm a Flash newbie, I have a probably 3 hours experience with Flash.
    But I do have knowledge of basic Java commands, so I can understand code.
    Thanks,
    Dudejoe04

    Onw way would be to create the buttons as movieclips so that when they are selected you move the movieclip's timeline to a rame that shows the rectangle around it.  Another way would be to have the movieclips as separate objects that you make appears when its associated button is clicked.  There are likelynumerous other possibilities.

Maybe you are looking for

  • Applie iPad 2

    PLease tell me how to restart my iPad 2 - it just stopped working

  • Content alignment problem

    Alignment on all web pages is off, sign in boxes are gone, calenders overlap, graphics gone

  • I want to add radio button selected value in shopping cart

    hi i am new to java and i am doing shopping cart project and i want to aad radio button selected value in cart but only one value. i am doing that in jsp. when iam adding that value the name of radio button is printed. and in remove page nothing disp

  • Sound for the cd player not working

    I've just about worn out my resources on this one. The OS is 98, the motherboard is msi 648 max, I downloaded the sound drivers loaded them onto the computer.  Sound works on everything except the cd player I checked the regedit, and everything seems

  • Where is QT Pro registration number in App. Support?

    I've had to move to a new machine. My QT Pro is automatically registered under my FCP "Pro Application" thing. How can I find my QT Pro registration number on my old machine so I can use it on my new machine. Thanks.