Skip to main content
AttaBoy2
Inspiring
August 13, 2010
Question

constrain size of loaded swf

  • August 13, 2010
  • 2 replies
  • 584 views

I have a MC on stage with instance name of holder.

I load a swf into holder. I want the swf which is bigger than holder to have the same height and width as holder.

var myLoader:MovieClipLoader = new MovieClipLoader();
myLoader.loadClip("contact.swf", holder);

This topic has been closed for replies.

2 replies

Ned Murphy
Legend
August 13, 2010

Another option would be to make the holder the same size as the file you'll be loading and scale it down to the size you want it to appear as.  When the file is loaded into it, it will be scaled per the holder.

Ned Murphy
Legend
August 13, 2010

You'll need to assign a listener to the MovieClipLoader and wait for the swf to load.  Once it has loaded you can set its dimensions as you like.  Look in the help documents for the MovieClipLoader.addListener method... there is an example there that should help.