1 Reply Latest reply on Mar 29, 2008 7:04 AM by bryanmcdonald

    word scrambler script

    Level 7
      I have been trying to figure out how to do something and I am getting no
      where. I pick students of the month for the classes I teach and was looking
      for a kind of fun way to announce them. I had an idea in mind but couldn't
      get it to work out without spending a lot of time and was wondering if I am
      reinventing the wheel and there isn't something already out there I could
      use.

      I would like the first scene to say 'The student of the month for <insert
      month here> is' and in the next scene, students see a bunch of letters
      flying around wildly. After several seconds of letter flying (they always
      have fun trying to guess who it is), the letters fall into place to show the
      person's name. I had started making a movie clip for each letter, but that
      would take me a while each month to make letters for the new names.

      Hopefully, there is an easier way to do this? Thanks.


        • 1. Re: word scrambler script
          bryanmcdonald
          check out the unscrambling title routines in iMovie HD.

          if you want to keep it flash based, here is what i'd do: use action script based on an array containing the name. the algorithm would be generic and the only thing changing from name to name would be the length of the name (which action script can tell you).

          for i = 1 to length_of_name
          place name(i) at a random x and y value
          next

          one could clear the screen here and repeat the above a few times (with a small pause to fade the alpha in and out if you want)

          or start bouncining each letter around (i.e. randomly assign a different delta_x and delta_y (say between -5 to 5) add the deltas to each x, y position and check if you have hit an edge (if you have, multiply the delta by -1 to make the letter bounce off the wall)).

          once you are bored of the above, do a routine to clear the screen and print in the middle (or for each x, y value of the character, add or subtract a small delta to have the character eventually drift to it's final position)

          have fun!