ステージに配置された 2 つの要素の位置を入れ替える JSFL


ステージに配置された 2 つの要素の位置を入れ替える JSFL を書いた。

var selection = fl.getDocumentDOM().selection;
if (selection.length === 2) {
var temp = {};
temp.x = selection[0].x;
temp.y = selection[0].y;
selection[0].x = selection[1].x;
selection[0].y = selection[1].y;
selection[1].x = temp.x;
selection[1].y = temp.y;
}

同一レイヤ上且つ、同一サイズの画像同士の位置替えが楽になると思う。

カテゴリー: Flash, JSFL   パーマリンク

コメントをどうぞ

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

*

次のHTML タグと属性が使えます: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>