# Help please! Anyone know how to do multi-touch coding?

**URL:** <https://forum.kirupa.com/t/help-please-anyone-know-how-to-do-multi-touch-coding/320147>\
**Category:** flash\
**Created:** [March 15, 2011, 10:51am UTC](https://forum.kirupa.com/t/help-please-anyone-know-how-to-do-multi-touch-coding/320147 "2011-03-15T10:51:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![LoveTheresa](https://avatars.discourse-cdn.com/v4/letter/l/aeb1de/32.png) [@LoveTheresa](https://forum.kirupa.com/u/LoveTheresa)\
**Post date:** [March 15, 2011, 10:51am UTC](https://forum.kirupa.com/t/help-please-anyone-know-how-to-do-multi-touch-coding/320147/1 "2011-03-15T10:51:41Z")

</div>

```php

private function thumb_dragStart(e:TouchEvent):void
        {
            
                StartstageX = mouseX;
                prevX = mouseX;
                addEventListener(Event.ENTER_FRAME,checkMouseDir);
                addEventListener(TouchEvent.MOUSE_UP, dragStop);
            

            function checkMouseDir(e:Event):void
            {
    
                curX = e.currentTarget.mouseX;
                trace(e.currentTarget.mouseX);
                if (e.currentTarget.mouseX < 0)
                {
                    removeEventListener(Event.ENTER_FRAME,checkMouseDir);
                }
                if (e.currentTarget.mouseX > 1024)
                {
                    removeEventListener(Event.ENTER_FRAME,checkMouseDir);
                }
                if (e.currentTarget.mouseY < 0)
                {
                    removeEventListener(Event.ENTER_FRAME,checkMouseDir);
                }
                if (e.currentTarget.mouseY > 600)
                {
                    removeEventListener(Event.ENTER_FRAME,checkMouseDir);
                }
                
                    if (prevX > curX)
                    {
                        if(coordinate_NO > 0)
                        {
                            //left//
                            coordinate_NO = coordinate_NO - 0.02;
                            Tweener.addTween(photoContainer,{x:(coordinate_NO*(photoContainer.width-thumb_holder.width)),time:1});
                            scroll_BAR.x = coordinate_NO*maxScroll;
                        }
                    }
                    else if (prevX < curX) 
                    {
                        if(coordinate_NO < 1)
                        {
                            coordinate_NO = coordinate_NO + 0.02;
                            Tweener.addTween(photoContainer,{x:(coordinate_NO*(photoContainer.width-thumb_holder.width)),time:1});
                            scroll_BAR.x = coordinate_NO*maxScroll;
                        
                        }
                    } 
                prevX = curX;
                
                
    
            }

            function dragStop(e:TouchEvent)
            {
                removeEventListener(Event.ENTER_FRAME,checkMouseDir);
            }
            
            
            
        }

```

I’m trying to use the ENTER\_FRAME to update the coordinate of my mouse when the mouse click is DOWN… but when i extend to touch, the enter frame doesn’t seems to work, because my mouse is no more on that stage, the enter frame cannot locate the movement of my mouse on the SimTouch neither on CCV…

can anyone tell me what other method i should use so that i can check the coordinate of my mouse’s or finger’s movement on the flash platform???
