1 Reply Latest reply on May 18, 2010 7:21 AM by kglad

    Why I cann't control this mc's size


      Hey Everyone,


      What I did was simple: I loaded a swf into an empty MovieClip,

      ActionScript Code:

      mc_BG_Container._x = 4;
      mc_BG_Container._y = 5;


      background.swf's stage was set up with 300X200 aspect-ratio, but it was further larger than that size when I tested it. Could someone kindly tell me why?




      Beside from that, I found I couldn't operate on  mc_BG_Container's width and height, if I append this piece of code:



      ActionScript Code:
      mc_BG_Container._width = Stage.width - 426;


      the mc_BG_Container will not show up. Why is that?



      Thanks a lot.

        • 1. Re: Why I cann't control this mc's size
          kglad Adobe Community Professional & MVP

          if mc_BG_Container is a movieclip that's undergone no transformations, your swf will load at its native size.  if you change the target's scale, you'll have problems.


          it's usually best to create a new empty movieclip to use for an as2 load-target.


          then, if you want to resize from the native size, you must wait until loading is complete before transforming the load-target.  (then don't re-use it for another load-target or you'll run into the problem mentioned in the first paragraph.)