Posted on 8 月 11th, 2009 by kude
FlexのPrintJobでオブジェクトを印刷するとき、印刷するオブジェクトの透明部分にはアプリケーションの背景色が適用されます。
これを白くしたい場合は、プロジェクトのプロパティより、「追加コンパイラ引数」に
-default-background-color=0xffffff
を指定すると良いです。
スタイルの背景色では設定できない点に注意。
Filed under: Flash/AIR/Flex, メモ | No Comments »
Posted on 7 月 26th, 2009 by kude
自分用メモです。
Spriteを、その真ん中を中心にして回転させたいとき。
いろいろやり方はあるだろうけど、回転の前後でgetBoundsの中心が一致するように、Spriteを移動させてやるのが簡単でいいのではないかな。
var rect0:Rectangle = getBounds(parent);
rotation = value;
var rect1:Rectangle = getBounds(parent);
x -= rect1.x - rect0.x + (rect1.width - rect0.width) / 2;
y -= rect1.y - rect0.y + (rect1.height - rect0.height) / 2;
Filed under: Flash/AIR/Flex, メモ | No Comments »