網頁全螢幕化的Flash動畫

好一陣子沒更新文章了,因為最近把自己弄得很忙,不過在日前的授課中,有同學問到了要如何在網頁中製作一個可以全螢幕化的Flash動畫,教完了之後想想這個範例應該不用花太久時間,所以就順便在這邊分享一下吧!

首先要先會把swf放在網頁上(廢話),接著在Flash中設置一個按鈕,寫下如下的ActionScript:

btn.addEventListener(MouseEvent.CLICK,fullFn)
function fullFn(e:MouseEvent){
	if(stage.displayState == StageDisplayState.NORMAL)
		stage.displayState = StageDisplayState.FULL_SCREEN;
	else
		stage.displayState = StageDisplayState.NORMAL;
}

另外在網頁上也要在HTML中加入下面的參數:

<param name="allowFullscreen" value="true" />

如此一來就可以完成這樣的效果囉!也可以參考一下範例頁面

You may also like...

10,948 Responses

  1. AndrewEcork表示:

    buy daily cialis from canada tadalafil without a doctor’s prescription viagra cialis melbourne site:au

  2. dumygkax表示:

    http://erythromycin1m.com/# erythromycin mechanism of action

  3. chat表示:

    How come you do not have your website viewable in mobile format? cant see anything in my Droid.

  4. free表示:

    Peculiar this blog is totaly unrelated to what I was searching for – – interesting to see you’re well indexed in the search engines.

  5. movie表示:

    Please let us know when you plan to publish your book!

  6. cam表示:

    Thanks , I’ve recently been searching for info about this topic for ages and yours is the best I have discovered so far. But, what concerning the bottom line? Are you certain concerning the source?

  7. AndrewEcork表示:

    cialis without prescriptions cialis pills generic cialis fast shipping

  8. Lrkbjr表示:

    generic tadalafil 10mg – legal online pharmacy review oral modafinil 200mg

  9. Puvloq表示:

    cialis 20 mg – order modafinil for sale provigil canada

  10. AndrewEcork表示:

    cialis after prostate surgery tadalafil 20mg best price cialis side effects a wife’s perspective

  11. CraigDor表示:

    viagra over the counter walmart sildenafil 20 mg viagra price

  12. CraigDor表示:

    buy viagra online usa sildenafil 20 mg cheap viagra online

  13. Mwahpd表示:

    buy doxycycline for sale – buy doxycycline without prescription cialis 40mg over the counter

發佈回覆給「Mwahpd」的留言 取消回覆

發佈留言必須填寫的電子郵件地址不會公開。