A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Actionscript

  1. #1
    Junior Member
    Join Date
    Nov 2009
    Posts
    2

    Actionscript

    I am trying to move a movie 222 pixels in each direction ... I am using the code below on each button.

    on(release) {
    var t:Number = img1_mc._x;
    new mx.transitions.Tween(img1_mc, "_x", mx.transitions.easing. Elastic.easeOut, t, -222, 8, true);
    }


    One is negative and the other positive. Once I click on it, it moves 222 pixels and will not move again. Any thoughts ? I would also like to quicken up the transition a little ... are there other options beside elastic ?

    Cheers, Mark

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    Hi I think you should go read about the Tween Class in the liveDocs (link in m footer)
    For example here's the page on the easing methods:
    http://help.adobe.com/en_US/AS2LCR/F...48.html#151549

    There is also Caurina Tweener, amomgst other lighter tweening engines, that works well and offer different options:
    http://hosted.zeh.com.br/tweener/docs/en-us/

    gparis

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