A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: drag and slide

  1. #1
    Senior Member
    Join Date
    Apr 2001
    Posts
    996

    drag and slide

    Anyone know how I would do a drag and slide like you would do on an Ipad. I want when the user drags a page it will drag between the bounds of the viewable area and stop. For example I have a container clip with 10 pages inside it. I want the user to be able to click and drag the content to the right or left. On an Ipad it has some snapping with animation on it or what it seems like. Anyone know how I can achieve this effect.

  2. #2
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    Here is a start:
    PHP Code:
    myClip.addEventListener(MouseEvent.MOUSE_DOWN,md);
    function 
    md(event:MouseEvent):void
    {
        var 
    _target:MovieClip event.currentTarget as MovieClip;
        var 
    rect:Rectangle = new Rectangle(0_target.ystage.stageWidth0);
        
    _target.startDrag(true,rect);

    - The right of the People to create Flash movies shall not be infringed. -

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center