Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Text Touch Scroll for mobile app?

New Here ,
Sep 14, 2011 Sep 14, 2011

I have started developing a simple iphone app in flash CS5
In that app there is a bulk of text in ABOUT US section which need touch scrolling.right now i have added scroll bar.But i want to make the text touch scroll able..Since i will be using it in Iphone.

photo.jpg

Help me out..

TOPICS
ActionScript
2.0K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Sep 14, 2011 Sep 14, 2011
LATEST

Place your text inside of a movieclip, and give it a instace of dragMe, then paste this code into your timeline (or edit it if your using a class).

var ease:int = 6; var targY:int = dragMe.y; var drag:Boolean = false; var ptY:Number = 0; dragMe.addEventListener(Event.ENTER_FRAME, dragHandler, false, 0, true); dragMe.addEventListener(MouseEvent.MOUSE_DOWN, downHandler, false, 0, true); stage.addEventListener(MouseEvent.MOUSE_UP, upHandler, false, 0, true); function dragHandler(e:Event):void {      if (drag)      {           targY = mouseY + ptY;      }      e.target.y +=  (targY - e.currentTarget.y) / ease; } function upHandler(event:MouseEvent):void {      drag = false; } function downHandler(e:MouseEvent):void {      ptY = e.currentTarget.y - mouseY;      drag = true; }

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines