2 Replies Latest reply on Jan 9, 2008 12:50 PM by dbwalton

    Resizing jpeg inside a movie clip

    dbwalton

      I have a movie clip on my stage names "t".
      Inside "t" there is a movie clip named "pic".
      Both t and pic are 80x80 px.

      Here is what I am doing in my action script:

      var t = tn_group.tn.duplicateMovieClip("tn"+i, i);
      t.pic.loadMovie(folder+photo_thumbnail );
      if (t.pic._width gt t.pic._height) {
      ScaleRatio = 80/t.pic._width;
      } else {
      ScaleRatio = 80/t.pic._height;
      }
      t.pic._xscale = ScaleRatio*100;
      t.pic._yscale = ScaleRatio*100;

      The problem is, the t.pic._height & _width always are 80, and not what my jpegs are.

      How do I get the actual size of my jpeg? I've tried t._height & _width, and lots of other contortions and nothing seems to return the actual size of my jpeg.

      Any one know what I'm missing?

      Brent Text