flash site

Discussion in 'Web Design and Development' started by ambient, Jun 25, 2007.

  1. ambient macrumors member

    Apr 21, 2007
    Hi, just want to pick the brains of you flash pros out there.... Interested in doing something similar to this site.. www.72.com.au/.. just wondering about the navigation - im guessing it is a MovieClip controlled by the scrollRect command in Actionscript.. How would i also achieve the easing effect ie. how it slows down and eases into the final page.

    Anyway, if anyone could point me in the direction of a tutorial or even confirm what actioncript commands would be the best to use I would be very much greatful (i havnt been able to find any similar tutorials on the internet).
  2. angelneo macrumors 68000

    Jun 13, 2004
    Ease in effect is simple, every time when you increment the x or y coordinates, just add/subtract based on the difference between the destination x or y coordinates. something like this:

    currentX = currentX + (destinationX-currentX)/rate_of_increment;

    You might want to add in a limiting factor to stop the equation from going on infinitely (depends on your initial and rate values).
  3. ambient thread starter macrumors member

    Apr 21, 2007
    Ok thanks for that... lifesaver.. Do you think using scrollRect is the best way to scroll the MovieClip?? you know of any other ways?
  4. ambient thread starter macrumors member

    Apr 21, 2007
    dont worry about me.. i got it sorted.. using basic AS duuh ahah
  5. yagran macrumors 6502a

    Jan 8, 2007
    Brighton, East Sussex, UK
    it seems you have this sorted now, but i was going to say that there are built in easing functions in motion tween...

    import mx.transitions.Tween;
    import mx.transitions.easing.*;
    var tw:Tween = new Tween(movieClip,"_y",Strong.easeOut,movieClip._y,NewPositon,NoOfSeconds,true);
    like that i think? youd need to double check syntax as thats off the top of my head...

    edit* forgot to say that this is of course AS2...

Share This Page