2007年8月31日金曜日

[director][actionscript] actionscriptからlingoへ通知する

・actionscript

I/F用オブジェクトクラスに通知用の関数を宣言。

var myInterface:Object = new Object();

myInterface.xNotify();

・lingo

swfファイルをステージに配置し、ビヘイビアスクリプト内で上記変数を取得する。

poInterface = me.getVariable(“myInterface”, false)自身の関数に対してsetCallback()でnotify()を結びつける。

me.setCallback(poInterface, "xNotify", #notify, me)

on notify(me, oInterface, arg)

put "actionscriptからの通知"

end notify

0 件のコメント: