天天看點

flash與javascript通訊 SecurityError

需将SWF加入到信任目錄:

Windows:C:\windows\system32\Macromed\Flash\FlashPlayerTrust\ Mac:/Library/Application Support/Macromedia/FlashPlayerTrust/ Linux: /etc/adobe/FlashPlayerTurst/

為避免發生沖突,應為每個信任配置檔案指定一個與安裝應用程式相應的檔案名,并且使用 .cfg 檔案擴充名。 每個檔案均列出受信任的路徑,一個路徑占一行。每個路徑可以是單個的 SWF 檔案、HTML 檔案,也可以是目錄。 注釋行以 #号開頭。 例如,包含以下文本的 Flash Player 信任配置檔案表示将向指定目錄及所有子目錄中的所有檔案授予受信任狀态: # Trust files in the following directories:  C:\Documents and Settings\All Users\Documents\SampleApp 信任配置檔案中列出的路徑應始終是本地路徑或 SMB 網絡路徑。信任配置檔案中的任何 HTTP 路徑均會被忽略;隻能信任本地檔案。

繼續閱讀