乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      FLASH:fscommand函數(shù)

       滄海九粟 2007-05-24
      fscommand("command", "parameters")
      參數(shù) :
      command 一個(gè)傳遞給宿主應(yīng)用程序用于任何用途的字符串;或者一個(gè)傳遞給獨(dú)立 Flash Player 的命令。
      parameters 一個(gè)傳遞給宿主應(yīng)用程序用于任何用途的字符串;或者一個(gè)傳遞給 Flash Player 的值。

      說(shuō)明
      動(dòng)作:使 Flash 影片能夠與 Flash Player 或承載 Flash Player 的程序(如 Web 瀏覽器)進(jìn)行通訊。還可使用 fscommand 動(dòng)作將消息傳遞給 Macromedia Director,或者傳遞給 Visual Basic、Visual C++ 和其他可承載 ActiveX 控件的程序。
      用法 1 :若要將消息發(fā)送給 Flash Player,必須使用預(yù)定義的命令和參數(shù)。
      用法 2 :若要在 Web 瀏覽器中使用 fscommand 動(dòng)作將消息發(fā)送到腳本撰寫語(yǔ)言(如 JavaScript),可以在 command 和 parameters 參數(shù)中傳遞任意兩個(gè)參數(shù)。這些參數(shù)可以是字符串或表達(dá)式,在“捕捉”或處理 fscommand 動(dòng)作的 JavaScript 函數(shù)中使用這些參數(shù)。在 Web 瀏覽器中,fscommand 動(dòng)作在包含 Flash 影片的 HTML 頁(yè)中調(diào)用 JavaScript 函數(shù) moviename_DoFScommand。moviename 是 Flash Player 影片的名稱,該名稱由 EMBED 標(biāo)簽的 NAME 屬性指定,或由 OBJECT 標(biāo)簽的 ID 屬性指定。如果為 Flash Player 影片分配名稱 myMovie,則調(diào)用的 JavaScript 函數(shù)為 myMovie_DoFScommand。
      用法 3 :fscommand 動(dòng)作可將消息發(fā)送給 Macromedia Director,Lingo 將消息解釋為字符串、事件或可執(zhí)行的 Lingo 代碼。如果該消息為字符串或事件,則必須編寫 Lingo 代碼以便從 fscommand 動(dòng)作接收該消息,并在 Director 中執(zhí)行動(dòng)作。有關(guān)更多信息,請(qǐng)?jiān)L問(wèn)“Director 支持中心”(Director Support Center)。
      用法 4:在 Visual Basic、Visual C++ 和可承載 ActiveX 控件的其他程序中,fscommand 利用可在環(huán)境的編程語(yǔ)言中處理的兩個(gè)字符串發(fā)送 VB 事件。有關(guān)更多信息,請(qǐng)使用關(guān)鍵字 Flash method 搜索 Flash 支持中心 (Flash Support Center)。
      示例
      用法 1 :在下面的示例中,fscommand 動(dòng)作設(shè)置 Flash Player,以便在釋放按鈕時(shí),將影片縮放到整個(gè)顯示器屏幕大小。
      on(release){
              fscommand("fullscreen", true);
      }

      用法 2 :下面的示例使用應(yīng)用到 Flash 中按鈕的 fscommand 動(dòng)作打開 HTML 頁(yè)中的 JavaScript 消息框。消息本身作為 fscommand 參數(shù)發(fā)送到 JavaScript。
      必須將一個(gè)函數(shù)添加到包含 Flash 影片的 HTML 頁(yè)。此函數(shù) myMovie_DoFSCommand 位于 HTML 頁(yè)中,等待 Flash 中的 fscommand 動(dòng)作。當(dāng)在 Flash 中觸發(fā) fscommand 后(例如,當(dāng)用戶按下按鈕時(shí)),command 和 parameter 字符串被傳遞到 myMovie_DoFSCommand 函數(shù)??梢栽?JavaScript 或 VBScript 代碼中以任何需要的方式使用所傳遞的字符串。在此示例中,該函數(shù)包含一個(gè)條件 if 語(yǔ)句,該語(yǔ)句檢查命令字符串是否為“messagebox”。如果是,則 JavaScript 警告框(或“message box”)打開并顯示 parameters 字符串的內(nèi)容。
      function myMovie_DoFSCommand(command, args) {
              if (command == "messagebox") {
                      alert(args);
              }
      }
      在 Flash 文檔中,將 fscommand 動(dòng)作添加到按鈕:
      fscommand("messagebox", "This is a message box called from within Flash.")
      也可以為 fscommand 動(dòng)作和參數(shù)使用表達(dá)式,如下面的示例所示:
      fscommand("messagebox", "Hello, " + name + ", welcome to our Web site!")
      若要測(cè)試影片,請(qǐng)選擇“文件”>“發(fā)布預(yù)覽”>“HTML”。
      如果在 HTML“發(fā)布設(shè)置”中使用具有 FSCommand 模板的 Flash 發(fā)布影片,則自動(dòng)插入 myMovie_DoFSCommand 函數(shù)。 該影片的 NAME 和 ID 屬性將是其文件名。例如,對(duì)于文件 myMovie.fla,該屬性將設(shè)置為 myMovie。

        本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購(gòu)買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊一鍵舉報(bào)。
        轉(zhuǎn)藏 分享 獻(xiàn)花(0

        0條評(píng)論

        發(fā)表

        請(qǐng)遵守用戶 評(píng)論公約

        類似文章 更多