2 Replies Latest reply on Jan 9, 2008 7:55 PM by wing3098

    help centering pictures on a slide show

      I'm trying to build a slide show where I can load external jpgs of varying sizes into my movie and have them centered. I'm trying to center the pictures by loading them into a "holder" mc in flash, then changing the x and y coordinates by loading the width of each picture into action script from an external text file. I'm trying to use the same technique I learned from my HOT Beyond the Basics book from lynda.com but it doesn't seem to be working. This is what my action script looks like:


      var picWidth1:LoadVars = new LoadVars();

      holder_1._x = Stage.width/2 - (Number(picWidth1.pictureWidth) / 2);
      holder_1._y = 0;

      the img01width.txt looks like:


      I can't figure out why the x coordinate isn't changing, if you have any insight or any suggestions for other ways to center a picture in a slide show I'd greatly appreciate it. Thanks