Skip to main content
Known Participant
December 5, 2011
Answered

Resize a moviclip to a Stage Size

  • December 5, 2011
  • 1 reply
  • 1158 views

People have a problem, how can I do to resize the size of my movieClip and the content of my movieClip(swf, jpg) to the stage?

Tanks

This topic has been closed for replies.
Correct answer kglad

use a Stage onResize listener:

Stage.scaleMode = "noScale"

var lo:Object={};

lo.onResize=function(){

yourmovieclip.width=Stage.width;

yourmovieclip.height=Stage.height;

}

Stage.addListener(lo);

1 reply

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
December 5, 2011

use a Stage onResize listener:

Stage.scaleMode = "noScale"

var lo:Object={};

lo.onResize=function(){

yourmovieclip.width=Stage.width;

yourmovieclip.height=Stage.height;

}

Stage.addListener(lo);

armandixAuthor
Known Participant
December 6, 2011

Kglad,

Thanks for your help!

But there is a problem, if I create a clip to load the image, the image into the movieclip it will not resize to.

kglad
Community Expert
Community Expert
December 6, 2011

after loading is complete (ie, use a preloader), you can resize the load-target movieclip.