A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Mathematics

  1. #1
    Member
    Join Date
    May 2004
    Posts
    47

    Mathematics

    Hi

    I have this preloader where I get the percentage loaded 0-100%
    In this preloader, I want to move a clip _x cordinates

    How do I do the math based on the percentage, so the clip moves
    from x=-88( start 0%) to x=50( complete 100%)

    hope any heads brighter than me can help me with this

    best regards,
    T

  2. #2
    ever learning
    Join Date
    Sep 2001
    Location
    New Zealand
    Posts
    39
    code:

    // preloadPerc is your percentage of the loaded movie.
    //you then times it by the 1.38 (88+50 / 100) and add that to your start _x position.

    startPos = -88;
    distanceToMove = (88 + 50)/100;

    movieClip._x = startPos + (preloadPerc * distanceToMove);



    or something along those lines!
    Last edited by Peteeni; 09-01-2004 at 08:59 PM.

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