3 Replies Latest reply on Dec 15, 2006 6:17 AM by ankhcomm

    How can I check the locV of a sprite on every frame?

    ankhcomm Level 1
      I'd like to know how can I tell Director, in Lingo, to check the position of a sprite in every frame in order to use that position to set the value of a global variable. I want to avoid having an on enterFrame script on every frame as I will need to do this with various sprites all the time. I tried an on enterFrame movie script but when I check the value of the variable with the message window it's always 1 (I initialized the variable with that value), regardless of wether the condition is being met on that specific frame or not. I also placed an on enterFrame script on the sprite and it would not work either. According to the documentation, on beginSprite only works if the sprite was not on the stage previous, and this sprite will always be on the stage, just in a different locV when I need it to be.

      Any suggestions please?