Use the button to set a variable

Hi, can someone help me.

I would use a couple of buttons I made to set a variable. I would use the name of the instance of the keys as the value stored in the variable. How can I code this?

Thank you.

You can use the currentTarget of the event to target the button and acquire its name...

var btnName:String;

btn.addEventListener (MouseEvent.CLICK, storeName);

function storeName(evt:MouseEvent):void {}
btnName = evt.currentTarget.name;

trace (btnName); will trace "btn".
}

Tags: Adobe Animate

Similar Questions

  • Safari freezes when I use the button "share" after OS updated 10.11.5

    Since I upgraded to OS X to 10.11.5 I can no longer use the ' share' button as it freezes Sarari. If Safari is open in multiple windows, it freezes only the active window. Pls does anyone know a fix?

    10.11.5 - Safari 9.1.1 - MacBook Pro OS (retina, 13-inch, mid-2014, 2.6 GHz Intel Core i5, 8 G 1600 MHz DDR3)

    Hello..

    Safe Mode boot removes the system caches can help after an update.

    Follow these steps to start in safe mode.

    Start or restart your Mac.

    As soon as you hear the startup tone, hold down the SHIFT key.

    Release the SHIFT key when you see the logo Apple appears on the screen.

    After the Apple logo appears, this may take longer than usual to reach the login screen or your office. This is because your Mac performs a check of directory of your drive to boot in safe mode.

    To leave safe mode, restart your computer without pressing any keys during startup.

    Then launch Safari and try to use the button share.

    On Safe Mode

  • How to make the button to set the properties of auto-scale one of the Axes on the graphical indicator so I can turn on or off when I press on it. In the Labview web UI designer

    How to make the button to set the properties of auto-scale one of the Axes on the graphical indicator so I can turn on or off when I press on it.

    I need to change the adjustment vaguely Autoscale property for my graphic indicator. Can someone help me please.

    Thank you!

    Hello

    I have confirmed that there is currently no way programmatically enable/disable autoscaling for axes on the LabVIEW graphical indicator generator of the user Web interface. We noted this to possibly be implemented in the future; Sorry for the inconvenience.

  • When you use my touchpad I have to use the buttons I can't press. I get no response

    When you use my touchpad I get no response by tapping on the button, I can only use the buttons.

    Did you use winupdate to update "recommended updates"?

    Change settings winupdate for critical / Important updates ONLY and not recommended updates. Visit your laptop manufacturers website and download / install the drivers for the touchpad or if you have already done this, roll back the driver

  • To DEVELOP the image don't copy not from before to after when you use the buttons in the taskbar below.

    In Lightroom, DEVELOP the image does not copy from before to after after using the buttons below.

    Is it possible LR shows before and after the same?

    By clicking on a button with >< can="" make="" them="" the="">

    You can reset the State 'Before' of a picture by right-clicking on a stage in the history panel.

    Press the [\] to also get a 'before '.

  • I have a document composed of separate PDF files that reside in a folder and are related to each other through hyperlinks. Each pdf file is set to open with bookmarks displayed, however if I have a link to a PDF file to another and use the button "Previou

    I have a document composed of separate PDF files that reside in a folder and are related to each other through hyperlinks. Each pdf file is configurΘ for dΘmarrer with bookmarks displayed, however if I have a link to one PDF file to another and use the "back" button to return to my starting point bookmarks are replaced by "vignette". Is there anyway to prevent this?

    Hi Mike,.

    While the implementation of the links, if you choose to open the file in a new window then you will not experience this issue, then you can simply switch to the file view and previous bookmark will remain as it is.

    Is that what helps with your query?

    Kind regards
    Rahul

  • How to set current row in the table after use the button tab on inputText

    Hi all
    My first post.., I am beginner in ADF and I'll try to explain my problem.

    For now we use ADF 11 g (11.1.1.4), in a jsff page I have a table with a column of inputText.
    On the the inputText valueChangeListener, I invoke a method in a bean viewScope that call an EJB method, make some services to the EJB on the modified line. After that, I update the VO and the table (because other values in the row have been changed) and reset the focus on the inputText even modified by the user with javaScript, because the focus was lost after updating.
    So far, everything works fine.

    When I use the arrow keys to change the selected line in the table, this is excellent work (focus is always in the inputText next or previous), but if the user tries the key tab allows you to change the current line, the inputText on the line that has the focus, but the current row in the table is not changed (I think that is normal).

    My question: How can I change the current line after the tab key in this case?

    I don't know if it is really clear, not easy to explain, do not hesitate to ask for more details.
    Thanks in advance.

    Hello

    My question: How can I change the current line after the tab key in this case?

    Use a client event to listen to the keyboard entry and intercept the tab. Use af:serverListener to call the server to set the rowKey on the table and deliver a PPR for the table to repaint

    See example 11 on http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html#CodeCornerSamples

    to learn more on how to use the client listener and the receiving server

    Frank

  • I don't have the option in my settings slide to unlock rather than use the button "home" since ios10

    Hi I have an iphone 5 and I changed to ios10, but I don't like just press the home button to unlock the phone because I was just used to drag the screen. But when I go into settings > general > accessibility > "home" button is not the option press on / do not press the button for unlock...

    This is how it works in iOS10.  There are a lot of discussions about it.  I've already gotten quite used to the reality, is that with each new version of iOS, there are new features and things change.  To answer your question, there is no setting for slide open.

  • Using the button get advanced table row id

    I want to get the primary line key when I click on a button.

    I coded it that way. The button display lines that I have partialFireAction.

    Code PartialFireAction:

    oracle.jbo.domain.Number TransactionId = null;
    String TransId = null;
    System.out.println ("route 1");
    Vo = OAViewObject
    (OAViewObject) am.findViewObject ("SearchHeaderVO1");
    System.out.println ("route 2");
    If (vo! = null) {}
    System.out.println ("Route 3");
    Line OARow = null;
    line = (OARow) vo.getCurrentRow ();
    System.out.println ("route 4");
    If ((row.getAttribute ("TransactionId")! = null) |) ((! row.getAttribute("TransactionId").equals(""))) {
    TransactionId =
    (oracle.jbo.domain.Number) row.getAttribute ("TransactionId");
    }
    System.out.println ("TransactionId Varun1" + TransactionId);
    If (TransactionId! = null) {}
    TransId = TransactionId.toString ();
    System.out.println ("TransId Varun1" + ID, transaction);
    }
    Si ( !("". Equals (transid) | TransId == null)) {}
    System.out.println ("track 5");
    [Serializable] param = {transaction ID};
    System.out.println ("track 6");
    am.invokeMethod ("firePprEvent", param);
    System.out.println ("track 7");
    resetQueryData (pageContext, webBean, "SearchHeaderVO1");
    System.out.println ("route 8");

    However when you use ' line = (OARow) vo.getCurrentRow (); and row.getAttribute ("TransactionId"); »
    It returns the last line that the query is fetch.


    No idea how to get the details of the row where the button was clicked?

    Varun,

    You should not use getCurrentRow.

    You must use the code below in the controller and the neck of the rowRef in the AM.

    String rowRef = pageContext.getParameter (OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);

    In the AM, you can use

    findRowByRef (rowRef) for the VORow.

    See the link for the sample code below:

    http://oracleanil.blogspot.com.au/2009/04/serialco.html

    If you just need the Id, you could also add as a parameter when you set (set a) the partialFirAction itself.

    See you soon

    AJ

  • Use the button submit to trigger the validation and prompt to save instead of submit action

    I want to add a Submit button that will trigger the validation using the built-in functionality. This will work as well with the "validation of forms" setting on the properties of the form. See cliché below.

    However, if the validation success, I want to apply for registration dialog box instead actually submit the form using this line of code:

    app.execMenuItem("SaveAs");
    

    How is that possible?

    Tarek

    Hello

    to do this, you can simply call the function execValidate integrated, your form by using the following:

    var boValidate = xfa.form.form1.execValidate ();

    If {(boValidate)

    app.execMenuItem ("SaveAs");

    } else {}

    App.Alert ("Validation failed.");

    }

    I hope this will help you!

  • How can I update the data in mysql using the button defined in the table?

    Hello

    right now I am doing my project for the online election system using dreamweaver cc14. I create a table using php code to bind the data to mysql, and in this painting, I create also a button "vote" for voters to vote. My question is, how can I update my polling data in the mysql database when voters push button "vote" based on the id of the candidates? Here is my code I try:

    <form method="post" id="form1">
          <?php
    $servername = "localhost";
    $username = "root";
    $password = "pass";
    $dbname = "ses";
    
    
    // Create connection
    $conn = new mysqli($servername, $username, $password, $dbname);
    // Check connection
    if ($conn->connect_error) {
         die("Connection failed: " . $conn->connect_error);
    } 
    
    
    $sql = "SELECT No, Calon, ID, Jurusan, Image FROM candidates";
    $result = $conn->query($sql);
    
    
    if ($result->num_rows > 0) {
         echo "<table >
      <tr>
      <th>NO</th>
      <th>Candidate</th>
      <th>INFO</th>
      <th>Vote</th>
      </tr>";
         // output data of each row
         while($row = $result->fetch_assoc()) {
             echo "<tr>
      <td>" . $row["No"]. "</td>
      <td><img src=" . $row['Image'] . "></td>
      <td><br/>-" . $row["Calon"]. " <br/>-" . $row["ID"]. " <br/>-" . $row["Jurusan"]. "<br/></td>
      <td><input type="."submit"." name=".$row["Calon"]." id=".$row["No"]. " value="."Vote"."></td>
    
      </tr>";
      if(isset($_POST["".$row['No'].""])){
    
      $vote_sachin = "UPDATE candidates SET Undi=Undi+1 WHERE No=".$row["No"]. "";
    
      $run_sachin = mysqli_query($conn, $vote_sachin);
    
    
    }
        }
      echo "</table>";
    } else {
         echo "0 results";
    }
    
    
    
    
    
    
    $conn->close();
    ?>
    
    
    
    
        </form>
    

    I hope someone can help me in this area, because I'm still new in this programming language.

    Thank you.

    Youre probably going to insert a 'radio button' next to the names of candidates and recover the database ID of that (I guess that the ID is the primary key in your database that uniquely identifies each record.

    His great confusion because you seem to update the database to aid WHERE no = "." $row ["no"]. so I don't know that ID is the primary key?

    IF "No" IS your master database key, you need to change the code below:

    TO:

    Here's the complete code based on the ID of your primary database key.

    <>

    $servername = "localhost";

    $username = 'root ';

    $password = "pass";

    $dbname = 'his ';

    Create the connection

    $conn = new mysqli ($dbname, $servername, $username, $password);

    Check the connection

    If {($conn-> connect_error)

    Die ("connection failed:".) $conn-> connect_error);

    }

    $sql = "SELECT No, Calon, ID, Jurusan, Image OF candidates";

    $result = $conn-> Query;

    If you click on the button "vote" form run the code to update the database below

    {if (isset($_POST['vote']))}

    Get the value of the ID of the radio button form field and store it in a table.

    $update_vote = $_POST ['candidate_id'];

    loop in the table and update the database

    foreach ($update_vote as $value) {}

    $vote_sachin = ' candidates UPDATE SET Undi = Undi + 1 WHERE ID = ".". " $value. » « ;"

    $run_sachin = mysqli_query ($conn, $vote_sachin);

    }

    }

    ?>

    <>

    If ($result-> num_rows > 0) {}

    ECHO '.

    ";

    each line output

    While ($row = {$result-> fetch_assoc())}

    ECHO '.

    ";

    }

    ECHO '.

    ";

    ECHO '.

    NO. Candidate INFO To the vote
    " . $row ["no"]. "
    -" . $row ["Calon"]. "
    -" . $row ['ID']. "
    -" . $row ["Jurusan"]. "
    ";

    } else {}

    echo "0 results."

    }

    $conn-> close();

    ?>

  • Save the Document to the network drive by using the button action

    I try to save a document to a network drive by using a button action. I'm using Acrobat 8 Pro. I have a script that records on the C: drive and it works fine.

    Script folder level

    var mySaveAs = app.trustedFunction (function (oDoc, cPath) {}

    app.beginPriv ();

    try {}

    oDoc.saveAs (cPath);

    } catch (e) {}

    App.Alert ("error during save it");

    }

    app.endPriv ();

    });

    Document-level sCript

    var this.path.replace = filePath (this.documentFileName, "");

    var NouveauNomFichier = this.getField("Mlastname").valueAsString + "" + this.getField("Mfirstname").valueAsString + "PcDec.pdf";

    mySaveAs (this, filePath + newFileName);

    The IT Department would like to go to the H: drive. Can I make adjustments to this set of scripts, or should I start from the beginning.

    I have limited experience with JavaScript.

    You can use the following command instead of what you have:

    filePath var = ' / h ';

    var NouveauNomFichier = this.getField("Mlastname").valueAsString + "" + this.getField("Mfirstname").valueAsString + "PcDec.pdf";

    mySaveAs (this, filePath + newFileName);

  • Use the button to select the Combobox choices?

    Hi all

    I have a combobox (called "style_cb") and that you have guseed you can use to select a "style."

    The site also contains photos and I would like users to be able to click on the photos (which are the buttons) and have the combobox control

    automatically the value of this option.

    So, if the options in the drop-down list are "oranges, apples, pears, cherries" and the images are the same fruit.

    then by clicking on a picture of a fruit (say "cherriesBtn") would set the drop-down list for this option box.

    I played a little and I read the help - searched the net but no joy so far.

    All gurus like to help them with what I imagine, it's a fairly simple thing?

    Best wishes

    Tony

    You can use the selectedIndex property of your combobox:

    {cherriesBtn.onRelease = function ()}

    style_cb. SelectedIndex = 3;

    }

  • When you use the buttons to generate points of quiz - can problems with cpQuizInfoPointsscored anyone help?

    Hello

    I am putting together that a test is several sections which must give "advice" on measure to users based on their interactions across multiple slides.  I tried this several ways but can get anything to work for my needs.

    Is closer to just using the keys to generate some test scores (each button can be given an individual score for generating marked differently from interactions on each page) and then attempt to deliver scenarios advice branched using advanced actions 'if cpQuizInfoPointsscored variable if' less/more than... etc go slide....  I'm frustrated by the fact that the cpQuizInfoPointsscored variable does not seem to pick up dozens of buttons, even if you include the points in the quiz and these scores come out at the end of the quiz or the results page.

    These scores are obviously stored somewhere - is it variable anther I can go to read these scores at some point and branch a scenario in response?  Is there another way to do this?

    See you soon,.

    Matt

    I would recommend that you create your own user variables to measure the success of the interactions and then use the values of these variables to trigger the branching of fast Action.  As you have seen, some score is computed only once you get to the Quiz results slide.  Having your own variables will give you more freedom to do what you please.

  • using the button to go to the url with LMS

    I have worked in Captivate for years and got uesd a few different LMS systems.  However, it is the first time that I used a button in a lesson to open a URL.  It seems to work very well when I see him again in a browser.  But, once I have download on my LMS and test, by clicking on this button to go to the website me kicked out of the LMS but does not open the Web site.

    Is it possible to have the URL open in another window?

    Hello

    When you set up your button to open the URL, click on the button to the right of where you enter the URL. Then choose the new option. Since you're here, after you choose New, click New and deselect "continue to play the project.

    See you soon...  Rick

    Useful and practical links

    Captivate wish form/Bug report form

    Certified Adobe Captivate training

    SorcerStone blog

    Captivate eBooks

Maybe you are looking for

  • Hello need to download use UFF - 58 next to a working link

    If somebdy can point me to a working link, thanks

  • Table of cleavage according to its index

    Hi all I want to have a 'demux' block which, having a table (2Nx1) as input, splits the data into two tables (Nx1) as output the first array index is even or odd... At first, I tried to implement this with a structure matter in a while loop: But this

  • What more can I chat on facebook (lame, I know)

    and update my browser on IE 8, then to switch to Mozilla Firefox has not set - any suggestions? "no one available, no one in line," everyone seems to be able to discuss but me. any suggestions?I don't have the text, then chat on fb is unimportant for

  • the internet update 8

    I've updated my internet to internet explorer 7 to internet exlporer 8 and every since I did, I can't search my homepage which is yahoo, I can only search of gogle, I uninstalled internet exploer 8 and I still can't get my Yahoo home page.

  • BlackBerry Z10 voice notes

    Can you create voice on BB10 notes? If so, how? Can these memos be ringtones?