| 動作バージョン |
2.0 |
|---|---|
| Windows | ○ |
| Macintosh | ○ |
| 解 説 | コンポジション内の全オブジェクトの大きさをランダムにするにはコンポジション内のobjects配列を参照します。このobjects配列にコンポジション内のオブジェクトデータがあるので、「size.x」「size.y」にMath.random()で求めた乱数値を設定します。 |
|---|---|
| コード | Comp = application.currentComposition; len = Comp.objects.length; for (i=0; i<len; i++) { n = Math.random() * 2 + 0.25; Comp.objects[i].size.x *= n; Comp.objects[i].size.y *= n; } |
| ■サンプルスクリプトをダウンロードする >>.zip |