TOUCH_END event fired on all touch id when just one touch was release

Hi
I am developing a parking car game.
I have a  strange problem.
If i start touch on steeering and on gaz and then i release on of them , the TOUCH_END event is fired on both, and i still keep me finger stick to touch screen.
Multitouch.inputMode=MultitouchInputMode.TOUCH_POINT;
                              _steering.addEventListener(TouchEvent.TOUCH_BEGIN,touchStart);
                              _gaz.addEventListener(TouchEvent.TOUCH_BEGIN,touchStart);
                              this.addEventListener(TouchEvent.TOUCH_END,touchEnd);
                              this.addEventListener(TouchEvent.TOUCH_MOVE,touchMove);
                              addChild(_touch_field);
                              addChild(_gaz);
                              addChild(_steering);
te situation:
START:  gaz 3 0
START:  steering 2 1
( here i release only gaz)
END:  steering 3 1
END:  gaz 3 0
both touch end event are fired
the object are far away from each other

HERE IS ALL STEERING CLASS CODE:
package Games.Parking
          import Games.ShowObject;
          import com.greensock.TweenLite;
          import flash.display.DisplayObjectContainer;
          import flash.display.MovieClip;
          import flash.display.Sprite;
          import flash.events.TouchEvent;
          import flash.geom.Point;
          import flash.ui.Multitouch;
          import flash.ui.MultitouchInputMode;
          public class Steering extends ShowObject
                    private var _touch_field:Sprite =  new Sprite()
                    private var _steering:MovieClip =  new steering()
                    private var _gaz:gaz = new gaz();
                    private var _start_touch_point:Point;
                    private var _end_touch_point:Point;
                    private var _steering_move:Boolean = false;
                    private var _steering_offset:Number =0;
                    private var _steering_id:int = -1;
                    private var _gaz_up_id:int = -1;
                    private var _gaz_down_id:int = -1;
                    private var _angle:Number = 0;
                    private var _angle_dir:String;
                    private var _can_steering:Boolean = true;
                    private var _check_dir:Boolean = false;
                    private var _check_first_touch:Boolean = true;
                    public function Steering(pClip:DisplayObjectContainer, canShow:Boolean=false)
                              super(pClip, canShow);
                              _touch_field.graphics.beginFill(0x00,0);
                              _touch_field.graphics.drawRect(0,0,Data.instance().stage_width,Data.instance().stage _height);
                              _touch_field.graphics.endFill();
                              _touch_field.name = "bg";
                              _gaz.y = 50;
                              _gaz.x = 50;
                              _steering.x = 200;
                              _steering.y = Data.instance().stage_height-200;
                              _steering.name = "steering";
                              Multitouch.inputMode=MultitouchInputMode.TOUCH_POINT;
                              _steering.addEventListener(TouchEvent.TOUCH_BEGIN,touchStart);
                              _gaz.addEventListener(TouchEvent.TOUCH_BEGIN,touchStart);
                              this.addEventListener(TouchEvent.TOUCH_END,touchEnd);
                              this.addEventListener(TouchEvent.TOUCH_MOVE,touchMove);
                              addChild(_touch_field);
                              addChild(_gaz);
                              addChild(_steering);
                    private function touchMove(e:TouchEvent):void{
  //                              trace("MOVE: ",e.pressure,e.target.name,e.eventPhase,e.touchPointID,e.stageX,e.stageY);
                              if(_steering_move && _steering_id == e.touchPointID){
                                        if(e.stageY<_steering.y+25 && e.stageY>_steering.y-25 && e.stageX>_steering.x){
                                                  _check_dir = true;
                                        }else{
                                                  if(_check_dir){
                                                            _check_dir = false;
//                                                            trace(e.stageY,_steering_mc.y,_check_dir);
                                                            if(e.stageY<_steering.y)
                                                                      _angle_dir = "left";
                                                            else
                                                                      _angle_dir = "right";
                                        var dict_x:Number = e.stageY - _steering.y;
                                        var dict_y:Number = e.stageX  -_steering.x;
                                        _angle = Math.atan(dict_x/dict_y);
                                        _angle = _angle/(Math.PI)*180;
                                        if(e.stageX<_steering.x){
                                                  if(e.stageY<_steering.y)
                                                            _angle = (-1)*(90+(90-_angle));
                                                  else
                                                            _angle = (-1)*(180+(-1)*_angle);
  //                                        trace(_angle<-25,e.stageY>_steering_mc.y , e.stageX> _steering_mc.x);
                                        if(e.stageY>_steering.y && e.stageX> _steering.x){
                                                  _angle = (-1)*(270 + 90-_angle);
                                        if((_angle_dir == "left" && _angle<-179 )||(_angle_dir == "right" && _angle> -179)){
                                                  _can_steering = false;
                                        else{
                                                  _can_steering = true;
//                                        trace(_angle,_angle_dir,_can_steering);
                                        if(_can_steering){
                                                  _steering.rotation = _angle;
                                                  Game.instance().parking.car.turn(_angle,_angle_dir);
                    private function touchStart(e:TouchEvent):void{
                              trace("START: ",e.target.name,e.eventPhase,e.touchPointID)
                              switch(e.target.name )
  case "steering":{
                                                  _steering_move = true;
                                                  _steering_id = e.touchPointID;
                                                  _start_touch_point = new Point(e.stageX,e.stageY);
                                                  if(e.stageY<_steering.y)
                                                            _angle_dir = "left";
                                                  else
                                                            _angle_dir = "right";
                                                  break;
                                        case "up":{
                                                  _gaz_up_id = e.touchPointID;
                                                  Game.instance().parking.car.up = true;
                                                  break;
                                        case "down":{
                                                  _gaz_down_id = e.touchPointID;
                                                  Game.instance().parking.car.down = true;
                                                  break;
                    private function touchEnd(e:TouchEvent):void{
                              trace("END: ",e.target.name,e.eventPhase,e.touchPointID);
                              if(e.touchPointID == _steering_id){
                                        Game.instance().parking.car.steering = 0;
                                        _steering_move = false;
                                        _steering_id = -1;
                                        TweenLite.to(_steering,.3,{rotation:0});
  return;
                              if(e.touchPointID == _gaz_up_id){
                                        _gaz_up_id = -1;
                                        Game.instance().parking.car.up = false;
  return;
                              if(e.touchPointID == _gaz_down_id){
                                        _gaz_down_id = -1;
                                        Game.instance().parking.car.down = false;
  return;
                    public function get steering_mc():MovieClip
                              return _steering;
and the trace:
3 fingers are starting touch event:
START:  steering 2 0
START:  down 3 1
START:  up 3 2
i release just one finger, 2  still stick to stage:
END:  steering 3 0
END:  down 3 1
END:  up 3 2

Similar Messages

  • How do I delete all email messages in just one touch (delete all feature)?

    Does anyone know how to perform a "delete all" in order to delete all email messages rather than going through each message one at a time to move from the inbox to the trash folder, then delete from the trash folder permanently?  Currently, we seem to be able to only select one message at a time, rather than perform "Delete All".
    I read in a forum post about the "Delete All" button being available only when pressing Edit in the Trash folder.  Could someone please provide the sequence of steps to successfully delete all messages in one step?  Thanks.
    John Bottiger

    It is not possible other than as described by yourself - singly to the Trash folder and then collectively from there if you so wish.

  • My iPad is suddenly not loading any apps.  When I click on an app, the screen flickers to black and then back to normal, but will not load the app.  This is ALL the apps, not just one.  Have tried rebooting, to no avail.

    My iPad is suddenly not loading any apps.  When I click on an app, the screen flickers to black and then back to normal, but will not load the app.  This is ALL the apps, not just one.  Have tried rebooting, to no avail.

    Was a Restore one of the things tried.?  [Attach the iPad to your computer and in iTunes click on your device. On the Summary page click on Restore and go through the process. Be sure to click YES to Restore from a previous backup.]

  • How can I simultaneosly change ALL my passwords into just one?

    I wonder if there is a way to change ALL my passwords into just one editing keychain.
    Thank you
    Giovanni

    No. You cannot edit passwords all at once.

  • I have iPhoto 08 and have been happy with it. Don't want to upgrade. But suddenly, when I click on an event, instead of all the photos, I just get one- enlarged- and cannot move to the next one. The photo just jumps up or down.  How to solve?

    I have posted "submit" twice and keep getting requests to submit again.  Now being asked to write a summary! Here we go.  I have iPhoto 08 and am happy with it.  Don't want to upgrade. But suddenly when I click on an event, instead of getting all the photos, I just get a large version of one photo and cannot move on to the others.  The right arrow will not move it and the photo just jumps around.

    Note the slider bottom right of the iPhoto Window. Drag it left.

  • My ipod touch 4g, when i pick a song my music from itunes it wont play it will just skip through almost all my songs for just one then go back to the song menu and so how do i fix this problem

    My ipod touch 4g will not play my music i bought from the itunes store and it will skip through all my songs or just like 1,2,,3,4, songs also the just go right back to the song menu it had ben like this for like 2 days now and i am just woundering i can fix this HELP!!

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Unsync all music and resync
    - Reset all settings
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                 
    iOS: How to back up           
    - Restore to factory settings/new iOS device.

  • All these softwares in just one

    I can't believe that creative are releasing all these softwares instead doing one that contains all these just like Itunes !!! Only for everything !!!!
    ohh c'mon please i'm your fan but when the other side got everything in a cute little simple box i get dissapointed that's all !!!

    Guys i think that you should be realistic , i got a year old laptop and i can't install 4 or 3 software to manage a portable device !!!
    mediasource is almost perfect what it needs is showing album art when is playing a song and in the future integrate the zencast !!! And if you want to show that you not like apple an integration with Ipod !!!
    I'm getting crazy to manage ipod and micro zen i'm actually using 3 or 4 music manager !!!!

  • How do I move all of my apps from one touch to another

    I just bought a new iPod touch and would like to move all of my Apps to the new touch - when I sync the new touch the apps download as if they are new apps.  I have a games that I'd like to transfer with history.

    To restore from backup see the restoring section of:
    iTunes: Backing up, updating, and restoring your iPhone, iPad, or iPod touch software

  • Any way to select all emails for delete with one touch?

    The only time I really need to see emails on my iPhone is when I am away from home. When I am home, and receive a huge number of emails on my iMac, I also receive the same ones on my iPhone.
    I review them on the iMac, and then have to delete them from the iPhone. I go into the account on the iPhone and touch edit, but then have to scroll and check off each one so I can delete them.
    Is there any way to "select all" instead of checking off each one?

    The iPhone's mail client does not synchronize with the incoming mail server for a POP account. The iPhone's mail client is no different in this regard from accessing a POP account with an email client on your computer. You have an option to remove messages from the server when downloaded for a POP account with the iPhone's mail client as is available with an email client used on your computer to access a POP account.
    All server stored mailboxes with an IMAP account are kept synchronized with the server automatically with each email client used to access the account including with the iPhone's mail client. A POP account is not synchronized with the server - not with the iPhone's mail client or with an email client on your computer.

  • I borrowed a hard drive from a friend that contains many thousands of songs. Somehow when tranferring these to iTunes I managed to get several copies of each song. How can i do a bulk delete of all the copies leaving just one version of each song?

    I need help please. I borrowed a hard drive from a friend which contains many thousands of songs. When adding them to my iTunes library I somehow managed to make multiple copies of each song. Is there a way to do a bulk delete of all the duplicates? If I have to go one by one it will take a lifetime.

    I have the same problem. I keep backups on a home server and this is where my library pointed to. I changed it to the local drive and now I have two copies in the library. I need to either bulk delete or clear the library (without deleting the files) and then rebuild. How do I do either of these things?

  • Why does my Ipod Touch 'freeze' when trying to touch it?

    I need to select OK to continue on a download - but the button is unselectable - or screen has frozen.
    I haven't had good luck with the Ipod Touch and am about ready to sell it.  Whenever I use it to run, it always stops on me in the middle of my run - doesn't matter if I'm listening to an album, a recorded station or if I'm directly connected to the internet.  I've only owned this for 6 months and it's been a pain since day 1.

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Restore from backup. See:                                                
    iOS: How to back up                                                                
    - Restore to factory settings/new iOS device.             
    If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
    Apple Retail Store - Genius Bar                                      

  • How can I change my security questions, all of them not just one

    I'm trying to change my security questions but when i recieve the email with the code I can only change one question and when I try to get into my idapple account they ask me for two questions and I dont have both. What can I do.?

    Hi Louiyi,
    Thanks for visiting Apple Support Communities.
    See this article for information about updating your Apple ID information:
    Rescue email address and how to reset Apple ID security questions
    http://support.apple.com/kb/HT5312
    All the best,
    Jeremy

  • I want to set up 'direct replies to' for all my emails(not just one) to reply to another address in Office Professional Plus 2010

    I went to File,  Info,  Account Settings, Account Settings, E-mail tab lists 'Microsoft Exchange Server', if I click on that and go to Change Folder, I get a pop up message advising me not to select this option, if I carry on I get a pop up to
    set up New E-mail delivery location but I cannot do anything here.
    I have also tried the change option but there are no email options here either.
    It is a company set up, just wondering if it's at all possible to do what I want to achieve under these circumstances, any light on this much appreciated.
    Other way around this is to default the 'From to' field to the email address where the replies are always required, can this be done? I know you can select the 'From to' from a list but this should not be necessary.
    Thanks

    Hi,
    According to your description, you'd like to achieve that, all your emails which you would receive will go to find another address.
    If yes, we can depend on Outlook rule or transport rule.
    Outlook rule:
    Transport rule:
    The recipient is(http://technet.microsoft.com/en-us/library/dd638183(v=exchg.150).aspx )
    Redirect the message to(http://technet.microsoft.com/en-us/library/aa998315(v=exchg.150).aspx )
    If I misunderstand your meaning, please feel free to let me know.
    Thanks,
    Angela Shi
    TechNet Community Support

  • Linn kinsky does not show all music folders - only the one which was created with wma but not the flac files wich where created with winamp

    Who can give me advice - do i have to change settings in i pod touch or in the folders from my computer ?

    Linn Kinsky is a app which helps you to control your LINN  audio - streamer
    This Kinsky programm is available for computers and apple products as well.  So the Kinsky programm runs perfectly on my windos computer and after reading articles i decided to purchase a more handy ipod touch to control my audio-streamer instead of using the notebook.
    unfortunately wma files are shown only. Meanwhile i ripped some cds as AIFF because I expected the problem here but nothing has changed.
    Anyway thanks for your answer Matthias

  • I seem to have lost all my photos except the ones I was trying to export. Help?

    i

    Hi Teemack925,
    Can you make sure that you have "All Photographs" selected under "Catalog?"
    It is possible that you have a different batch of photos open on your computer, and you just can't see your other photos.

Maybe you are looking for

  • Configure SSO Connection from SAP Enterprise Portal to BOE Server

    Hi Guys, We recently installed a BOE Server and want to connect it to our SAP Enterprise Portal. What we need is just to display the Crystal Reports via Enterprise Portal. We have set up the following: SAP EP with AD Authentication SAP EP configured

  • How do I upload a new movie onto my iPhone without having to sync it with iTunes?

    I am new to iPhone and all this syncing is so frustrating and time wasting! I am using iTunes on the same computer and every time I want to upload a new movie, video or anything else, iTunes keeps telling me that I am changing libraries and that it w

  • How to put videos back on my ipod

    i put some important videos on my laptop, and whenever i try to put them back on my ipod it works but photo library which imm not bothered about comes up aswell as another folder which i cant delete! it takes up to much memory and i cant do anything

  • How to "hack" a contact to simulate an email received without receiving it

    Hi everyone, This may come off as a weird question, but to explain briefly: in a lead nurturing campaign, contacts are being sent an email every 2-3 weeks, but every time they flow in the program, they pass through the decision rules *received first

  • Why there is no sharing option for Facebook?

    I have tried to find the sharing option for Facebook, Though, Flicker, Twitter, and other platforms are available on Mountain Lion OS X, but why not Facebook. I remember, it was mentioned in video about the demonstratoin for the OS. Please tell me wh