3 Replies Latest reply on Aug 25, 2007 7:54 AM by Damon Edwards

    Finding the width of a JPEG loaded into a movie clip

      I will be loading a page of bio information. Next to the person's photo (photos will vary in width) I want to put a column of buttons about 20 pixels to the right of the photo. So after I load the photo into an empty movie clip, I'm trying to get the width of the photo in order to figure out the x position of the buttons next to it. Here is what I have:

      myImage = "images/" + _level0.images[link];
      // JPEG loads okay into image_mc //

      trace("image_mc._x = " + image_mc._x);
      // I get "Image_mc._x = 393" as expected //

      trace("myImage._width = " + myImage._width);
      // I get "image_mc._width = undefined" //

      trace("image_mc._width = " + image_mc._width);
      // I get "image_mc._width = 0" //

      How do I find the width of the loaded JPEG?