Can I make a button respond to Touch while using Gestures?

Hi, I've recently discovered I'm unable to use Touch Points and Gestures at the same time on mobile apps.
I would rather use Gestures so I'm wondering if anyone can help with making buttons respond to the user when they are touched.
Here's what I'm trying to do but the buttons are not changing alpha values:
mainMenu.menuPres.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
mainMenu.menuPres.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
function mouseDownHandler(event:TouchEvent):void {
TweenLite.to(mainMenu.menuPres, .2, {alpha:.5});
function mouseUpHandler(event:TouchEvent):void {
TweenLite.to(mainMenu.menuPres, .2, {alpha:1});
Is there another way I can do this or can this method be refined?
Thanks

Hi Mike,
That's right, MultiTouch and Gestures can not be used at the same time, but you should always be able to receive mouse events for 1st touch point.
Could you try changing your code as below.
function mouseDownHandler(event:MouseEvent):void {
TweenLite.to(mainMenu.menuPres, .2, {alpha:.5});
function mouseUpHandler(event:MouseEvent):void {
TweenLite.to(mainMenu.menuPres, .2, {alpha:1});
please sprinkle some trace statements in event handler to see if they get triggered.
Also, did you try just adding event listener for MouseEvent.CLICK, instead of MOUSE_DOWN and MOUSE_UP.
-Thanks
Pahup

Similar Messages

  • 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.

  • 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;

  • Can i make a button download a pdf?

    i have a button made in flash and im using it for a sidebar navigation in my dreamweaver site can i make the button open/download a pdf? and if so how do i go about doing this? thanks

    thats what i thought but when i do that it tells me the link does not exist and ive double checked spelling and everything.
    this is my code for the button.
    on (release) {
        getURL("TRIPSProductsSuite.pdf");

  • 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 I make my Kerio WebMail memorize email addresses used previously?

    How can I make my Kerio WebMail memorize email addresses used in the past?

    Have you checked with Kerio support for answers? <br />
    http://support.kerio.com/index.php?_m=knowledgebase&_a=view

  • How can I make the status bar hide automatically when using safari?

    How can I make the status bar hide automatically when using safari?

    When Safari is in FullScreen mode, menu bar will be hidden.
    Safari window to fit the screen?
    Move the mouse pointer to the bottom right corner of the Safari window.
    Double arrows will appear. Drag it to resize the window to fit the screen.

  • When I open my email account thru Firefox, there is a blinking message in my task bar stating that "lorainemihiril" sent me a message. I DO NOT know this person, I can't make it go away and I NEVER use instant messaging. How do I get rid of this???

    When I open my email account thru Firefox, there is a blinking message in my task bar stating that "lorainemihiril" sent me a message. I DO NOT know this person, I can't make it go away and I NEVER use instant messaging. How do I get rid of this??? Sometimes there is more than one of these flashing messages all with the same name.

    Disable Yahoo Messenger in your Yahoo Mail account.
    Use the arrow on the right of your account name to go offline or sign out.
    * http://help.yahoo.com/kb/index?locale=en_US&y=PROD_ACCT&page=content&id=SLN2003

  • How can I make a photo book of 125 pages using I-Photo??

    How can I make a photo book of 125 pages using I-Photo?

    You can't.  There's a 100 page (50 pages both sides) limit.
    OT

  • How can I make an exact copy of a dvd using os lion on a macbookpro

    How can I make an exact copy of a dvd using os lion on a macbookpro....

    Exactly what is on this DVD?
    Allan

  • Can we share music/apps within a family while using different iTunes accounts?

    Can we share music/apps within a family while using different iTunes accounts?
    Recently purchased iPhone 5 for my wife and I + my daugther has an iPod.  I'd like for us all to have separate iTunes accounts so we can each use iCloud without getting each other's notifications, but would like to have one central repository for mucsic and apps.  I'm afraid if I set up iTunes accoutn for the tow of them, I'll have to re-purchase the music and apps (way too many!)

    It can be done, but you will have to sign in to your account on her itunes to updated the apps. Try these instructions:
    http://support.apple.com/kb/HT1848

  • How can I continue listening to a YouTube video while using another app?

    How can I continue listening to a YouTube video while using another app?

    How can I continue listening to a YouTube video while using another app?

  • How can i make save button of a pop up window inactive?

    Hi...
    When we open a document attached to an opportunity,
    a pop up opens up in new window with open,save and cancel buttons.
    The document is opened by creating a url....
    How can i make the save button inactive?
    Any helpful pointers would be rewarded...
    Thanks...

    Hi..
    This thread remains closed...

  • How can i make a button link in flash??

    Hey Guys,
    Im pretty new to flash but really need your help and
    guidance. I have a nice video ive created, and i want to make the
    buttons link to certain pages on a website it will be displayed at.
    If you want to see the flash video in place on the website,
    visit www.loveandmarriagebridal.co.uk - i want to make the buttons
    to link to the following pages.
    button 1. www.loveandmarriagebridal.co.uk/index.php
    button 2. www.loveandmarriagebridal.co.uk/about_us.php
    button 3. www.loveandmarriagebridal.co.uk/
    button 4.
    http://loveandmarriagebridal.co.uk/account.php
    button 5.
    http://loveandmarriagebridal.co.uk/contact_us.php
    Could anybody please tell me exactly what i need to do in
    order to acheive that. I am using Flash CS3. Ive looked around the
    net for a solution, but i honestly have no idea what im searching
    for.
    Your help would be very much appreciated
    Thanks
    Andy

    See which form of ActionScript you used to make the site.
    Open the Actions panel and see whether you've chosen AS versions 1
    & 2, or AS 3. If you've picked the earlier versions, you can
    attach a link easily to each button by clicking on the button, and
    adding a little code in the Actions panel. Turn on ScriptAssist to
    make it easier. Click on "on" and choose "release" or "press" or
    both. Then scroll down the commands on the left and add getURL. You
    will then have a few lines that say something like, on(Release)
    getURL("putyourpageurlhere"). See bottom for exact syntax. That's
    all. The new .html or .php page will load when the button is
    clicked.
    If your buttons are not actually four-state buttons, but
    graphic or movie clip symbols, you will have do it a little
    differently. Instead of attaching the code to a button, you attach
    it to a keyframe. You give your symbol an instance name in the
    property panel, then in the Actions panel create a function that
    says essentially: when you click on this instance (onRelease)
    getURL.
    If you're using AS3, the concept is similar but the code is
    different. With a quick search you can find dozens of code examples
    that you can cut and paste.
    Here's that AS2 button code...

Maybe you are looking for