DETECT if ctrl is pressed when you click on a button?

Hello

What is the best way to detect if ctrl pressed while a button on the screen?

See you soon

MouseEvent has several handy properties to tell you if a modifier key is currently held down:

function clickHandler(e:MouseEvent) {}

trace (e.ctrlKey); Works also with command on Mac

trace (e.controlKey); Windows key and Mac 'control' has the same meaning

trace (e.commandKey); Mac only

trace (e.ShiftKey);

trace (e.altKey);

}

More details here:

http://help.Adobe.com/en_US/FlashPlatform/reference/ActionScript/3/Flash/events/MouseEvent .html

See you soon.

-Aaron

Tags: Adobe Animate

Similar Questions

  • How to open 2 sites on start and 1 Web site when you click the home button?

    How to open 2 sites on start and 1 Web site when you click the home button?

    You can change your shortcut on the desktop Firefox with two starting URLS. To try:

    • Shortcut on the desktop: right-click on the icon, choose Properties
    • Icon taskbar pinned: clic click right on the icon, right click in Mozilla Firefox, click on properties

    Windows normally selects the shortcut tab. If this is not the case, go ahead and click on the shortcut tab.

    You will see the target highlighted. On 64-bit Windows, which is usually either not less the following:

    "C:\Program Files (x86)\Mozilla Firefox\firefox.exe"
    

    For the specific shortcut launch pages, you can add them to the end, for example:

    "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -url "http://www.dilbert.com/" -url "http://www.gocomics.com/pearlsbeforeswine"

    After OK'ing the Properties dialog box, you can test everything right now to confirm that Firefox is now launching a window with tabs. Either:

    • Double-click the shortcut on the desktop
    • right click on taskbar icon pinned, click Mozilla Firefox

    Who do you want?

  • How to do an audit in the order page IN. When you click on the button "submit"

    I want to do an audit in order IN. When you click on the "submit" button, it will be checked whether the OP is reserved and will display the message if not.

    I have a CO span from the original, I can know where should I put the logic inside the processFormRequest? and how to write code to control them thanks.

    public void processFormRequest (pageContext, OAPageContext,

    OAWebBean oAWebBean)

    {

    super.processFormRequest (pageContext, oAWebBean);

    }

    OK here is the code below,

    String sql = "START: 1: = XXPO_CHECK_RESERVED_PKG." XXPO_CHECK_RESERVATION(:2); END; « ;

    CallableStatement cs = txn.createCallableStatement (sql, 1);

    String outputval = null;

    try {}

    cs.setString (2, Segment1);

    cs.registerOutParameter (1, OracleTypes.VARCHAR);

    CS. Execute();

    outputval = cs.getString (1);

    TXN.Commit ();

    } catch (Exception sqle) {throw new OAException ("Error in the application of staffing", OAException.ERROR) ;}}

    -Beginning of the code by Hemant

    If ("N".equals (outputval) &! ") ». Equals (outputval))

    {

    throw new OAException ("The PO isn't in reserved State");

    }

  • How to create a form that is displayed when you click on a button?

    I want to create a contact form on my Web site that appears when you click the button 'click here to contact us' floating on the web page. I can't figure out how to make this work. Any help would be appreciated!

    You can really use any widgets of composition. You probably want to use the Widget for Composition of ToolTip and the setting of the trigger button and form as target.

  • Read simultaneous animations when you click on a button

    Hello

    Anyone know how to animate two animations on the timeline on the edge play at the same time when I click on a button?

    I have a button in my menu when I click on it I need to play the animations on the timeline.

    Thank you for helping me.

    Hey g.bollmann,

    I personally found that to use a class in the way you describe you must make a function for the class and then call this function: creation, for example participated

    sym.playIndef = function() {}

    sym.getSymbol(".indefl").play ();

    }

    then just call it when you want an all the symbols with the indefl class to play:

    sym.playIndef ();

    I would recommend personal the first way that I have described as I find that you can control the project

    hope this has helped

  • Confirmation message is displayed when you click on the button

    We need display a confirmation message when you click a button to notify the user the changes are successful, allow the user to click on 'ok', and then on the home page. The current function uses .setForwardURL to redirect the page to the "Main" page after clicking on a button.

    Here is the code of the application currently being used by the controller

    ' Public Sub processFormRequest (pageContext OAPageContext, OAWebBean webBean)
    {
    super.processFormRequest (pageContext, webBean);

    OAApplicationModule contactam = (webBean) pageContext.getApplicationModule;

    If (pageContext.getParameter ("saveContact")! = null)
    {

    contactam.invokeMethod ("saveContact");

    () pageContext.setForwardURL
    'OA.jsp?page=/csxxx/oracle/apps/ak/contact/webui/ContactMainPG '.
    null
    OAWebBeanConstants.KEEP_MENU_CONTEXT
    null
    null
    true
    OAWebBeanConstants.ADD_BREAD_CRUMB_NO
    OAWebBeanConstants.IGNORE_MESSAGES);

    }

    Hello

    You can display the message after contactam.invokeMethod ("saveContact") as shown below:

    If (pageContext.getParameter ("saveContact")! = null)
    {
    contactam.invokeMethod ("saveContact");
    throw new OAException ("Data has been saved.", OAException.CONFIRMATION);
    }

    Sushant-

  • Change the color of the text to the previous button when you click on a button

    Hi all

    If I said 7 buttons, each with text that changes color on turnover by using 'Up' 'Over' and 'Down' of the keyframes in the timeline buttons.  Is there a simple way to get the text of the button changes color when you click on it, stay that way, and then back to the original color once one of the other 6 buttons are engaged?

    The only thing I can get to prepare code pages for each button that changes the color of every other button regardless of whether it was active.

    See the code example would help a lot!

    Thank you!

    use:

    var previouslyClickedBtn:MovieClip
    var buttonA:Array = [content_mc.work_btn, next button and the rest of your buttons];
    var targetA:Array = [work_mc, etc.];

    for (var i: uint = 0; i<>
    .Ivar Button [i] = i;
    buttonA [i] .addEventListener (MouseEvent.CLICK, clickF);
    buttonA [i] .addEventListener (MouseEvent.MOUSE_OVER, overF);
    buttonA [i] .addEventListener (MouseEvent.MOUSE_OVER, overF);
    }

    function workOver(e:MouseEvent):void {}
    e.currentTarget.gotoAndStop ("over");
    }

    function workClick(e:MouseEvent):void {}

    {if(previouslyClickedBtn!=null)}

    previouslyClickedBtn.gotoAndStop ("up");

    }

    e.currentTarget.gotoAndStop ("down");

    previouslyClickedBtn = e.currentTarget;

    targetA [e.currentTarget.ivar] .gotoAndPlay ("enter");
    }

    function workOut(e:MouseEvent):void {}
    content_mc.work_btn.gotoAndStop ("up");
    }

  • Cannot open in a page Web, on the page of the Bank opens a new tab and indicates that the site has moved here, but when you click on the button here it still does nothing

    When I go to internet banking as a clydesdale, it opens a new page to connect, but a few days ago it stopped working with the new update. Now when I click on connect, it says "FOUND the document pushed here." and clicking here opens another page of connection, but after being entered the details the page doesn't load. the same thing happens on other sites, on the other, when I click to read the messages page does nothing, and if I click to open in a new tab the same page is displayed instead.

    GundamGirl said

    Theres been other people having this problem too...

    Yes, for example, that this person- https://support.mozilla.org/questions/1078226 -, but they did not post cost around if any suggestion made a difference, I appreciate your following upward.

    Here are two other things to check:

    (1) connection settings - have they been customized?

    "3-bar" menu button (or tools) > Options > advanced

    Click the mini network, and then click the settings button

    The default value of 'Use system proxy settings' should follow your 'LAN' setting, as well as IE, but you can also try 'No proxy' to see if that makes a difference.

    (2) extensions - test Firefox to turn off Safe Mode

    Firefox Safe mode is a standard diagnostic tool to disable some advanced features of Firefox and extensions. More info: questions to troubleshoot Firefox in Safe Mode.

    Does not work if Firefox: Hold down the SHIFT key when you start Firefox.

    If Firefox is running: You can restart Firefox in Mode safe mode using either:

    • button "3-bar" menu > "?" button > restart with disabled modules
    • Help menu > restart with disabled modules

    and OK reboot.

    Two scenarios: A small dialog box should appear. Click on 'Start mode safe' (not update).

    Any improvement?

  • New inputext when you click on the button

    Hi all

    I have a table with three fields: ID (pk) and ParameterName, ParameterValue.

    In my web form: I do a button, when the user click on the button New Row-> new inputtext two show, they are ParameterName and ParameterValue.

    After user entered value for two inputtext-> click Save to insert it into the db table.

    Example of a web form like this:

    ParameterName: < administrator > ParameterValue: [email protected] >

    ParameterName: < member > ParameterValue: [email protected] >

    But on my web form must maintain the new value of line in there to inputtext.

    Thank you

    Take a look at af:forEach and af:iterator

    http://jdevadf.Oracle.com/ADF-richclient-demo/docs/tagdoc/af_forEach.html

    Oracle ADF - tips and Techniques: ADF UI - easy implementation of editable forms using the & lt; AF:iterator & gt;

  • Adding a dialog box pop-up warning when you click the reset button

    Hello

    I would add a warning dialog to the "reset" button that appears when the user clicks on the button with a text saying something like "are you sure you want to reset the form?" before the form actually gets reset. The goal will be to help users avoid to reset the form on the accident. Any ideas would be appreciated, I'm a little in the age of darkness using LiveCycle Designer 7.0.7.

    Thank you

    S.

    Hello

    It should work in v7. Put it in the click event of the button reset.

    var nButton = app.alert({)
    CMSG: "WARNING: you are about to reset the form.» \n\nDo you want to continue? «,
    CTitre: "your title here"
    nIcon: 1, nType: 2
    });

    If (nButton is 4)
    {

    xfa.host.resetData ();

    }

    The script puts an app.alert before resetting. If the user, click Yes, and then the form is reset. If not, the form is not reset.

    Good luck

    Niall

  • How to get the event when you click Add another button in a table.

    Hello
    How to recognize the event in processFormRequest click on the button Add another line of the footer of a table?

    Suppose if the ID is anotherRow (I mean ID of the button to add another line of the footer)

    If I give if (pageContext.getParameter ("anotherRow")! = null)... its not recognizing the event that is returning null only...

    I want to perform certain actions when the user clicks Add another line of footer. Please let me know the details of how identify when add another line is clicked...

    Thank you
    Srikanth

    Hello

    If you have only one table with add_row_button, and then copy the following code works perfectly

    If (tableBean.getName () .equals (pageContext.getParameter (SOURCE_PARAM)))
    (& ADD_ROWS_EVENT.equals (pageContext.getParameter (EVENT_PARAM)))
    {
    ...
    }

    tableBean is the Handle for your advanced table, hope, it will help you.

    Kind regards
    Out Sharma

  • When you click the back button in Internet Explorer, I went back to the same page, I am already on. Problem seen in Google search engine.

    Problem seen in Google search engine.

    I used Google for years without problems - I work from home as a freelance journalist.  But this last few days, if I search for something on Google from IE and click on a result, I can get the page I want upward.  But then, if I want to go back to the same Google search page to check the other results, I can't go back by clicking on the button 'back' at the top left, as I always did.  If I click it, it just keeps returning me to the page I'm already.  I find no mention anywhere using this problem or any means to remedy.  If I have the cursor hover over the arrow bak, the address of the current page appears rather than the original Google search page, so there is obviously something wrong.

    Thank you

    Hello

    1. This only happens with Google?

    2. don't you make recent changes?

    I suggest you to follow these steps and check if that helps:

    Method 1:

    Try to run Internet explorer mode without modules and check to see if the same problem happens:

    http://Windows.Microsoft.com/en-us/Windows7/Internet-Explorer-Add-ons-frequently-asked-questions

    Method 2:

    Try to optimize Internet explorer and check to see if it helps:

    http://Windows.Microsoft.com/en-us/Windows/help/Internet-Explorer/slow-five-tips-to-boost-performance

    It will be useful.

  • How to play the music when you click on a button?

    Hello

    Could someone help me a little bit to start?
    My first attempt is just to create a scene, in which clicking on a button, it starts to play an mp3 file. I get to start playing as a background music after reading the help file and also tried to find the source code from the internet and also here without success.

    Thus, a person could be that kind of give me an example of jargon code snipplet, who would begin to play music immediately without first importing the file (such as file streaming) if possible and also small instructions how to assign to the key (Yes, not as background music).

    I just got the Adobe Director 11 a few days ago, and my wife is trying to get angry for me to sit with my NB every night without any progress,

    Thank you, in the case where a person pick up...

    Here's a demo movie: . You can download the source from here.

    It uses a member of ShockWave Audio (SWA), which connects to an external file.

  • submit the form when you click the shortcut button

    At the minute I have 2 buttons on the popup each sends the form and assigns a different value for a particular column. How can I get the original window with the form to submit (the record was created) and when one of these buttons are engaged on the popup. This popup would also end the click of a button...

    Thanks in advance

    Stefan

    Stefan,

    Take a look at this example:

    http://Apex.Oracle.com/pls/OTN/f?p=31517:50

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    http://www.Amazon.de/Oracle-Apex-XE-Praxis/DP/3826655494
    -------------------------------------------------------------------

  • Play random symbols when you click on the button

    First of all, I apologize for not be able to use answers that have already been presented in response to questions similar to this, but none of the positions I have pored over seem to cover what I'm after (unless it's a matter of my failure understand the concept... which may well be the case! Haha!)

    Anyway, I have a dozen of symbols animated on stage and I would like a chance to play each time users click on a button.

    Advice, or guidance to any Tuts out there, are very welcome.

    Cheers in advance

    Frannie x

    Here's something a little more concise that can help or otherwise be of interest:

    var childSymbols = sym.getChildSymbols ();

    var r = Math.floor ((Math.random () * 4));

    childSymbols [r] .play ();

    Add this code to your click handler. Only minor changes are needed if the instances of the button and the symbol are not at the same level of symbol.

    HTH,

    Joe

Maybe you are looking for

  • Not able to use 4 G network Reliance Jio on iPhone 6

    This cellular network has not been certified by the carrier for LTE on iPhone. Battery life, calls, SMS, voicemail and cellular data may be affected. » After going to setting-general-carrier-version is 24.1jio and I am using iOS 9.3.2 There is still

  • When it comes out for HD 2600 display based on catalyst 8.5 drivers

    Hello I tried the catalyst 8.5 drivers non-Toshiba but my GPU overheating!Then, when Toshiba released new drivers based on catalyst 8.5? At 8.5, there is finally a support for OpenGL... Therefore, it is very important to me.

  • Software update on iPhone 6s all the problems?

    Parts questions about the new update for the iPhone 6 s? Anyone download it and see the difference or problems with it

  • getting data from a web site

    I have a device that has a built in web server that I need to write a program of LV I need to read the date, that the web server is producing and compare it to the data measured actcual. Now, the measurement and the comparison is easy but I do not kn

  • HP laserjet pro 200 color mfp: hp laserjet pro 200 color mfp scan show m276nw

    Hi I have a problem to use the scan software from my PC to scan the document and save it to my PC. Whenever an error message pop up: inaccessible Scanner. I use wireless and print without any problem, even I disable the firewall and connect with the