How do you resize a movieclip without affecting the scale?
I have a movie clip object w开发者_如何转开发ith a width of 306 and height of 194. I need to change the dimensions of the movie clip and still have the x and y scale set at 100. Currently when I change the movie clip width to 352.8, the x scale increases to 115.3%. I have to have the scale reset to 100% after I've adjusted the movie clip's width. Is there a way to do this in CS3? (this is all in design mode, not run time). Do I need to delete the movie clip and recreate it?
You would need to set a movieclip in your movieclip to the new size. For instance a background movieclip (with alpha to 0 if you don't want to see it). The parent movieclip will take the size of its children or what is drawn in it.
Perhaps there is a more proper way to do this, but you could resize a container inside your movieclip to the size you want.
...
Constructor() {
this.container = new Sprite();
addChild(container);
}
override public function set width(value:Number):void{
container.width = value;
}
override public function set height(value:Number):void{
container.height = value;
}
...
精彩评论