前天重灌完電腦後發現發卡布洛中有使用 syntaxhighlighter 的程式碼都不能複製了,因為重灌之前我也是用 FireFox 3.0.6 版的,應該不是版本的問題,最後在 google 上搜到了一個討論串才得知,原來 Flash 10 修正了這個 bug了:

(其實看看討論時間我已lag了一段不短的時間了…)

The "clipboard.swf" flash file (flashcopier) no longer works with Flash 10 due to new security.It still works with Internet Explorer because it uses "window.clipboardData" instead of the flash file.

原始網頁連結:http://code.google.com/p/syntaxhighlighter/issues/detail?id=95

然後這是官方的說明:

Setting data on the system Clipboard requires user interaction
In Flash Player 9, ActionScript could set data on the system Clipboard at any time. With Flash Player 10, the System.setClipboard() method may be successfully called only through ActionScript that originates from user interaction. This includes actions such as clicking the mouse or using the keyboard. This user interaction requirement also applies to the new ActionScript 3.0 Clipboard.generalClipboard.setData() and Clipboard.generalClipboard.setDataHandler() methods.


What is impacted?
This change can potentially affect any SWF file that makes use of the System.setClipboard() method. This change affects SWF files of all versions played in Flash Player 10 and later. This change affects all non-application content in Adobe AIR—however, AIR application content itself is unaffected.

What do I need to do?
Any existing content that sets data on the system Clipboard using the System.setClipboard() method outside of an event triggered by user interaction will need to be updated. Setting the Clipboard will now have to be invoked through a button, keyboard shortcut, or some other event initiated by the user.


你可以在這個網站查詢自己安裝的 Flash Player 是什麼版本:
http://snipurl.com/flash_version

目前我還沒找到解決的方法,暫時使用 Flash Switcher 來切換 Flash 版本。不過也不建議網友為了複製程式碼把 Flash 降成 9 版,因為新版本一定有在安全性方面做了更多補強。

bshadow 發表在 痞客邦 PIXNET 留言(0) 人氣()