4 Replies Latest reply on Nov 7, 2006 6:05 PM by kglad

    Photo Not Centered

    WebXperience Level 1
      i am creating a simple photo gallery using ActionScript 2's CreateMoveClipLoader. I have a MovieClip instance named myPics_mc which is centered on the stage. the Stage, Moviclip and picture all have the same dimensions. When the mvie is run or published only the upper left hand corner of the picture is display is displayed in the lower left section of the player window. How can I get the entire picture to be centered on the stage?

      Here's the code:
        • 1. Re: Photo Not Centered
          kglad Adobe Community Professional & MVP
          myMCL.onLoadinit=function(targ){
          targ._x=(Stage.width-targ._width)/2
          targ._y=(Stage.height-targ._height)/2
          }
          • 2. Re: Photo Not Centered
            kglad Adobe Community Professional & MVP
            myMCL.onLoadinit=function(targ){
            targ._x=(Stage.width-targ._width)/2
            targ._y=(Stage.height-targ._height)/2
            }
            • 3. Photo Not Centered
              WebXperience Level 1
              I switched to Flash MX 2004 and I've gotten rid of the error message. But now I can't see any of the picture in the movie.
              On the stage I've place a movieclip instance of a movieclip named myPics_mc.
              Below is the actionscript code I'm running.

              ============ THE CODE =============
              var myMCL:MovieClipLoader = new MovieClipLoader;

              // -----------------<Create Listener>---------------- \\

              var mclListener:Object = new Object();
              mclListener.onLoadInit = function(target_mc:MovieClip) {
              target_mc._x = Stage.width/2-target_mc._width/2;
              target_mc._y = Stage.height/2-target_mc._width/2;
              };

              myMCL.addListener(mclListener);
              myMCL.loadClip("assets/jpg/services00.jpg", level0.myPics_mc);

              ]
              • 4. Re: Photo Not Centered
                kglad Adobe Community Professional & MVP
                try: