2 Replies Latest reply on Mar 3, 2008 1:08 PM by Scotty T.H.

    Changing sprite numbers

    Scotty T.H.
      Hi there,
      I'm trying to set up a movie which can draw lines between points (sprites) that a user clicks on. The first point p1 and the second p2. Basically it's "Join the Dots" but it has to allow for the user to draw to any dot.
      I'm working on the theory that the last sprite clicked on becomes the starting point for the next line ... and so on.

      I'm recording the previous point's spriteNum as text in a cast member to be recalled for the next line draw starting point e.g.

      x = member("spriteRef").text -- where "x" is the previous points spriteNum
      p1 = sprite(x).loc
      p2 = sprite(spriteNum).loc
      member("spriteRef").text = string(spriteNum) -- this becomes the new "x"

      however inserting "x" for a spriteNum doesn't work. Is there a way of achieving the same thing?