2 Replies Latest reply on Jan 10, 2009 7:40 AM by robdillon

    Scale Loader by Math formula

    W_Bell Level 1
      I want to scale a Loader component by tweening but that is not possible so I found a way to do this.

      Looking for a Math or science wizard to help with formula.

      Please read below.
        • 1. Re: Scale Loader by Tween
          W_Bell Level 1
          Well since this is not possible, or is it?
          It can be done with math if I could figure a good method.
          Any math wizards out there?

          320mode:
          myLoader.setSize(320,213);
          myLoader._x = 433.45;
          myLoader._y = 365.3;

          to

          399mode:
          myLoader.setSize(399,266);
          myLoader._x = 353.85;
          myLoader._y = 312.9;

          (both 320&399 one button)

          then to

          720mode:
          myLoader.setSize(720,480);
          myLoader._x = 33;
          myLoader._y = 98.9;

          (720 and back to either 399 or 320 would be one button)

          Currently I have the logic coded for this now and just want to
          spicy up the site and give it some dynamics without rebuilding
          it with tweens since it uses AS2 components.

          Logic:
          I could use the modes as calls. The trick would to go back and forth
          in increments of 10 or less. Coming back from 720mode would mean
          knowing where you last left (320 or 399) as I would launch 720mode
          with a eperate button. Both 320mode and 399mode are toggled on another button.

          The code may run fast enough to simulate tweening and if the math used < & > with
          the target parameters of 320, 399 & 720 it may be possible. Anyways, it would be a great
          excercise and possibly usefull in other ways.

          Please let me know if anyone is interested in this part of the project.
          Thank you.

          W Bell
          • 2. Re: Scale Loader by Math formula
            robdillon Most Valuable Participant
            Look in the online help for Loader.bytesLoaded . There is some example code that will show you how to do what you want to accomplish.