1 Reply Latest reply on Dec 13, 2007 7:09 AM by robdillon

    Stop Auto placing image in top left corner of stage

    Dan_morley
      Can anyone help, I am loading a logo onto the stage using a button, the command is as follows

      I have managed to call in an image from the image folder using a button, however it is placed in the top left hand corner.

      Button 1 uses:
      on (release) {
      loadMovie("images\\logo1.jpg", 1);
      unloadMovieNum(2)
      }

      I want to make it so when i press the button using the As above the image is in the centre of the screen
      stage size is 800x600

      ANY IDEAS GUYS
        • 1. Re: Stop Auto placing image in top left corner of stage
          robdillon Most Valuable Participant
          Flash will place any new loaded content into the upper left corner, point (0,0), if you don't give it a location. The simplest solution is to use a movieClip.

          1. Create a new movieClip in the Library. Don't give it any content.
          2. Drag an instance of this empty movieClip onto the stage at the location where you want the loaded content to show.
          3. Name the instance of this empty movieClip.
          4. Load in the new content to this clip: clipName.loadMovie("images\\logo1.jpg");
          5. Adjust the position of the empty clip on the stage as needed.