1 Reply Latest reply on Jun 6, 2006 3:23 AM by Shixy

    loading different swf files with different resolutions in a constat height and width

    bhavanishankar
      i have some swf files with different resolutions of 800X600,1024X800 etc.,
      i want these swf files to be loaded dynamically in a flash movie but their width and height should be of constant one.

      can any one help me in this?

      bhavani
        • 1. Re: loading different swf files with different resolutions in a constat height and width
          Shixy
          Yes, you can use the onClipEvent(data) event to catch the moment when your swf was completely downloaded. And then you have the _width and _height of that movieclip set to exactly what your loaded swf sizes were.
          Do something like this:
          onClipEvent(data){
          // for example if you need it to be always 800x600
          var must_be_width = 800;
          var mul_val = this._width/must_be_width;
          this._width /= mul_val;
          this._height /= mul_val;
          // now your movie has the width 800 with proportional height (600) -
          // no matter what the original size was.
          }