在AS3中撰寫javascript(當然也可以用ExternalInterface.call呼叫HTML中的Javascript)

var temp:String ='javascript:$("#container3").animate({"top":"+=620px"},"slow");$("#extradiv1").height(620);void(0)';//void(0)必加,以防回傳javascript執行的結果
function openfun(e:Event):void {
    gotoAndPlay("open");
    e.target.removeEventListener(MouseEvent.ROLL_OUT,outfun);
    e.target.removeEventListener(MouseEvent.ROLL_OVER,overfun);
    //ExternalInterface.call("clickopen");
    navigateToURL(new URLRequest(temp),"_self")//*以字串撰寫
};

arrow
arrow
    全站熱搜

    陳阿全 發表在 痞客邦 留言(0) 人氣()