How do you click on object and then unclick that onbject to then click on another object?

I am building a simple game in which you must click on a square to activate it, meaning when you click on it you have control of its movement. I then want to be able to click on the square again so that you don't have control of it, and then you can click on another object in the game. What is the code to allow this? I believe its an eventListener for a mouse event.

Clicking either way involves assigning an event listener for the CLICK event, as in...
yourSquare.addEventListener(MouseEvent.CLICK, manageControl);
wherein bth the name of the square that I used (yourSquare) and the name of the event handler function (manageControl) are named however you want them named.  The real work gets done in the event handler function...
function manageControl(evt:MouseEvent):void {
     // this is where your code will go to determine if the square has been clicked to control it versus clicked to give up control.

Similar Messages

  • How do you apply a black and white image sequence as an alpha layer to another image sequence

    I have a 3D render I'm compositing in AE CS3.
    Everything is rendered as image sequences, and I have an alpha pass. How do I apply it to my master layer?

    Nevermind. Todd Kopriva answered the question here:
    http://forums.creativecow.net/readpost/202/877498

  • Please a simple problem but I don't know how to solve it. After installing 16 gb of ram all is good but when I turn on the computer it is a window signaling that all is correct. How is possible to delete once and for all that window? Thank you

    Please a simple problem but I don't know how to solve it. After installing 16 gb of ram all is good but when I turn on the computer it is a window signaling that all is correct. How is possible to delete once and for all that window? Thank you

    Well then maybe you could take a screenshot because the appearance of such a window is news to me.
    Also post your OS X version and what model Mac you have. The more detail, the better. Thanks.
    To take a screenshot hold ⌘ Shift 4 to create a selection crosshair. Click and hold while you drag the crosshair over the area you wish to capture and then release the mouse or trackpad. You will hear a "camera shutter" sound. This will deposit a screenshot on your Desktop.
    If you can't find it on your Desktop look in your Documents or Downloads folder.
    When you post your response, click the "camera" icon above the text field:
    This will display a dialog box which enables you to choose the screenshot file (remember it's on your Desktop) and click the Insert Image button.
    ⌘ Shift 4 and then pressing the space bar captures the frontmost window.
    ⌘ Shift 3 captures the entire screen.
    Drag the screenshot to the Trash after you post your reply.

  • How do you get to the "Multiple Item Information" window so I can click "Part of a compilation:?

    How do you get to the "Multiple Item Information" window so I can click "Part of a compilation"?  When I transfer a CD to iTunes, and the CD has ten tracks, it loads as ten different albums.  Also, once this happens, do I have to delete the album and start over or is there a way to merge the albums in iTunes?  Using iTunes 10.04.08.

    And you've made me remember that using the compilation flag may only work in iTunes if you go into the Songs view, then use View > Column Browser > Show Column Browser and then View > Column Browser > Group Compilations to make sure this line is ticked.
    It is also best if View > Column Browser > Use Album Artists is also ticked.
    tt2

  • How do you get the sender and receiver pics to show up in iMessage

    How do you get the sender and receiver pics to show up in iMessage

    '''If this is a new Pop mail account''',
    Those folders do not appear until you have actually Sent or saved a Draft email.
    check settings:
    Tools > Account Settings > Copies & Folders
    * select: 'place a copy in'
    * select: 'Sent' folder on the mail account
    For Archive
    * select 'keep message archives in:'
    * choose ' 'Archives' folder on mail account
    For Drafts and Templates
    * choose 'Drafts' folder on mail account
    * choose 'Templates' folder on mail account
    * click on OK
    '''If you have an IMAP mail account''',
    you need to make sure you have selected to subscribe to see those folders.
    Then make sure your settings use those folders.
    Tools > Account Settings > Copies & Folders
    * select: 'place a copy in'
    * select: 'Other' and choose the sent folder on the server mail account
    * If you want all Archive, Drafts and Templates to also be saved to the server folders, choose 'Other' and the respective folder on the server mail account.
    * Click on OK to save changes.
    More info on synchronising:
    * https://support.mozilla.org/en-US/kb/imap-synchronization
    Info on IMAP gmail:
    * https://support.mozilla.org/en-US/kb/thunderbird-and-gmail
    I note that you are using a gmail mail account. Please note that the gmail 'All Mail' folder is gmails archive copy of all of your emails, so if you subscribe to see this folder it will double the amount of space used. It is suggested that you do not subscribe to see this folder.
    Read section under 'All Mail':
    * http://kb.mozillazine.org/Using_Gmail_with_Thunderbird_and_Mozilla_Suite

  • How do you sync voice memos and make CD's of them?

    How do you sync voice memos and make CD's of them?

    When you sync the phone with your computer voice memos are copied to your iTunes library with the Genre "Voice memo".
    To burn to CD you do it the same way you would any music; create a playlist of the memo(s), the right click on the playlist and choose "burn to CD".

  • How do you get a word and character count of a document in Pages for Mavericks

    How do you get a word and character count of a document in Pages for Mavericks?

    Hi jonathan,
    I struggled with this one as well, as i'm finishing up a PhD thesis and word counts are incredibly important. Through trial and error i found out that words like 'e.g.' and 'i.e.' count as two words and an ampersand (&) doesn't count at all. That being said, i didn't like the fact that the word count always included footnotes and i was dismayed that i couldn't get an accurate count of words in the main body of my text. That all disappeared yesterday when, by chance, while i was copying a completed chapter and pasting it into my main document, i discovered that Pages can indeed give you an accurate word count excluding the footnotes!  Here's all you need to do:
    1. In pages 5.2, make sure that the Word Count function is first enabled by selecting View --> Show Word Count from the Pages Menu Bar. (If it's already enabled, it will read View --> Hide Word Count, so if that's what it says, then no need to do anything.)
    2. Once enabled, check the Word count that's currently showing at the bottom of the page. That's the word count including your footnotes.
    2. Now, place your cursor anywhere within the current document, then hit command+A (for Select All).
    3. Viola! Your word count now shows the actual number of words within the body of the text only, excluding footnotes!
    Hope that helps!

  • How do you differentiate business process and business scenario

    how do you differentiate business process and business scenario???
    pls help

    Google says;
    A <b>business scenario</b> is a description of a business problem, which enables requirements to be viewed in relation to one another in the context of the overall problem. Without such a description to serve as context, the business value of solving the problem is unclear; the relevance of potential solutions is unclear and there is a danger of the solution being based on an inadequate set of requirements. A key factor in the success of any other major project is the extent to which it is linked to business requirements, and demonstrably supporting and enabling the enterprise to achieve its business objectives. Business scenarios are an important technique to help identify and understand business needs.
    A business process -
    http://en.wikipedia.org/wiki/Business_process

  • How do you add full folders and not just individual files in the new itunes?

    How do you add full folders and not just individual files in new itunes? i just reformatted my HD and went to add all my music and it's only letting me add files not folders!?!?

    "Add Folder to Library" is still in the file menu, but you might need to bring up the menu bar to see the file menu.
    If you're using 11.0.x, click on the wee boxy icon up in the top-left corner of your iTunes to see the "Show Menu Bar" control, as per the following screenshot:

  • HT4915 How do you stop syncing address and calendar to iCloud? I only want to sync  from my computer to iPhone.

    How do you stop syncing address and calendar to iCloud? I only want to sync  from my computer to iPhone.  This is because I cannont upgrade to Lion and I do not want to get duplicate contacts when I sync from the computer 10.6.8 to my iPhone iOS5.  You should not upgrade to Lion upless you have 4GB of ram. Lion does not support rosita so all your old programs will not funtion and you have to repurchase all old software the is working fine.

    Welcome to the Apple Community.
    Settings > iCloud, turn off contact and calendar syncing.

  • How Can You Change the Look and Feel of Charts in OBIEE 11g

    How Can You Change the Look and Feel of Charts in OBIEE 11g?
    Edited by: user11973122 on Jul 18, 2012 12:13 AM

    Check these files
    OFM_HOME\Oracle_BI1\bifoundation\web\msgdb\s_blafp\viewui\chart\dvt-graph-skin.xml
    OFM_HOME\Oracle_BI1\bifoundation\web\msgdb\views\dvtchart\obips.dvtchart.xml
    OFM_HOME\Oracle_BI1\bifoundation\web\display\chartfontmapping.xml
    Pls mark correct or helpful if helps

  • How do you transfer iTunes music and movies from an old PC to a new PC.  I have all data svaed on an external hard drive.

    How do you transfer iTunes music and movies from an old PC to a new PC.  I have all data svaed on an external hard drive.

    This article should outline the options
    http://support.apple.com/kb/HT4527

  • How do you get your tunes and voice recordings from your iPod Touch into iTunes on a new computer if you don't have Mobile Me?

    How do you get your tunes and voice recordings from your iPod Touch into iTunes on a new computer if you don't have Mobile Me?
    iTunes on tmy new computer shows none of my data and I fear if I sync my iPod with the computer all will be deleted on the iPod.
    I still have everything in iTunes on the old computer.

    Just move your iTunes library to you new computer.  You can transfer iTunes purchases to you new computer from your iPod by:
    iTunes Store: Transferring purchases from your iPhone, iPad, or iPod to a computer
    iTunes: How to move your music to a new computer
    http://support.apple.com/kb/HT1848Make sure you also move the backup.  You an find where the the backup is located here:
    iPhone and iPod touch: About backups
    You can move other items by:
    Best iPod to PC
    After you move you stuff to the new computer, restore the iPod from backup.

  • How do you remove telstra messages and go back to visual messages on iphone

    How do you remove telstra messages and go back to visual messages on iphone

    Should be pretty easy as follows:
    1 - Make sure you have copies of any pictures you want that are inside Aperture somewhere on your computer.
    2 - Quit Aperture > Remove any Aperture icon from dock > drag the Aperture program (lens icon) from Applications folder to the Trash > proceed through any warning dialog (including entering password as required) to complete the process.
    Note - new security features in OS X Lion may present those warning dialogs to prevent accidental deletion of Apple programs.
    3 - Hold down the 'Option' key and use the 'Go' menu in menu bar and select the 'Library' option.
    4 - In the Library folder, open the 'Application Support' folder and delete any Aperture folder found.
    5 - While still in the Library folder, open the 'Preferences' folder and delete both the 'com.apple.Aperture.plist' and 'com.apple.Aperture.plist.lockfile' file.
    6 - While still in the Library folder, open the 'Caches' folder and delete the 'com.apple.Aperture' folder.
    7 - Go the your 'Pictures' folder and drag the 'Aperture Library' (may be named Aperture Trial Library or similar) to the Trash to delete it as well.
    8 - Empty the Finder Trash to remove Aperture.
    Note - there are some files and Aperture folders in the '/Library' folder (which is in the root of your system drive), but you don't really need to remove those. Since you are a beginner, it is probably better not to for now.
    That should do it.
    Additional edit: There are two Library folders I am referring to. The first is the one in your user account 'Home' folder which is the one you are going to by using the 'Go' menu. This is the one you are deleting files from in the steps listed. The second Library folder is the one in the root of your system drive and is not typically a location for beginners to work with (thus the final note above). Hope that is clear enough.
    Message was edited by: CorkyO2 to add clarity concerning the 'Library' folder.

  • HT1349 how  do you remove the header and footer from a document

    how  do you remove the header and footer from a document

    It depends upon the app you are using.

Maybe you are looking for