0 Replies Latest reply on Feb 8, 2010 4:37 PM by TheEricBraun

    Camera Following A Certain Object

    TheEricBraun Level 1

      Hey, i've been trying for a while to be able to get the camera to follow a certain object or character

      with movement actionscript.

       

      onClipEvent(load){
      speed=7;
      }
      onClipEvent(enterFrame){
      if(Key.isDown(key.RIGHT)){
        _x+=speed;
      }
      if(Key.isDown(key.LEFT)){
        _x-=speed;
      }
      if(Key.isDown(key.DOWN)){
        _y+=speed;
      }
      if(Key.isDown(key.UP)){
        _y-=speed;
      }

      }

       

      Now how do i get it so when this character moves to a certain point the camera continues and just doesnt go off the stage?