To counteract this I've written and rewritten a double function which resizes your clip based on the visible area rather than what flash considers the bounds. Here it comes...
//Returns width or height you need to use to resize an MC containing a mask.
//include visibleOrigSize if you know it to cut down on processing power
function maskCompensate(mc:MovieClip, prop:String, desiredSize:Number, visibleOrigSize:Number){
var oX=mc._xscale;
var oY=mc._yscale;
mc._xscale=mc._yscale=100
if(visibleOrigSize==undefined){
var visibleOrigSize=(prop=="_width" ? getVisibleBounds(mc).width : getVisibleBounds(mc).height)
}
var diff = mc[prop]-visibleOrigSize
var percentIncrease = desiredSize/visibleOrigSize
mc._xscale=oX
mc._yscale=oY
return(desiredSize+diff*percentIncrease)
}
import flash.display.BitmapData;
function getVisibleBounds(mc){
var myBitmapData:BitmapData = new BitmapData(mc._width,mc._height);
myBitmapData.draw(mc);
bounds = myBitmapData.getColorBoundsRect( 0xFFFFFFFF, 0xFFFFFFFF, false );
bitmapData.dispose();
return(bounds)
}
//sample usage:
this._width = maskCompensate(this,"_width",500)
this._height = maskCompensate(this,"_height",300)
3 comments:
kd 9 shoes
fitflops
ralph lauren pas cher
ugg boots
longchamp outlet
red bottoms
louboutin uk
rolex watches uk
adidas yeezy
coach factory outlet
20161228caiyan
20180623xiaoke
christian louboutin
oakley sunglasses wholesale
kd 10 elite
ray ban sunglasses outlet
pandora charms
true religion jeans sale
ralph lauren outlet
canada goose jackets
ugg boots on sale
chloe sunglassess
A fully updated list of all important Cheats for The Sims 4, including its Expansion and Game Packs-Sims 4 cheats.
Post a Comment