4 Replies Latest reply on Apr 24, 2007 5:09 PM by jclegs

    Changing sprite depending on mouse location?

    jclegs Level 1
      Hi

      I'm trying to change a sprites member according to the location of the mouse but so far can only get it to change once.
      So far i've got:

      on exitFrame me

      if the mouseH < 0 then
      sprite(8).member = member("cannon_test_30left")
      end if

      if the mouseH > 1 && the mouseH < 256 then
      sprite(8).member = member("cannon_test_20left")
      end if

      if the mouseH > 257 && the mouseH < 384 then
      sprite(8).member = member("cannon_test_10left")
      end if

      end

      Any help would be appreciated as I can only get it to change once when it goes passed horizontal position 384 and then says that way.
      Thanks