2007/04/28 | [原创]Flash直接使用外部Javascript
类别(Flash及RIA) | 评论(0) | 阅读(191) | 发表于 15:39

import flash.external.ExternalInterface;

System.useCodepage = false;

btn.onRelease = function() {

         var lv:LoadVars = new LoadVars();

         lv.onData = function(src:String) {

                   ExternalInterface.call(src);

                   ExternalInterface.call("jsFunction()");

                   ExternalInterface.call("alert('ezzz.5dblog.com')");

         };

         lv.load("http://www.yourdomain.com/javascript.js");

};
_root.stop();

0

评论Comments