如果用戶沒有安裝Flash,我希望在我的Flex應用程序中重定向到HTML頁面。我注意到在Flash生成的HTML中它有:如果Flash未安裝,如何重定向到HTML頁面?
<div id="flashContent">
<p>
To view this page ensure that Adobe Flash Player version
10.0.0 or greater is installed.
</p>
<script type="text/javascript">
var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");
document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"
+ pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>");
</script>
</div>
其中顯示關於沒有閃光燈的一般消息。
我知道如果Flash不存在,我可以將HTML顯示出來,但如果不需要,我不想加載HTML(當Flash安裝時),所以我認爲最好的方法是重定向如果flash不存在,則轉到HTML頁面。
如何在Flex中做到這一點?
Thanks @ bug-a-lot.I嘗試了上面的代碼,但它沒有奏效!也許是因爲我使用Flex 4? – Tam 2011-02-18 18:37:05