0 Replies Latest reply on Jun 28, 2007 9:17 PM by tag_digital

    Registration point exactly center to symbol

    tag_digital Level 1
      Hi all, I'm working on a game that has a stationary background and a scrolling foreground. The Character moves a percentage distance towards the mouse like this...(see code below)


      It appeared to work fine except I noticed that as you play the game the screen gets off over time. It was driving me nuts and I think I know why. The mouse and the charater are never exactly center. The y coordinate for mouseY is offset to the character y. I tried centering the character in the movie clip but it doesn't seem to work right. Does anyone know how I can make sure the registratoin point is in the center of the character so character.x will center exactly to mouseX and character.y will center exactly to mouseY?

      To complicate I have to force the character to stop short of the top of the screen because of the control panel. The mouse can continue up to the panel so that causes a unsync of mouseY since the user can move the mouse in Y farther than the character is allowed to go. Any suggestions how I can fix this? Thanks