Jump to content
  • 0
Sign in to follow this  
Followers 0

how to? Apple slider

Question

Posted

I just stumbled accross the apple page for the iPad case and they have this cool animation where you click and drag and the case rolls off and under the iPad.

Looking at the source, each frame of the animation is a different picture.

How have they done this? Its very cool and backward compatible.

edIt:
Forgot link :laugh: http://www.apple.com/ipad/accessories/

Share this post


Link to post
Share on other sites

2 answers to this question

  • 0

Posted

Hmmmm...

On drag, get left co-ord of mouse from left of container.

Say this goes from 0 to 150, have 150 images in a strip. Set the offset vertically to the value of the co-ord?

Edit: I see they are doing it with individual images. So load image + "x value" + .jpg

Share this post


Link to post
Share on other sites
  • 0

Posted

I thought they were perhaps using separate PNGs for the cover and iPad in order to achieve transparency, so was wondering about the network overhead/filesize for each frame.

However, now I realise that JPEGs are being used, allowing the faster load time.

Quite a cool effect, although wouldn't a sprite file have been a better choice instead of individual frames?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.