Button with different actions

Hello

I put it like this this: I want to create a button that pressed mc moves from point A to point B. Then if you press it again, he draws back mc from point B to point A. I do this with action script.

So my question is how to do same key on a frame to perform different actions.

Thank you for your help.

Mindaugas

Thank you

Tags: Adobe Animate

Similar Questions

  • Toggling the buttons with different actions

    I have 4 buttons on the stage, and each button is correlated to a separate movieclip.

    Btn1 - mc1

    btn2 - mc2

    btn3 - mc3

    btn4 - mc4

    I want each mc appear when corresponding btn is clicked, but it must be the only mc on the stage... which means that some mc was currently must disappear. I played with many had to make this work, but I know there is a more efficient method for code to do so than the code that I have below. And I won't use any scenario.

    import com.greensock.TweenMax;
    com.greensock.easing import. *;


    var currentTool:MovieClip;

    Btn1.addEventListener (MouseEvent.CLICK, onToolClick);
    btn2.addEventListener (MouseEvent.CLICK, onToolClick);
    btn3.addEventListener (MouseEvent.CLICK, onToolClick);
    btn4.addEventListener (MouseEvent.CLICK, onToolClick);

    function onToolClick(me:MouseEvent):void
    {
    currentTool = me.target as MovieClip;
    If (currentTool is btn1)
    {
    TweenMax.to (mc1, 3, {alpha: 1});
    TweenMax.to (mc2, 3, {alpha: 0});
    TweenMax.to (mc3, 3, {alpha: 0});
    }
    ElseIf (currentTool == btn2)
    {
    TweenMax.to (mc2, 3, {alpha: 1});
    TweenMax.to (mc1, 3, {alpha: 0});
    TweenMax.to (mc3, 3, {alpha: 0});
    }
    ElseIf (currentTool == btn3)
    {
    TweenMax.to (mc3, 3, {alpha: 1});
    TweenMax.to (mc1, 3, {alpha: 0});
    TweenMax.to (mc2, 3, {alpha: 0});
    }
    else {}
    return;
    }

    }

    If your buttons are movieclips, then you can assign a number to each, and allows to treat interpolations more generically...

    Btn1. Num = 1;
    btn2.Num = 2;
    btn3. NUM = 3;
    btn4. NUM = 4;

    function onToolClick(me:MouseEvent):void {}
    currentNum = .num MovieClip (me.currentTarget);
    for (var i: uint = 1; i<5;>
    if(i == currentNum) {}
    TweenMax.to (this ["mc" + String (i)], 3, {alpha: 1});
    } else {}
    TweenMax.to (this ["mc" + String (i)], 3, {alpha: 0});
    }
    }
    }

  • Buttons with multiple actions do not work in v32.1

    We had buttons in our previously published folios that bring a multi-state object to state first and second MSO to another State that depends on which button is pressed. It works in app v32.0 and down, but it no longer works after trying to update our v32.1 app.

    If it is possible to have buttons with more action, I think we should be aware in What's New Relaese v32.1 Notes. Because it is not get ourselves as a bug. Can someone please tell us whether this is a permanent change button feature in DPS folios or is it happens by mistake?

    The fix for this was released Monday afternoon hour of Seattle.

    Neil

  • Problem of setting a value for the hidden item click on the button with processes action or pl/sql dynamic

    Apex 4.1

    Oracle 11g

    I have a page which consists of a main and several sub-regions area.  I have a pl/sql process in after the header SET_DISPLAY(:P400_DISPLAY:='MAIN';))

    Three subregions have a contional show where P400_DISPLAY = STORE.  It works in the hiding of the sub regions.

    Now, I want to change the value P400_DISPLAY to the STORE to show the subregions when I hit a button.

    I tried to create a dynamic action for the click on the Add button, but get the following error:

    The selected button uses a model of 'button' that does not contain the #BUTTON_ID substitution string #.

    I went to the models and found:

    Substitution strings

    Top

    Substitution strings are used in sub models to reference the value of the components. This report details use of string substitution for this model.
    Substitution string Referenced De Description
    #LINK #.YesModelTo be used in an attribute "href".
    #JAVASCRIPT #.NO.To be used in an "onclick" attribute
    #LABEL #.YesModelButton label
    #BUTTON_ATTRIBUTES #.NO.The attributes button
    #BUTTON_ID #.NO.ID generated button will be ID either the static button if defined, or if not will be a generated ID internally in the format 'B ' | [Internal ID of the button.

    I then tried to create a page process, pl/sql,: P400_DISPLAY: = 'STORE '; If the button is pressed.  The action of the button is submit page. However, it does not change the value of P400_DISPLAY and the subregions are hidden.

    Suggestions please on how to fix the template or change the value of P400_DISPLAY?

    The question of the root, it's that, even if you change the value of the element of your page, it is not visible to other areas of the page until it is in the session. Thus, any other action based on the value of the element of your page. the visibility of a control, a report based on the value of the item, etc. will be affected by changing the value of the item page until it has been changed in the session. Even after that, items are stored in the session, then you must do something to influence the revalued value. To see the effect of this, observe that your page will load and assesses the value of the element of your page, it sees which is the "MAIN" and mask areas. However, he didn't reassess after that.

    Then; your choices for this value set at the session are send the page, or use JavaScript to set the value in the session. If you use the latter, you will have to do extra work to make visibility tests be re - run, so, let's stick with the submit method.

    What you did above sounds correct to do this but, there are a lot of decisions, that you might have done that may have caused things to do not occur in the correct order.

    First of all, we will confirm that what I describe above is your problem. From the development environment, load the page, click on the button to change the value and submit. Now, click on the link marked the Session. He is always at HAND? If the answer is "Yes"; That's your problem.

    Let's start with your calculation after the header. You set it to * only * run if the current value of the element of your page is null? If this isn't the case, it's your problem.

    Load the Page-> Item set to 'Hand' by calculation-> click on the button--> Item set to STORE-> Submit-> Page Load-> point by calculating the value 'hand '.

    See the problem?

    Assuming that's not the question, you have created a branch to the same page, right? What is your process for the branch point? Is it * after * Validation, computation etc.? Because if not, you are not changing the value before that didn't get to submit.

    I bet that's the first question, but take a look at these.

    See you soon,.

    -Joe

  • Button and dynamic Actions

    Hi all
    I need to hide/show buttons with dynamic action, in the Actions of true/false, I tried with the object DOM and selector withjQuery, but it does not work.

    Can someone help me, please?
    Sergio

    Sergio,

    As you guessed, buttons are currently not well supported with dynamic actions, something we hope to treat in the future. However, it is possible to work around this problem. First of all, I assume that you use the "Template" based keys: and not "HTML". The "HTML" buttons automatically generate an ID set to the value of the button name, so if you tried to use "DOM object" with the value of button name, then this should have worked. The "HTML Code" buttons are certainly easier to control with dynamic actions, however if you're set on using the buttons "Template" based, it is a bit more complicated, but still possible.

    The fundamental problem is that "Template" based button generate an ID has the default value, and the simplest for dynamic steps control the individual buttons (and any element) is by referencing by ID. In addition, there is no substitution string available in the template of the button to the name of the button (only LINK, LABEL, BUTTON_ATTRIBUTES, and BUTTON_ID), so you can't do this on the side of the model. (I know there is a BUTTON_ID, but it is the internal ID, and it is a different set of challenges, I don't think it's better to continue to do this). If we want to give the button ID, the name of the button. To do this:

    • Make sure that the substitution string #BUTTON_ATTRIBUTES # is included in your button template, something like:

      
      


    • In your button, verify that the template is selected, and then you have to specify the ID attribute, whose value can be given in the field "attributes button" the same as the name of the button:

      id="my_button"
      

      You encounter so, essentially, to reproduce the name of the button, as well in the name of the button and the added value of ID ideally, you'd be able to do this in the model, as explained, but this is not possible.


    • Now, you can reference this button against the 'affected elements' dynamic actions, using a selection of type "Object DOM" and the value of the button name / ID specified.

    Sorry it's a bit lengthy. As explained, based HTML buttons are certainly easier currently, you don't have to worry about all that extra work to get the generated ID, it's right there already. And in a later version of the SUMMIT, we want to allow just completely declarative selection of dynamic action buttons that work, without having to make these types of additional solutions.

    Hope that helps.

    Anthony.

  • Is it possible to make a button with multiple paths?

    Hello and good day everyone

    I want to make a flash game with a map leading to various locations for example school or beach like this http://www.yotreat.com/sites/default/files/190-160_1286.jpg

    If the player goes to the school she will find the Professor and if the player goes to the beach will be the coach.

    How can I make the player (for example) converses with the teacher at school, back to the main map and go to the beach to talk with the coach, but if she goes to school, even once, dialogue with the teacher is not the same with the first dialogue?

    = > > > It is possible to make a button with different paths to go? As if you watched the a-frame, then you press the same button again need you to part B? < < < =.

    Sorry for my confusing description... I hope you get the idea >, <
    IM so desperate... I searched for articles about this since yesterday and I still can't find one to solve this problem of mine.
    Making games is my dream... I've done a few very simple games, but I want to try a new level of difficulty

    Please help me? (> o <)

    Learn how to design solutions of programming requires learning what tools you have for you and how you can manipulate them according to your needs.  It doesn't matter if you make the games or anything else.

    Only you know the details around your design idea, but there are probably a number of management solutions with a single button to do different things.

    One way would be to use an array of information (such as the numbers of framework/labels) and have a counter that changes values when you use a button and this counter is used to index to select an element in the array.  So when you start the meter/index is 0, and he chose the images [0] table frames.  During treatment the counter/index is incremented by 1 so that the next deadlines [1] is selected.

    This same kind of approach could be used to keep track of how far went into a series of interactions, such as when you want to have a conversation with a character pick up where it left off instead to start over again.

    The key to everything that is store/keeping track of information.

  • How to add different Actions on different buttons. How to receive the first screen in a stack

    Got two problems I have to solve.

    Let's start with my first.

    Source:

    public class core extends MainScreen implements FieldChangeListener{
        public core()
        {
            super();
            try{
                setTitle("Mobile Inspection Manager");
                RichTextField MainMenu = new RichTextField("Main Menu",RichTextField.TEXT_ALIGN_HCENTER);
                FontFamily fof = FontFamily.forName("Times New Roman");
                Font fon = fof.getFont(Font.PLAIN, 32);
                MainMenu.setFont(fon);
                add(MainMenu);
                SeparatorField Sep = new SeparatorField();
                add(Sep);
                add(new RichTextField(""));
                ButtonField but1 = new ButtonField("Equipment", ButtonField.CONSUME_CLICK) ;
                but1.setMinimalWidth(360);
                but1.setPadding(7,0,7,0);
                add(but1);
                ButtonField but2 = new ButtonField("Messenger", ButtonField.CONSUME_CLICK) ;
                but2.setMinimalWidth(360);
                but2.setPadding(7,0,7,0);
                add(but2);
                ButtonField but3 = new ButtonField("Reports", ButtonField.CONSUME_CLICK) ;
                but3.setMinimalWidth(360);
                but3.setPadding(7,0,7,0);
                add(but3);
                ButtonField but4 = new ButtonField("Preferences", ButtonField.CONSUME_CLICK) ;
                but4.setMinimalWidth(360);
                but4.setPadding(7,0,7,0);
                add(but4);
                ButtonField but5 = new ButtonField("Update/Sync", ButtonField.CONSUME_CLICK) ;
                but5.setMinimalWidth(360);
                but5.setPadding(7,0,7,0);
                add(but5);
                ButtonField but6 = new ButtonField("About", ButtonField.CONSUME_CLICK) ;
                but6.setMinimalWidth(360);
                but6.setPadding(7,0,7,0);
                add(but6);
                ButtonField but7 = new ButtonField("Exit", ButtonField.CONSUME_CLICK) ;
                but7.setMinimalWidth(360);
                but7.setPadding(7,0,7,0);
                but7.setChangeListener(this);
                add(but7);
            }catch(Exception e){
    
            }
        }
        public boolean onClose()
        {
                Dialog.alert("Goodbye!");
                System.exit(0);
                return true;
        }
        public void fieldChanged(Field field, int context)
        {
            master.Application.closeApp();
        }
        public void InfoScreen(){
            MainScreen Version = new ui.about.version();
            master.Application.changeScreen(Version);
        }
    }
    

    I've defined several buttons for the main Menu.

    How can I add these buttons Actions?

    I added one already to the Exit button. We work.

    My first idea was to add a method to implement the InfoScreen.

    But I get a Java error.

    Browsing through the Internet I have not found a solution.

    I took most of the developer Sources.

    But I don't know what I should do now.

    How can I declare different Actions for different buttons?

    2. question.

    I am swaping with screens with the pushScreen command.

    Is there a way to return to the previous screens?

    1 Add this as a change listener to each button.  In your fieldChanged method, mount ButtonField field, extract label and branch code according to it.

    2. pop removes the screen from the top of the stack so underneath the screen becomes visible. Stack screen blackBerry is just that - a battery.

    By the way - are you sure that you have found the font Times New Roman family?  There is no such family on BlackBerry.  Extract his name by using fof.getName () and display it in, say, Dialog.info - you might be surprised.

  • Replace the IR Actions menu button with image

    Apex 4.2.3

    Grid reactive theme 25

    Oracle 11g

    I would like to replace the default Actions with my image menu button. Someone knows how to do this.

    Its same as this thread, the menu button replace the Actions of interactive report (Apex 4.1)

    But it does not work for me.

    Kind regards.

    Hello

    If you want to replace all button by image - how you suppose handle clicks on this image?

    If you don't want the image - you can do this in the properties of IR report:

  • How to create a button with rollover that appears in a different place than the button when you move?

    Hello

    How to create a button with rollover that appears in a different place than the button when you move by using only the Muse (reversal may be a different shape and color of the button). I managed to do it using Photoshop and the separate layers and import it, but it is not a good solution. All suggestions will be welcome.

    Thank you

    You can try to use the widget of the Composition of the ToolTip. In this way, the trigger area is isolated and a "State of reversal" can be placed anywhere on the screen (compared to the trigger).

    • Remove the two triggers additional default
    • Set to display the targets on working capital
    • Select hide all initially.
  • All of the Images which the different Ratio to a report customized with an action of cultures

    Hi all

    I'm new to Photoshop. I have been struggeling for a few days with this problem...

    1. I have 100 Images with different ration.
    2. I would like to define a custom target ratio.
    3. Then, I want to crop the images, which do not have the target ratio.
    4. These Images must be croped aligned in the center of the image (if the height is too large, the upper part and the lower part of the image would lose the same amount of pixels)
    5. I can interpolate the resolution during this operation to a standard custom resolution if it is different?
    6. Finally I would like to create an action/batch of steps 1 to 5, so that all images are processed automatically.

    I would apriciate all sorts of help a lot!

    Thank you very much

    Save a preset size for truncation tool, then call him upwards in action. Add layers of resizing based on the percentage, when necessary. You still have to individually for each image, but have some practical actions could make it faster. for anything else, you need scripts, which is a whole other story...

    Mylenium

  • Need help with the actions of the buttons

    Hi, can someone help me please? I would put an invisable button on an image (film) with two actions. 1 reversal will show a title, 2. Press release will get the new URL. I succeed in one or another action, but not the two combined. What can I do? I use the action script 2. Thank you. Sarosa

    Download
    http://www.Notre-Annuaire.com/2009/files/example.fla
    and
    http://www.Notre-Annuaire.com/2009/files/example.swf

    It works!

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

    CAUTION:
    This announcement is not the answer to the original question.

    The real answer is:

    test ._visible = false;
    bt.onRollOver = function() {}
    test ._visible = true;
    };
    bt.onRollOut = function() {}
    test ._visible = false;
    };
    bt.onRelease = function() {}
    getURL ("" http://www.google.com ", _blank");
    };
    Stop();

  • Set values in a table with dynamic Action?

    Hi, I need help for my Application first, Apex, please. This page is for users of fuel truck who buy several gallons of fuel and use this page to distribute this fuel among the many projects. These users are familiar with filling in the Date of the Transaction, the Site, the Type of fuel from the fuel tank #, etc. on the top of the page and then using the lines below to split the fuel in different projects.

    Example: The user gets 100 gallons delivered, fills the Page elements on top with the details of the purchase and uses then 3 rows of tabular form to distribute among 3 project (Project1 gets 20 gallons, Project2 gets 30 gallons, Project3 gets 50 gallons). Each line in the form of tables inserts a new record in the table of database of fuel with different values for the Gallons and ProjectID, but the same Site, Date, Type of fuel and tank values.

    So there are columns hidden on the tabular presentation for Site, Date, Type of fuel and tank. They need get these values from the top so that the user doesn't have to type repeatedly. This is my problem: How can these hidden columns to get the values in the top text boxes dynamically? It must be dynamic, or changed immediately if the user changes anything in the decoders (as a typo).

    Just going to each as a column and defining the 'attributes of tabular form' by default for an item and then by setting the default value in the name of the element page text box will only work if somehow, the user submits the page and does not make typing errors before you fill out the form in a table. I need to be adjusted immediately. Also, is it something special to set the date picker on the form as a table for the value of the Date on the top picker? For the moment, I am trying to use the Set button to set the values in the boxes at the top of the page with their items and refresh the page, so the default values of the column in a table can be right. Is there a better way to do it? It does not work for the date picker.

    I just started to use Apex, I only know the basics of dynamic Action HMI. If I should use a jQuery or code in the HTML header or a 'Collection' Apex, be very specific. Page elements above have names like P13_TANK and the P13_TRANSACTION_DATE of Date Picker and the shape of the table has column names like TANK and TRANSACTION_DATE. Truckers and I appreciate any help, thanks!

    apex question.png

    ~ Saphira

    I forgot a few quotes:

    $("input[name='f05']").val(this.triggeringElement.value);
    
  • Do symbols have different actions according to schedule

    Is there a way to make a symbol have a different action depending on where it is in the timeline? I create a page that has 4 options at the top of each with unique animations. Tell me yes I click on contact the original sliding home to the right and contact information happens from the bottom. If I then click on homepage I can create when the contact info slip original back down and landing page transitions in. The question comes with, if I am in the topic page click home, and then displays the contact page and the departures of animation where the coordinates slides down and return home page transitions. So I need button to have two different clickable functions depending on where, in the timeline, it is at home. Any help will be greatly appreciated. Thank you!

    If it is at 650 to stat then you need a 0 to slide in place. right is not allowed. It's css. If the left's position.

    for example if your symbol is initially to-650 on the left of the stage, then you want that he drag until it is 0. so use:

    SYM.$('Rectangle'). Animate({'left':0},6500);

    6500 is speed.

  • A symbol... of different actions at different times

    Is it possible to assign an action to a symbol to a point in the timeline panel, and then a different action to the SAME symbol somewhere different in the timeline panel (as I usually do with Flash)?

    I have an interactive floor plan that I'm trying, and the same key that activates a function must also be able to disable.

    Thanks a lot for all help with that.

    Hi Jaceman2,

    the same key that activates a function must also be able to turn it off.

    Your main timeline will have different States. You can get the current with sym.getPosition (), which returns a position in ms (a feature of the getCurrentLabel() , as we are used to in Flash, would be useful here, but he is not on Board at the moment).

    Your button click event handler then has a conditional statement, as indicated by Resdesign, the condition being that position value.

    An example of such a conditional based on position here: http://forums.adobe.com/thread/1204999?tstart=0

    Gil

  • Create a button with a text layer label

    Hi guys.  Looking for advice on how best to implement a button with a text label.  Initially, I created a rectangle object on a lower layer and with the text in the upper layer through the text tool.  When I group the two objects, and create the button, the text is readable in my InDesign (document) computer screen, but the minute I've put it on my iPad button becomes unreadable and pixelated.  I tried different approaches by moving the text outside the Group of button layer does not display the text at all.  Has anyone experience this problem?  If Yes, what is the best practice?  Thanks in advance.

    If the text is contained in the button, it will be rasterized at the correct resolution to be beautiful on your folio of target dimensions. Unfortunately we do not support vector in option for buttons.

    I do not know what your button design, but a common approach is to put the text of the button on the background of your page and put a transparent button on top of it to trigger the action. That way your text will be vector (in the PDF which forms the background of the page) and the button is just a transparent top hotspot.

    Neil

Maybe you are looking for

  • Qosmio x 300 15 t drive hard master wrong password, but know the user password

    I don't know if it's in the right forum, but I have a problem with my internal hard drive. I put a main HARD drive password and user password using the BIOS HARD drive. Some time later I discovered I have to tapping the bad HARD drive a master twice

  • Unistall MTF $ 197 \devov.dell

    I start getting this messages 2 after turning on my Dell Ispiron 1721 (1) error loading C:\windows\$Uninstall MTF $ 197 \devov.dll the specific module could not be found (2) error loading C:\User\guillermo\AppData\Local\nscser.dll Could someone help

  • BlackBerry Smartphones multimedia eligible/usable filetypes for Pearl 8130

    Hi all Been browsing and have not had much luck finding anything about file types supported used by my Pearl. Anyone know which audio and video types are visible on the Pearl? Thank you very much.

  • ISAKMP initiation

    When you configure isakmp on the routers to set up an ipsec tunnel, which side will open the session for udp 500? Or both sides will attempt to open the session at the same time? Thank you

  • Account Resettting APEX

    Hi allI deleted some tables accidentally which are by default in the APEX.Is there anyway to reset my account to APEX, then everything will be like at the beginning?Or I have to delete the whole account and then create it?Thanks for helpRafal