# Ipad scrolling menu problem

**URL:** <https://forum.kirupa.com/t/ipad-scrolling-menu-problem/323148>\
**Category:** Uncategorized\
**Created:** [June 19, 2011, 12:49am UTC](https://forum.kirupa.com/t/ipad-scrolling-menu-problem/323148 "2011-06-19T00:49:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![icekomo](https://avatars.discourse-cdn.com/v4/letter/i/bcef8e/32.png) [@icekomo](https://forum.kirupa.com/u/icekomo)\
**Post date:** [June 19, 2011, 12:49am UTC](https://forum.kirupa.com/t/ipad-scrolling-menu-problem/323148/1 "2011-06-19T00:49:53Z")

</div>

I have posted this in the AS3 section but thought someone might know here.  
I am building an ipad app using flash cs5.5 and As3. I have a menu that I want to be able to scroll with my finger. This is the code I have thus far, and it sort works. The problem seems to be that the movieClip being scrolled, jumps to where my finger is. Any help would be grateful!

I’m not 100% sure I have the right formula to make this work.

my code:  
home.homeContent.addEventListener(TouchEvent.TOUCH \_BEGIN , onTouch);

private function onTouch(event:TouchEvent):void  
{  
localYTxt.text = String("localY "+ event.localY);  
stageYTxt.text = String("stageY "+ event.stageY);  
touchPointTxt.text = String("touchPointID "+ event.touchPointID);  
//move  
home.homeContent.addEventListener(TouchEvent.TOUCH \_MOVE, onTouchMove);  
//end  
home.homeContent.addEventListener(TouchEvent.TOUCH \_END , onTouchEnd);  
}  
private function onTouchMove(event:TouchEvent):void  
{  
touchMoveTxt.text = String("stageY "+ event.stageY);  
home.homeContent.y+= (event.localY-home.homeContent.y)/3;  
}  
private function onTouchEnd(event:TouchEvent):void  
{  
localYEndTxt.text = String("localY "+ event.localY);  
stageYEndTxt.text = String("stageY "+ event.stageY);  
touchPointEndTxt.text = String("touchPointID "+ event.touchPointID);  
home.homeContent.removeEventListener(TouchEvent.TO UCH\_MOVE, onTouchMove);  
home.homeContent.endEventListener(TouchEvent.TOUCH \_END , onTouchEnd);

}
