網頁全螢幕化的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,669 Responses

  1. Williamces表示:

    amoxicillin 500 mg where to buy: amoxicillin for tooth infection – buy amoxicillin over the counter uk

  2. Williamces表示:

    can i get clomid without dr prescription: where can i buy cheap clomid without rx – where can i get cheap clomid without prescription

  3. BrianGub表示:

    http://prednisonest.pro/# prednisone 12 tablets price

  4. BrianGub表示:

    https://amoxilst.pro/# where can i buy amoxicillin online

  5. Waynerat表示:

    over the counter amoxicillin canada: amoxicillin 875 – amoxicillin 500mg over the counter

  6. AnthonyPreep表示:

    amoxicillin 500 mg price buy amoxicillin 500mg uk where can you buy amoxicillin over the counter

  7. Danieliteds表示:

    drug prices prednisone: prednisone for dogs side effects – canadian online pharmacy prednisone

  8. IrwinGlync表示:

    amoxicillin medicine over the counter: amoxicillin 500mg side effects – amoxicillin 500 tablet

  9. BrianGub表示:

    https://amoxilst.pro/# amoxicillin 500mg price in canada

  10. AnthonyPreep表示:

    buy prednisone online uk prednisone 5mg over the counter canada buy prednisone online

  11. BrianGub表示:

    http://clomidst.pro/# clomid generic

  12. BrianGub表示:

    http://prednisonest.pro/# prednisone otc price

  13. Waynerat表示:

    ampicillin amoxicillin: amoxicillin 500 mg brand name – amoxicillin 500 mg

  14. Williamces表示:

    amoxicillin cost australia: where can i buy amoxocillin – buying amoxicillin in mexico

  15. AnthonyPreep表示:

    amoxicillin for sale amoxicillin 500 mg for sale buy amoxicillin online no prescription

  16. Williamces表示:

    can i order generic clomid without dr prescription: where can i get cheap clomid no prescription – buying clomid for sale

  17. Williamces表示:

    where to buy prednisone in canada: otc prednisone cream – prednisone 10mg buy online

  18. Danieliteds表示:

    amoxicillin without prescription: amoxicillin 500 mg – over the counter amoxicillin canada

  19. BrianGub表示:

    https://amoxilst.pro/# amoxicillin online pharmacy

發佈留言

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