How do I make a button work in a specific area on the canvas only?

I'm making a Minecraft-Terraria style mining game, and I have a pickaxe tool. I want to make it so it can only be triggered over a certain area or position. How would I do this?
PS. If it uses coordinates, how would I find those?

which one?
there are 2 different suggestions.  using coordinates is easiest to use but only works well if the area is rectangular.

Similar Messages

  • Hello how can i make one button work

    hello , please
    i would like to know if i have three buttons working but i need to make when i push one of them the others just don't work unless the first or the button i pressed finish its action
    thx

    Hi, redcrowdesign-
    Part of the problem is that you're using ActionScript syntax in a JavaScript environment.  Instead of using _root, you can access the Stage object.  If your symbol is only one level down, you can use sym.getParentSymbol().stop("label");.  If you have a nested symbol, you may find sym.getComposition().getStage().stop("label"); more effective.
    That being said, you might want to rethink your UI model and focus your iPad interactions on the touch events, which are much more performant than the mouse events.
    Hope that helps,
    -Elaine

  • How do I make navigation buttons work?

    I'm new to DW CS3...I've (somehow) managed to create a
    navigation bar...what I can't figure out is how to make the back
    and forward buttons to work. I'm using a template for my site
    design. I'd like to set the actions on the template.
    Thanks,
    Michele

    You wrote, "start and stop apache with apachectl start or apachectl stop (or restart with apachectl graceful)."
    Are you saying that it's wrong to use System Preferences > Web Sharing to stop Apache - I should use the apachectl command instead?
    "without blasting anything, you can specify the right one with an alias in your .bashrc file. do something like: alias apachectl="/usr/local/sbin/apachectl""
    I'm searching for .bashrc with Spotlight right now, but I haven't found it yet; there was one reference to it, but I haven't yet been able to open it. Should there be a second .bashrc file for MAMP, or just a total of one?
    "type "which apachectl" to determine which you're using by default. the default apache executable (1.3.x) is actually /usr/sbin/httpd. apachectl is just a wrapper script to control it."
    I typed "which apachectl" into Terminal, and it displayed the following:
    /usr/sbin/apachectl
    What does that mean?
    "so if mamp installed another apache instance, it probably ha its own conf file. edit that, and you should be set."
    I'm sorry; edit what? Am I supposed to look for a reference to usr/sbin or apachectl in my httpd.conf file? I've already added virtual hosts to MAMP's httpd.conf file.
    Thanks.

  • Help! How do i make a button state maintain when there are other buttons on the page?

    I need to have the down state of pressed buttons stay in that state when there are multiple buttons being pressed on the same html page...

    Hello and welcome to the forum,
    Not sure if I understand well, but think you are bumping into the Quiz scope... I have been trying to explain this in a blog post, with other functionalities of Question and Score slide:
    Question Question Slides
    Lilybiri

  • How do I make my data work? it won't show the icon or let me use my data but I know I have data

    My phone isn't letting me on my network data. When I check to see if I have data it says I do but the 4G icon isn't coming up and it won't let me use my data.

    Hi tdupont11,
    Thanks for visiting Apple Support Communities.
    If the cellular data connection on your iPhone is not working as expected, start with the troubleshooting steps in this article:
    iPhone: Troubleshooting a cellular data connection
    http://support.apple.com/kb/ts3780
    Best,
    Jeremy

  • How can I get a birthday reminder from items which are in the read-only cal

    I am looking for a solution to get a reminder message for birtdays which are within the read-only calender imported/updated from he address book. I so far have not found the option where to turn on the reminder and I do not want to duplicate items (ie creating another birthday calender inside iCal).
    Thanks for comments.
    PB G4 Ti, 1GHz, 10.2.8   Mac OS X (10.4.7)  

    Hi ontour,
    This limitation is one of the many reasons I wrote Dates to iCal. It is a replacement for the Birthdays calendar in iCal, so you would need to turn the Birthdays calendar off in iCal's preferences.
    See here: http://discussions.apple.com/thread.jspa?threadID=466478
    Best wishes
    John M

  • How do I make a button onj the form which will submit and send the pdf as an email?

    how do I make a button on the form which will submit and send the pdf as an email?

    You can set up a button with a "Submit a form" action and use a mailto type URL to specify the email address you want the forms sent do. If you want to send the entire PDF, select that option and not FDF or anything else. The mailto URL should not include any spaces and the "mailto" part should be lowercase, like:
    mailto:[email protected]
    This will attempt to initiate an email using the users default email client. If the user does not have one set up or there is some other problem, the email might not get initiated. If it needs to work with Reader versions prior to 11, then the form needs to be Reader-enabled, which you do in Acrobat 11 by selecting: File > Save As Other > Reader Extended PDF > Enable More Tools

  • How can I make a button "react"?

    This is probably a super silly question, but you know how it is, sometimes we sit on the answer and still can't find it... How can I make a button react to a click? I just want the simple effect of the button changing colors or looking like the user pushed it. Right now it's just the same old plain button, no matter if I click it or not, you can't really tell the difference. How can I give it the "pushing the button" effect? Thanks guys!

    You can choose image button and then choose from the available image buttons, or click on the folder icon when you select the image button and choose from the Gallery of Captivate 6.
    Few image buttons change color on hover or onclicked, these effects are predefined in them.
    Or you can edit that button on which you are working, from properties Panel.
    The Post and Cancel button on this thread seems like a transparent button in Captivate with different fill and stroke color, and transparency is also less, and with corner radius of 0.
    You will find these all optionns, when you will click on that button and then click on the properties panel.
    Thanks.

  • How can you make one button preform different actions in Xcode?

    How can you make one button "preform a click" and "orderfront"? Is that possible? Because what I am doing is making a welcome window to my application for Mac OS X 10.6, and I have two buttons in that window, one says "Connect" which connects a a WebView to a url and the other button opens up the main window. So how can I a make a button do multiple things at once??

    Ah - If you are just using bindings between various objects from Interface Builder, you can reduce your application code a bit (sometimes quite a bit), but there is only so far you can go. Typically variables and routines are defined in your application that Interface Builder hooks into, so that your application code (usually Objective-C, but can be others) can use these variables and routines to determine what is happening in the user interface.
    I'm not sure how up-to-date the project code is (or what programming code you are familiar with), but you can take a look at Apple's Cocoa Application Tutorial to see what is (usually) involved in creating an application.

  • I just bought a (used) Iphone 3gs for wife and it had angry birds and $89 Navigation on it (I paid extra for it).  Once updated and logged into my I-tunes it no longer works? How can I make those apps work?

    I just bought a (used) Iphone 3gs for wife and it had angry birds and $89 Navigation on it (I paid extra for it).  Once updated and logged into my I-tunes it no longer works? How can I make those apps work?

    Apple doesn't have anything to do with this other than enforcing the DRM protection. The developers of this content expect to be paid if someone wants to use their content. When you purchase content in the app store, you purchase a license to use the content. This license does not permit you or anyone else to resell or give this content away. The individual you purchased the phone from simply does not have the right to sell or give away any purchased content on the phone. You were deceived.

  • My Iphone 3gs wont charge, turn on, or restore itself in Itunes, but the apple logo still appears when I hold the sleep botton.  How can I make my Iphone work????

    My Iphone 3gs wont charge, turn on, or restore itself in Itunes, but the apple logo still appears when I hold the sleep botton.  How can I make my Iphone work????  I know it is not dead because I can see the apple logo on, and every time I connect it to a USB port to charge, or a wall charger, the battery appears with a bit of red. Still, it wont turn on.  It's been like this for three days now and I haven't stopped charging it.  IT just WONT charge?  Any tips I can use to solve the issue?
    -Esteban

    Hello estebie67,
    Thanks for the question, and welcome to Apple Support Communities.
    It sounds like the iPhone is experiencing issues upon startup, and may not be loading the firmware or operating system correctly. If you have not already done so, try resetting the iPhone while connected to power:
    iPhone, iPad, iPod touch: Turning off and on (restarting) and resetting
    http://support.apple.com/kb/HT1430
    If the above does not resolve your issue, it will be best to restore the iPhone in recovery mode:
    iOS: Unable to update or restore
    http://support.apple.com/kb/HT1808
    Thanks,
    Matt M.

  • How do I make a button have a permanent down state?

    How do i make it so when you when you click on the button it
    changes the button..
    for example
    normal > red
    rollover > green
    when clicked > stays blue

    I solved that problem by making the down state an actual
    frame in the timeline.
    ie. I want something to happen when you press the button.
    That something is going to happen on frame 10 and the button is on
    frame 1-9. Make a Layer called ACTIONS. Then while on that button
    frame range (1-9) and after selecting that button, in the Actions
    panel I put
    on (release) {
    gotoAndPlay(10);
    Then I select the ACTIONS layer I created and put a
    stop();
    at frame 9... so it waits for the button. you could just send
    it back to frame 1 if you want an anim to loop.
    Anyway, on Frame 10 (when that button is pressed) I replace
    it with what it stays with... the down or SELECTED STATE button.
    This was how fixed my buttons to stay down.
    there is probably a better solution somewhere.

  • How do I make a button NOT take focus when it is clicked?

    I am trying to create a virtual keypad and the problem is that when I have a Robot make a KeyEvent for a certain number when a certain button is pressed, the TextField loses focus and the focus is placed on the button that was pressed, so nothing appears in the TextField.
    How can I make a button NOT take the focus when it is pressed?
    Edited by: tox0tes on Nov 28, 2008 8:06 PM

    great. another way is to have a call to myTextField.requestfocus() in the button's actionlistener actionPerformed method, but that leads to tight coupling.

  • How can I make a button that on press the object appears and on second press the object to disappear

    Hello,
    I'm quite new to flash programing, and I don't know how can I make a button that will make the object appear and disappear.Till now I have this code for the appear:
    on (press)
        _root.top1.gotoAndStop(2);
        _root.topp.gotoAndStop(2);
        _root.mm1.gotoAndStop(2);
              _root.m1.gotoAndStop(2);
    but from here I'm stuck.
    Thank you for your help

    What you can do is use the _visible property of the object to make it appear and disappear, or more correctly, use the opoosite of the _visible property.  You should not put code "on" objects, keep it in the timeline.
    If "object" is the instance name of the object you want to toggle, then in the timeline code you can use...
    object._visible = false;  // start with the object being invisible
    yourButtonName.onRelease = function(){
        object._visible = !object._visible;
    That one line in the function sets the object's _visible property to be the opposite of what it currently is.

  • How can I make my buttons be gone forever?

    Just starting out with Flash and have run into a problem. I have several scenes with buttons that can be pressed once and then they disappear using:
    myBtn1.onRelease = function(){ this._visible=false}
    But when I go back to the scene the buttons reappear. How can I make my buttons be gone forever?

    if you have more than 1 button that should be made not visible at any given time, you'll need to use an array to store those button references.  otherwise, you can use:
    var alreadyRemoved:Boolean;
    if(alreadyRemoved){
    myBtn1._visible=false;
    myBtn1.onRelease=function(){
    this._visible=false;
    alreadyRemoved=true;

Maybe you are looking for

  • Auto increment with collection is not working

    I am using KODO 3.0 with MYSQL 4.0.16. I have created two JDO object as follows BankAccount contains a collection of Contacts object. My metadata looks like this <class name="BankAccount"> <field name="contacts"> <collection element-type="Contacts"/>

  • Back up to dvd taking too long?

    I am trying to back up my entire library to a data dvd disc. I am following the steps outlined: file, library, burn to disc, etc...however, when I finally click burn to disc, NOTHING happens...my entire library is 2.90 GB..I am using an external DVD

  • I keep getting a 4000 error when trying to burn discs....only been since the update....Help

    Ever since the Itunes update, I keep getting an 4000 error when trying to burn my music to disc.  How do I fix this?

  • RFC call failed: JCO.Server could not find server function 'SET_SLD_DATA'

    Hi, All the system is PI 7.0 EHP1 oraclei Win2003 server, I configured SLD but I run RZ70, having error "RFC call failed: JCO.Server could not find server function 'SET_SLD_DATA' ". I know there are lot of tread about this error, but none of themsolv

  • Xb4 and dv6t mute bug

    I have a dv6t laptop with an i7 processor, win 7 pro, and the factory tv-tuner.  I use windows media center to watch videos and tv.  The laptop is usually docked in the xb4 media docking station, I very rarely undock the notebook.  Often, I will brie