Using TransformGestureEvent.GESTURE_SWIPE and TOUCH_TAP

Hi,
I try to create a slide in as3 for mobile with another Touch Events, but my experience does not allow me to finalize the script.
This is a slide that moves from left to right and I would like to redirect on a picture of the timeline when TOUCH_TAPE or click
Can you help me
My script
Multitouch.inputMode = MultitouchInputMode.GESTURE;
var currentGalleryItem:Number = 1;
var totalGalleryItems:Number = 4;
stage.addEventListener (TransformGestureEvent.GESTURE_SWIPE, fl_SwipeToGoToNextPreviousFrame);
function fl_SwipeToGoToNextPreviousFrame(event:TransformGestureEvent):void
          if(event.offsetX == 1)
                    if(currentGalleryItem > 1){
                              currentGalleryItem--;
                              slideRight();
          else if(event.offsetX == -1)
                    if(currentGalleryItem < totalGalleryItems){
                              currentGalleryItem++;
                              slideLeft();
var slideCounter:Number = 0;
function slideLeft(){
          gallery_items.addEventListener("enterFrame", moveGalleryLeft);
function slideRight(){
          gallery_items.addEventListener("enterFrame", moveGalleryRight);
function moveGalleryLeft(evt:Event){
          gallery_items.x -= 48;
          slideCounter++;
          if(slideCounter == 10){
                    gallery_items.removeEventListener("enterFrame", moveGalleryLeft);
                    slideCounter = 0;
function moveGalleryRight(evt:Event){
          gallery_items.x += 48;
          slideCounter++;
          if(slideCounter == 10){
                    gallery_items.removeEventListener("enterFrame", moveGalleryRight);
                    slideCounter = 0;
stop();
Thanks you

try this:
Multitouch.inputMode = MultitouchInputMode.GESTURE;
var currentGalleryItem:Number = 1;
var totalGalleryItems:Number = 4;
stage.addEventListener (TransformGestureEvent.GESTURE_SWIPE, fl_SwipeToGoToNextPreviousFrame);
activateImages();
function fl_SwipeToGoToNextPreviousFrame(event:TransformGestureEvent):void
          stage.removeEventListener (TransformGestureEvent.GESTURE_SWIPE, fl_SwipeToGoToNextPreviousFrame);  // remove listener (double swipe protection)
          desactivateImages();          
          if(event.offsetX == 1)
                    if(currentGalleryItem > 1){
                              currentGalleryItem--;
                              slideRight();
          else if(event.offsetX == -1)
                    if(currentGalleryItem < totalGalleryItems){
                              currentGalleryItem++;
                              slideLeft();
var slideCounter:Number = 0;
function slideLeft(){
          gallery_items.addEventListener("enterFrame", moveGalleryLeft);
function slideRight(){
          gallery_items.addEventListener("enterFrame", moveGalleryRight);
function moveGalleryLeft(evt:Event){
          gallery_items.x -= 48;
          slideCounter++;
          if(slideCounter == 10){
                    stage.addEventListener (TransformGestureEvent.GESTURE_SWIPE, fl_SwipeToGoToNextPreviousFrame);
                    activateImages();
                    gallery_items.removeEventListener("enterFrame", moveGalleryLeft);
                    slideCounter = 0;
function moveGalleryRight(evt:Event){
          gallery_items.x += 48;
          slideCounter++;
          if(slideCounter == 10){
                    stage.addEventListener (TransformGestureEvent.GESTURE_SWIPE, fl_SwipeToGoToNextPreviousFrame);
                    activateImages();
                    gallery_items.removeEventListener("enterFrame", moveGalleryRight);
                    slideCounter = 0;
function activateImages():void{
       gallery_items.image_1.addEventListener(MouseEvent.CLICK, gotoImage1)
       gallery_items.image_2.addEventListener(MouseEvent.CLICK, gotoImage2)
       gallery_items.image_3.addEventListener(MouseEvent.CLICK, gotoImage3)
       gallery_items.image_4.addEventListener(MouseEvent.CLICK, gotoImage4)
function desactivateImages():void{
       gallery_items.image_1.removeEventListener(MouseEvent.CLICK, gotoImage1)
       gallery_items.image_2.removeEventListener(MouseEvent.CLICK, gotoImage2)
       gallery_items.image_3.removeEventListener(MouseEvent.CLICK, gotoImage3)
       gallery_items.image_4.removeEventListener(MouseEvent.CLICK, gotoImage4)
stop();

Similar Messages

  • TransformGestureEvent.GESTURE_SWIPE and Android: super bug?

    I'm trying to make stuff with swipe event. I thought I was doing something very wrong but then I made a simple test and found out there's a really weird bug with either swipe events or with the android simulator (simcontroller) where I'm testing my applications. Basecally, if I add listeners to TransformGestureEvent.GESTURE_SWIPE in more then one eventDispatcher, after swiping over one of then the event is only triggered for that object for the rest of the execution. That happens if I use the simcontroller. However, if I play it on my Galaxy Tablet, it works just fine.
    Here's the example of this behaviour. The code is in the Actions pannel.
    http://www.4shared.com/file/hqLXR2Rs/Untitled-1.html?
    steps:
    - run the code with the simmulator
    - select gesture - >swipe from touch and gesture tab of the simcontroller
    - swipe inside one object
    - swipe anywhere else
    - run and select the swipe mode again
    - swipe inside the other object
    - swipe anywhere else
    Please if someone has a solution for this let me know
    Marcel

    I'm trying to make stuff with swipe event. I thought I was doing something very wrong but then I made a simple test and found out there's a really weird bug with either swipe events or with the android simulator (simcontroller) where I'm testing my applications. Basecally, if I add listeners to TransformGestureEvent.GESTURE_SWIPE in more then one eventDispatcher, after swiping over one of then the event is only triggered for that object for the rest of the execution. That happens if I use the simcontroller. However, if I play it on my Galaxy Tablet, it works just fine.
    Here's the example of this behaviour. The code is in the Actions pannel.
    http://www.4shared.com/file/hqLXR2Rs/Untitled-1.html?
    steps:
    - run the code with the simmulator
    - select gesture - >swipe from touch and gesture tab of the simcontroller
    - swipe inside one object
    - swipe anywhere else
    - run and select the swipe mode again
    - swipe inside the other object
    - swipe anywhere else
    Please if someone has a solution for this let me know
    Marcel

  • [HTC Desire, android 2.2., FP10.1.95.2] TransformGestureEvent.GESTURE_SWIPE not working

    Hi,
    (I have asked this question here: http://forums.adobe.com/thread/737650?tstart=0 as well).
    I am reviewing new features of the player and I've made few examples from documentation, latter is about TransformGestureEvent.GESTURE_SWIPE, but I can't get it to work on my HTC desire. Question is does those features are not working in the browser, I havn't tried it yet in the AIR?
    http://greladesign.com/battlefield/fp10.1_transformgestureevent_swipe/
    above example doesn't work:(
    package
         import flash.display.Sprite;
         import flash.events.Event;
         import flash.events.TransformGestureEvent;
         import flash.text.TextField;
         import flash.ui.Multitouch;
         import flash.ui.MultitouchInputMode;
          * @author Lukasz 'Severiaan' Grela
         public class Main extends Sprite
              protected var mySprite:Sprite;
              protected var myTextField:TextField;
              public function Main():void
                   if (stage) init();
                   else addEventListener(Event.ADDED_TO_STAGE, init);
              private function init(e:Event = null):void
                   removeEventListener(Event.ADDED_TO_STAGE, init);
                   // entry point
                   Multitouch.inputMode = MultitouchInputMode.GESTURE;
                   mySprite = new Sprite();
                   mySprite.addEventListener(TransformGestureEvent.GESTURE_SWIPE , onSwipe);
                   mySprite.graphics.beginFill(0x336699);
                   mySprite.graphics.drawRect(0, 0, 300, 200);
                   myTextField = new TextField();
                   myTextField.y = 200;
                   myTextField.border = true;
                   addChild(myTextField);
                   addChild(mySprite);
              protected function onSwipe(evt:TransformGestureEvent):void
                   if (evt.offsetX == 1 )
                        myTextField.text = "right";
                   if (evt.offsetY == -1)
                        myTextField.text = "up";
                   myTextField.text = evt.phase;
    the same issue is with rotate gesture
    http://greladesign.com/battlefield/fp10.1_gesture_phase_01/
    best regards

    Hi,
    Multitouch.supportsGestureEvents returns false but documentation doesn't mention about FP limitation for browser,
    there is only this:
    Note: The Multitouch feature is not supported for SWF files embedded in HTML running on Mac OS.
    My htc is not a mac so I expect to have it working

  • How we will use these Job_open and Job_submit job_close??

    Hi Experts,
    i am new in Developement, i need one help here my problem is
    I have one issue which is a report here i am getting the data into internal table, that data fetching i want to schedule it in background job..
    can any body tell me how can i use the JOB_OPEN and JOB_SUBMIT function modules....
    plz provide any example..
    Thanks in Advance,
    Venkat N

    Hi,
    Here is the sample program
    *Submit report as job(i.e. in background) 
    data: jobname like tbtcjob-jobname value
                                 ' TRANSFER TRANSLATION'.
    data: jobcount like tbtcjob-jobcount,
          host like msxxlist-host.
    data: begin of starttime.
            include structure tbtcstrt.
    data: end of starttime.
    data: starttimeimmediate like btch0000-char1.
    Job open
      call function 'JOB_OPEN'
           exporting
                delanfrep        = ' '
                jobgroup         = ' '
                jobname          = jobname
                sdlstrtdt        = sy-datum
                sdlstrttm        = sy-uzeit
           importing
                jobcount         = jobcount
           exceptions
                cant_create_job  = 01
                invalid_job_data = 02
                jobname_missing  = 03.
      if sy-subrc ne 0.
                                           "error processing
      endif.
    Insert process into job
    SUBMIT zreport and return
                    with p_param1 = 'value'
                    with p_param2 = 'value'
                    user sy-uname
                    via job jobname
                    number jobcount.
      if sy-subrc > 0.
                                           "error processing
      endif.
    Close job
      starttime-sdlstrtdt = sy-datum + 1.
      starttime-sdlstrttm = '220000'.
      call function 'JOB_CLOSE'
           exporting
                event_id             = starttime-eventid
                event_param          = starttime-eventparm
                event_periodic       = starttime-periodic
                jobcount             = jobcount
                jobname              = jobname
                laststrtdt           = starttime-laststrtdt
                laststrttm           = starttime-laststrttm
                prddays              = 1
                prdhours             = 0
                prdmins              = 0
                prdmonths            = 0
                prdweeks             = 0
                sdlstrtdt            = starttime-sdlstrtdt
                sdlstrttm            = starttime-sdlstrttm
                strtimmed            = starttimeimmediate
                targetsystem         = host
           exceptions
                cant_start_immediate = 01
                invalid_startdate    = 02
                jobname_missing      = 03
                job_close_failed     = 04
                job_nosteps          = 05
                job_notex            = 06
                lock_failed          = 07
                others               = 99.
      if sy-subrc eq 0.
                                           "error processing
      endif.
    Regards
    Sudheer

  • I'm using matchbook pro and I'm unable to find iPhoto after upgrading to Maverick os

    I'm using matchbook pro and I'm unable to find iPhoto after upgrading to Maverick os

    Open the Mac App Store application and see if iPhoto is under your "Purchases" tab.
    Clinton

  • Help using multiple iphones and ipods on itunes

    Okay, is there any simple way to use multiple apple products thru itunes. I can log in on my account and sync my iphone/ipod, then I log out and log back in with my daughter's account info. I plug her itouch in and it wants to read all of my apps(some apps we both have on our devices). Have problems with music sharing as well. Still a PC user. Get very frustrated with itunes. spend way too much time trying to do things that should be simple. please help! Thank you!

    Are you using method 1 with different windows user accounts?
    http://support.apple.com/kb/HT1495
    Sounds like you are currently using method 2 and not happy with it.

  • I want to buy a new apple tv but it used hdmi cables and my house is only wired for analog.  Is there any way I can use the apple tv on analog cables?

    I want to buy a new apple tv but it used hdmi cables and my house is only wired for analog.  Is there any way I can use the apple tv on analog cables?

    Welcome to the Apple Community.
    It's do-able, but I don't think it's a great idea.
    DVI
    Some users with DVI have managed to get their TV's to work with DVI-HDMI cables. DVI carries no audio, so alternative connections need to be explored to enable audio. DVI doesn't necessarily support HDCP as well as other standards used by HDMI (which may or may not be an issue)
    Analogue
    There are hardware converters that will convert HDMI to various other types of output, however there are some issues with doing so that you should be aware of.
    HDCP
    HDCP compliant converters will not allow you to watch HDCP protected content such as that from the iTunes Store. Non compliant converters exist but we cannot discuss them under the Terms of Use for these communities.
    Resolution and aspect ratio
    I'm not aware of any converters that will scale the output from the Apple TV, any TV or projector which is used will need to be widescreen and support resolutions of 720p (Apple TV 2), 720p/1080p (Apple TV 3)
    DAC
    DAC (Example Only - Not a recommendation or suggestion that this is suitable in your circumstances)

  • IPad2 and a new MacBook running Lion, Both Devices use the same Apple ID which is a Hotmail eMail id. Can I create a new iCloud eMail Id and use iCloud eMail and continue to use my Hotmail Id for my Apple Id and use it for iTunes, iCloud

    I have an iPad2 and a new MacBook running Mountain Lion. Both Devices use the same Apple ID which is a Hotmail eMail id. Can I create a new iCloud eMail Id and use iCloud eMail and continue to use my current Hotmail Id for my Apple Id for iTunes, iCloud.
    Note, I will use both Hotmail and iCloud eMail.

    Welcome to the Apple Community.
    In order to change your Apple ID or password for your iCloud account on your iOS device, you need to delete the account from your iOS device first, then add it back using your updated details. (Settings > iCloud, scroll down and hit "Delete Account")

  • I'm using Time Machine and a LaCie external drive to backup. I also have a 8 GB LaCie flash drive I want to use for small jobs. If I plug the LaCie flash drive in, is my Mac going to think it is the LaCie external drive and start trying to backup?

    I'm using Time Machine and a LaCie external drive to backup. I also have a 8 GB LaCie flash drive I want to use for small jobs. If I plug the LaCie flash drive in, is my Mac going to think it is the LaCie external drive and start trying to backup?

    no.

  • I have an older macbook pro and the hard drive is starting to go (making loud noises). i tried to back up to an external hard drive (my passport essential se) using time machine and the computer keeps shutting down. suggestions to complete backup please?

    I have an older macbook pro and the hard drive is starting to go (making loud noises). i tried to back up to an external hard drive (my passport essential se) using time machine and the computer keeps shutting down. the same thing happens when just trying to save my pictures from iphoto to a flash drive. suggestions to complete backup please?

    Sounds like you'll need to access that drive while it is not booted. You need to replace it anyway, so do that, then one way or another (ext enclusure, et), access it and copy files.
    If you keep trying to boot it, you might kill it for good and not get your files, so just swap it out first.

  • Using Adobe Bridge and iPhoto together

    I use Adobe Bridge (and Photoshop) to work on my photos. iPhoto is not an option since I shoot in Camera RAW. I also own an Apple TV and want to store all of my photos in iPhoto so they are available to the rest of my family via Apple TV. Has anyone figured out a way to do image manipulation first in Bridge & Photoshop and then have them sent (or later updated) in iPhoto in an automated fashion?
    Conceptually, every time I add or change a photo in Bridge or Photoshop, I'd like to convert it to JPG, and add or modify the image in iPhoto.

    Also make sure PS's File handing preferences "Macimize PSD and PSB File Compatibility" is set to Always and that there are no alpha channels in the file. An alpha channel will cause the black image that you're referring to.
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto (iPhoto.Library for iPhoto 5 and earlier) database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 6 and 7 libraries and Tiger and Leopard. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

  • Installing Adobe Photoshop 10. Using Windows 7 and IIE.  Get message "error:1"

    Installing Adobe Photoshop 10.  Using Windows 7 and IE.  Gt message  "error:1"

    Not sure what CS3 is.  Attached is a screen shot of the error message I get when trying to use Photoshot Elements 10.
    Looks like I can't attach a Word or PDF document or paste an immage.
    This forum may not be very user friendly.
    Let mehttp:// know if there is another way to communicate.
    Thanks,
    Phil
    <Removed by Moderator>

  • How can I create an csv/excel file using pl/sql and then sending that file

    How can I create an csv/excel file using pl/sql and then sending that file to a clients site using pl/sql?
    I know how to create the csv/excel file but I can't figure out how I would get it to the clients site.

    968776 wrote:
    How can I create an csv/excel file using pl/sql and then sending that file to a clients site using pl/sql?
    I know how to create the csv/excel file but I can't figure out how I would get it to the clients site.You are trying to do it at a wrong place..
    Whay do you want database (pl/sql) code to do these things?
    Anyhow, you may be interested in :
    {message:id=9360007}
    {message:id=9984244}

  • How do I get iCal to sync to my iphone 4. It used to work and now it won't. Any suggestions will be most appreciated.

    How do I get iCal on my Mac to sync with my iphone 4.
    It used to work and now it doesn't.
    I am not on MobileMe or the Cloud.
    Any suggestions will be most appreciated.

    Hi Arezzo
    I'm asuming you are using iTunes then to sync? this can be done over WiFi or the USB cable.
    Review your setting for the calendar sync once iTunes is open and your iPhone is connected. Make sure your Calendars are selected to sync that you need. By default all calendars will.
    So the option i have for you is to reset the sync service and this will reset those settings in iTunes. Meaning that you will have to switch them on again in iTunes to sync. But this mostly clears unresolved sync issues.
    Please do yourself a favour and hit backup in iTunes before doing any testing. iTunes will then keep a local backup of your iPhone in case of any data loss.
    {added}
    open Terminal from your Utilities folder and paste this command in to reset. OS X 10.6 - 10.8
    /System/Library/Frameworks/SyncServices.framework/Versions/A/Resources/resetsync .pl full [press Enter]
    if it prompts for a password, just type your password and hit [Enter] again.
    Open iTunes then set your syncs up and it should then carry on again.
    Message was edited by: WaldoWTM

  • I accidentally uploaded songs from cds to the wrong itunes library. i would like to move those songs to my regular itunes library that i use to purchase and download music, since my ipod cant sync to both libraries. how can i do this? please advise. thank

    i accidentally uploaded songs from cds to the wrong itunes library. i would like to move those songs to the regular itunes library that i use to purchase and download music, since my ipod cant sync to both libraries. how can i do this? please advise? thank you.

    See this older post from another forum member Zevoneer covering the different methods and software available to assist you with the task of copying content from your iPod back to your PC and into iTunes.
    https://discussions.apple.com/thread/2452022?start=0&tstart=0
    B-rock

Maybe you are looking for

  • How do you tell if your iphone has been hacked?

    How do you tell if you iphone has been hacked? I have an iphone 3GS and I've gotten text messages from 2 different people that i don't know, telling me they can't see the pics that I've sent them & wanting to know what the pics are of. One of the num

  • Double tap to open doesn't work

    I've been using OS X for some time. When I double tapped (double clicked/pressed return) it used to open file in finder but this function suddenly disappeared. I cannot neither open song in itunes by tapping on it. Do you have any idea how to reactiv

  • IPad Air Speakers Quality

    I have just got my new IPad Air home and have set it up,no problems as far! I then have played audio,video and even notification sounds and the quality is awful. It sounds like the speakers are vibrating and gives such a tinny sound I can't listen to

  • Switch statement for AS3  - Flash CS3

    Hey guys, I currently have a code of a switch statement for as1- as2. This is it: switch (int(Math.random() * 20))     case 0:         hint = "The total amount of confusion in this world remains constant. It just gets shifted around.";         break;

  • Want to tick Open Item Management in TDS Account

    Hi Gurus, I have posted some transactions to TDS GL Account but open item management is not ticked. Now i want to tick open item management and i am running program RFSEPA02 in se38 but system is giving message that do not use report program for open