Friday, July 11, 2008
AE / distance(the loc of grc "blue",the loc of grc "Red")
ふたつのオブジェクトのロケーションの距離を、ピクセルで返します。
-- カード内のスクリプト
on mouseMove
put distance(the loc of grc "blue",the loc of grc "red") into fld "blueRed"
put distance(the loc of grc "blue",the loc of grc "green") into fld "bluegreen"
put distance(the loc of grc "green",the loc of grc "red") into fld "greenRed"
pass mouseMove
end mouseMove
-- それぞれのグラフィック内のスクリプト
on mouseDown
grab me
end mouseDown
始めにAnimation Engineを開いて、start using stack "animationEngine"
サンプルスタックは、下記をメッセージボックスにコピペしてリターンキーを
go stack url "http://homepage.mac.com/kenjikojima/jrevnote/distance.rev"