A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Sliding across

  1. #1
    Member
    Join Date
    Jul 2009
    Posts
    42

    Sliding across

    Hi guys

    Recently went on a flash course and i want to keep picking up skills! A new client of mine likes the idea behind this site!

    http://www.houseofholland.co.uk/ , then click on catwalk!

    I understand that it will be one big image! But how do you make it slide across like that? Any links or code would be great

    Thanks

    Jake

  2. #2
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244

  3. #3
    Member
    Join Date
    Jul 2009
    Posts
    42
    Sorry to sound dumb but that seemed quite confusing that link!

    Im pretty new to flash so a diluted answer would be great! How about i change my question a little! How do i set restrictions on where you can drag an object!

    i.e. how do i stop people being able to drag upwards?

    Also, how do i add ease when they let go of the drag?

    Thanks

    Jake

  4. #4
    Junior Member
    Join Date
    Feb 2010
    Posts
    23
    create a new rectangle (flash.geom.rect) and set it's height to 0, use it as the bounds for the startDrag() function. People will only be able to drag within the rectangle so with a height of 0 they won't be able to drag up. Sorry for only answering the simple question, but i'm kind of lazy today

    var rect:Rectangle = new Rectangle(0,0,width,0);
    mc.startDrag(false, rect);
    Last edited by random101187; 03-18-2010 at 04:56 AM. Reason: clarity

  5. #5
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    I thought you wanted to slide across as you stated in your first post. Best bet is to use a tweening engine like TweenMax

  6. #6
    Member
    Join Date
    Jul 2009
    Posts
    42
    what are these tweening engines? And how do you apply them

    Jake

  7. #7
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    Well look again at the greensock one, pretty simple to use really.

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