Two-button click

Hello.

I have a puzzle, which I can't seem to difficult.

I have a button on the stage that works very well and perform various actions.

I have a movie clip on the stage, which contains 10 different buttons that when you click on the button next and done different things and so on and so forth. Once again independently this clip with buttons works fine.

What I want to do but is it...

I want to click on the home button on the stage, have that 'click' are replicated to the other button in the movieclip so that I can action both with a single element.

Any ideas please?

Thank you

If you have an object (for example, mc.btn1) with an onRelease handler defined, you can use;

MC.btn1.onRelease)

to trigger this Manager.

Tags: Adobe Animate

Similar Questions

  • How can I have two buttons for 'new tab' in version 4?

    In version 3.x, there is a removable button on the toolbar for 'new tab' plus a button '+' at the end of the address of the open tab I could click to create a new tab.
    In version 4, I can have the removable button, but I do not see how to add the button at the end of the address of the open tab. I can move the single button at the end of the address window, but I can't have two buttons.
    Is it still possible?

    You must drag the button new tab (+) of the tabs to another toolbar toolbar to make the second button to appear.

    "Firefox > Options > toolbars" or "view > toolbars > customize.

  • I have an iMac (2015).  When I open Garageband, there are only two buttons on the control bar, play and stop.  No record button, rewind or ff.  Where are they and how can I make it appear?

    I have an iMac (2015). When I open Garageband, there are only two buttons on the control bar, play and stop. No record button, rewind or ff. Where are they and how can I make it appear?

    Try to enlarge the GarageBand window by dragging the corners of resizing.

    If she looks like this, your window is small:

    You can also try to click the double arrow at the end of the toolbar to reveal more options.

  • Adding fields to a Manager different button clicks

    if (field == buttonField && label.equals("First")) {
                LabelField label = new LabelField("1");
            add(label);
            buttonField.setLabel("Last");}
    else if (field == buttonField && label.equals("Last")) {
            buttonField.setLabel("First");
            labelField2 = new LabelField("2");
            add(labelField2);
            labelField3 = new LabelField("3");
            add(labelField2);
    }
    

    Here is an example of my FieldChangeListener. It is clear what he does (even for me clear ). It simply adds fields - a field to the first button clicks - and two others to the second click.

    What I want to do is to add these fields to a manager - regardless of the vertical or horizontal, I just need to get the concept of how it should be done. The idea is to build a manager at the first click on a button and add labelField. When the second click occurs, I need this Manager to add an other field (s), for example as in my example code.

    Could you please indicate the way to do this? It might be very obvious of sth, yet lack me.

    EDIT: spelling errors, sorry...

    Edit2: Can it be reached via setter/getter?

    Setter / getter did the trick.

    if (field == buttonField && label.equals("First")) {
                getHFM();
                    LabelField label = new LabelField("1");
            setHFM().add(label);
            buttonField.setLabel("Last");
    }
    else if (field == buttonField && label.equals("Last")) {
            buttonField.setLabel("First");
            labelField2 = new LabelField("2");
            setHFM().add(labelField2);
            labelField3 = new LabelField("3");
            setHFM().add(labelField2);
    }
    
    public HorizontalFieldManager getHFM(){
            hfm = new HorizontalFieldManager(USE_ALL_WIDTH);
            add(hfm);
            return hfm;
    }
    public HorizontalFieldManager setHFM() {
            return hfm;
    }
    
  • Display two buttons

    Hello

    I try to display two buttons. I wrote the following code:

    import java.awt.*. *;

    Javax.swing import. *;

    public class Gui32B {}

    Public Shared Sub main (String [] args) {}

    JFrame frame = new JFrame ();

    frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);

    frame.setSize (new size (300, 100));

    frame.setTitle ("a frame");

    frame.setLayout (new FlowLayout());

    JButton button1 = new JButton ();

    Button1.SetText ("I'm a button");

    Button1.setbackground (Color.Blue);

    Frame.Add (button1);

    JButton button2 = new JButton ();

    Button1.SetText ("Click Me");

    Button1.setbackground (Color.Red);

    Frame.Add (button2);

    frame.setVisible (true);

    }

    }

    His poster the 2 buttons, but there is no text on the first button. The 2nd button also has a transparent top rectangle. Some body please correct my program. I used the border and the flow of page layouts.

    Zulfi.

    Hello

    I am able to run the code:

    import java.awt.*. *;

    Javax.swing import. *;

    creation of 2 buttons

    no visible Button2

    public class Gui3 {}

    Public Shared Sub main (String [] args) {}

    JFrame frame = new JFrame ();

    frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);

    frame.setSize (new size (300, 100));

    frame.setTitle ("a frame");

    frame.setLayout (new FlowLayout());

    JButton button1 = new JButton ();

    Button1.SetText ("I m a button");

    Button1.setbackground (Color.Blue);

    frame.getContentPane () .add (button1);

    JButton button2 = new JButton ();

    Button2.SetText ("Click me");

    Button2.setbackground (Color.Red);

    frame.getContentPane () .add (button2);

    Frame.Pack ();

    frame.setVisible (true);

    }

    }

    Thanks for your link.

    Zulfi.

  • This may seem like a strange question, but im trying to encode two buttons Flash Adobe, next and previous, however, when I put the thumb to the next scene and play on the next button and the previous scene and play on the previous button, it keeps switchi

    This may seem like a strange question, but im trying to encode two buttons Flash Adobe, next and previous, however, when I put the thumb to the next scene and play on the next button and the previous scene and play on the previous button, it keeps switching autour.

    If you have symbols of button on the stage to the next and previous, each of these symbols has an instance name with a listener event attached to it. The event listener is linked to a mandate. You can have a single event point to a function. So for example, if you have a next button and a click event that points to a function that says something like nextFrame(); and then you want to use the next button to point to a function that says something like nextScene(); you will need to use another instance of this next button and have this different instance to use a different event handler to point to a different function. Who help me?

  • Ways different ways according to which two buttons that they have selected

    Basically I have a kind of ticks of interaction where I would only the user based on two out of the four buttons to move forward on the next page. However, according to the two buttons, they choose will take you in a different way. Anyway is to animate on Edge?

    Thank you in advance,

    Louise

    Yes, use variables and check them.

    Example of

    initialize your variable here

    var selected1 = 1;

    var selected2 = 1;

    On your click event to check the value of the variable, and then reset the variable for the following clicks.

    That goes on the top 2 choices

    {sym.$("Button1").bind ('click', Function ()}

    selected1 = 0;   your variable goes to 0 when the conditional checks variable from the choice of the key '2 '.

    If (selected1 == 0 & selected2 == 0) {}

    ADD YOUR CODE FOR THE EVENT CLICK HERE

    selected1 = 1;  When you click on your variable will change to 1

    }

    });

    This is true for the other 2 choices

    SYM. $("button3") .bind ('click', function() {}

    selected2 = 0;  your variable goes to 0 when the conditional checks variable from the choice of the key '2 '.

    If (selected1 == 0 & selected2 == 0) {}

    ADD YOUR CODE FOR THE EVENT CLICK HERE

    selected2 = 1;  When you click on your variable will change to 1

    }

    });

  • two buttons with single function

    I want to create two buttons for single function and a single button for a function. For example, I click on button1, the display shows "clicked1".

    If I clicked on button2, the display shows "clicked2". If I click on button1, and then click button2, it will show that "the two buttons are clicked. However, it does not work in two buttons with single function. What is the problem? Here's the code.

    import flash.display.MovieClip;

    import flash.events.MouseEvent;

    var button1:MovieClip = new Button1();

    Button1.x = 200;

    Button1.y = 200;

    addChild (button1);

    var button2:MovieClip = new Button2();

    Button2.x = 300;

    Button2.y = 250;

    addChild (button2);

    Button1.addEventListener (MouseEvent.CLICK, onClick);

    Button2.addEventListener (MouseEvent.CLICK, onClick2);

    var isClicked:Boolean;

    var isClicked1:Boolean;

    function onClick(evt:MouseEvent):void {}

    isClicked = true;

    trace ("clicked1");

    }

    function onClick2(evt:MouseEvent):void {}

    isClicked1 = true;

    trace ("clicked2");

    }

    If (isClicked & & isClicked1) {}

    trace ("two buttons are clicked");

    }

    Copy the following code

    If (isClicked & isClicked1) {}

    trace ("two buttons are clicked");

    }

    should run WHEN you click on your buttons.  That is to say, place it in a function and call that function when you click on your buttons and after that your Boolean values are updated.  (probably then want to reset these Boolean values in the called function).

  • Works on two buttons ActionScript, ActionScript on once is not.

    For some reason, the ActionScript code I have the two buttons in my game. When the program starts, it goes to the first page, which has two buttons leading to other scenes. These two buttons work. One of them is a button of the route leading to the instructions page. I have another button on my page of directions I want to go back to the title page, the scene with the two buttons. (By the way, I use ActionScript 2)

    The code I used for the first two buttons:

    {DirectionsButton.onRelease = function ()}

    gotoAndPlay ("Directions", 1);

    }

    {PlayButton.onRelease = function ()}

    gotoAndPlay("Game",1);

    }

    ------------------------------------------------------------------------------------------ --

    The code I used for the button to return to the scene of Directions:

    {BackButton.onRelease = function ()}

    gotoAndPlay("Title",1);

    }

    ------------------------------------------------------------------------------------------ ---

    For some reason, it is in the same format and exactly the same way as the other two buttons, but it WILL NOT work. The cursor turns into the hand instead of the arrow, but nothing happens when I click it. The codes are in the background of every scene, and each of them are buttons. Two of them work, but the other does not work!

    It's really boring, so please help me. Thank you in advance!

    Not that it of any consolation, but using scenes is not recommended practice - if you only do so for your classes, you should plan on oblivion of their use in the future.  Your can be troublesome without reason as you discover.  Just as an additional test, rather than use off all gotoAndPlay ("Directions", 1);   try to use _root.gotoAndPlay ('Directions', 1);

  • Create two buttons to stop/start animation (cookies)?

    Hello

    First I want to apologize on bad English, I'm french so I'll try not to do too much to them.

    I am currently doing a small header in flash. I've created an animation (things that appear and others), and I like the way it is. But I would like to know if it is possible to create two buttons: "stop animation" and "start animation", allowing people not to see the same opening if animation they reload the page and jump to the last frame. The thing is it is the header of my forum: so it can be a little awkward if it loads whenever you click on another page.

    I read somewhere it is possible by using "cookies" and a... "shared object"? But it was not clear, and since I am relatively new to using the flash, I would like to know if someone could help me with this by explaining precisely how I can do.

    Thanks to the one who can help me!

    (Ps: I use Flash Cs5 with AS2)

    assign instance names your buttons and use:

    var tl:MovieClip = this

    var so:SharedObject = SharedObject.getLocal ("banner", "/");

    {if (SO. Data.stopVar)}

    tl.gotoAndStop (tl._totalframes);

    }

    {stopBtn.onRelease = function ()}

    so.data.stopVar = true;

    tl.gotoAndStop (tl._totalframes);

    }

    {startBtn.onRelease = function ()}

    so.data.stopVar = false;

    tl.gotoAndPlay (1);

    }

  • Switch between the two button symbols

    Hello

    I'm new to AS, but not new to programming.  I'm using Flash CS4.  Here's what I'm trying to do.

    I have two button symbols, PlayBTN and PauseBTN. They are used to control the playback of the slideshow. When I use one or the other to control the slide show, it works. However, what I want to do is to switch between the two buttons, so that they work together like this:

    1. If the slide show is playing, PauseBTN is visible. If PauseBTN is clicked, stops slideshow and PlayBTN becomes visible.

    2. If the slideshow is paused, PlayBTN is visible. If PlayBTN is clicked, stops slideshow and PauseBTN becomes visible.

    In other words, clicking on the button control not only the slideshow, but changes which button is visible.

    I got this working with a video clip of two frames and bitmaps in static, but when I swap the bitmaps for the buttons, rollovers button stop working.

    Can someone give me some advice please?

    ... Mike

    This is not a flexible configuration.  PauseBtn should be a movieclip with a up more and eventually to the bottom of chassis and PlayBtn either a movieclip with a up more and eventually to the bottom of the frame.  You can then use:

    PauseBtn._visible = true;  or false ot visible property of your control button.

  • Simple two button AS3 problem

    I have a (simple?) problem with Actionscript 3.0 in Flash CS4.

    I'm eager to a button in a part of the timeline to jump to a button in another part of the timeline and then on again.

    layers.gif

    Click btn1 10 goto frame then click btn2 goto frame 1 - basic stuff.

    This code works fine on its own for the 1 button:

    Stop();


    Btn1 is part 1-9

    Btn1.addEventListener (MouseEvent.CLICK, btn11);

    function btn11(event:MouseEvent):void

    {

    gotoAndStop (10);

    }

    But if I add the code to the second button I get and error:

    TypeError: Error #1009: cannot access a property or method of a null object reference.

    to Untitled_fla::MainTimeline/frame1()

    Stop();


    The two buttons are on the main timeline

    Btn1 is part 1-9

    Btn1.addEventListener (MouseEvent.CLICK, btn11);

    function btn11(event:MouseEvent):void

    {

    gotoAndStop (10);

    }


    btn2 is in the frame of 10-20

    btn2.addEventListener (MouseEvent.CLICK, btn22);

    function btn22(event:MouseEvent):void

    {

    gotoAndStop (1);

    }

    Any help would be appreciated.

    Kind regards

    Richard

    btn2 code must be attached to the frame 10 where the button is first.

    When you attach it to the frame 1, this button does not exist when this image plays and the compiler produces an error warning you that your code does not work.

  • Synchronization of the configuration shows two buttons

    I have correctly set up Firefox Sync and used Firefox for a while successfully Sync in the PC Windows standard user on 3 computers accounts. However, when I tried to sync the administrative account on a computer, I was unable to. Since then, whenever I'm doing a tools/configuration synchronization, or Tools/Options/synchronization on all my computers, only two buttons to the top: "Create a new account" and "I have an account". There is no button 'Manage account', not related to Unlink this computer from Sync, nothing. I tried all kinds of things and I looked a long time for help on this problem and have not found something to help. If I delete my account just to start and complete synchronization, it will work, or could I be causing other problems by doing this? Any other suggestions? Thank you.

    What do you see in the list of menu drop-down menu button Firefox?

    Is - this set up sync or synchronize now?

    If you have 'Set up sync' then you seem to have lost the configuration of the synchronization and you will have to redo the set up Sync.

    If this is not possible, then try to delete (or rename) the armor in the Firefox profile folder file and reset synchronization preferences on the topic: config page.

    You can use this button to go to the Firefox profile folder:

    • Help > troubleshooting information > profile directory: see file (Linux: open the directory;) Mac: View in the Finder)

    You can open the topic: config page through the address bar and to search for the prefs that begin with services.sync and reset set user prefs ("BOLD") through the context menu on the default value.

    If it still fails, then you can try a new profile.

    Create a new profile as a test to see if your profile is the source of the problems.

    See "create a profile":

    If the new profile works then you can transfer files from a profile in the new profile, but be careful not to copy files corrupted to avoid transporting on the problem.

  • Satellite A350D-201 - pad touch and two buttons doen't work

    After updating the BIOS from version 1.6 to 1.8 the two buttons and the touchpad does not work.
    USB mouse works. Pointing device-enable (bios).

    I decided to reinstall Win7, in a time of installation the sensor does not work!
    Disassembled the laptop, I found nothing.

    Help!

    Have you installed the touchpad driver after the installation of Win 7?

    If so, you should also check if the touchpad has not been disabled using FN + F9 keys
    Also recommend that you check the setting in Control Panel-> mouse-> Advanced tab
    Here, you have to go into the advanced settings.
    For all I know, you could turn on and off several options of touchpad and touchpad functionality.

  • WIN8 trackpoint middle third button click action

    Hello. Using a W530 ThinkPad UltraNav driver 16.2.5.0 version with Windows 8. I tried to uninstall--> restart-> reinstall-> restart. The middle button does scrolling. In settings UltraNav (TrackPoint), the only option is to set the sensitivity of stick and allow press to click. Please advise on how to activate the middle button click.

    Note of the moderator; post moved to submit here, under the direction of their relevance


Maybe you are looking for