網頁全螢幕化的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...

16,674 Responses

  1. Stevenkated表示:

    https://88betviet.pro/# 88bet slot

  2. Danmajet表示:

    Really appreciate you sharing this post. Keep writing.

  3. Dhfcue表示:

    order omeprazole 20mg without prescription – atenolol 50mg cost buy atenolol sale

  4. Josephsip表示:

    nha cai 88bet: 88bet slot – 188bet 88bet

  5. Josephsip表示:

    k8 bet: k8 bet – k8 th? dam

  6. Rubengax表示:

    alo 789 dang nh?p alo789hk alo789 chinh th?c

  7. Curtismence表示:

    http://alo789.auction/# alo789in

  8. Rubengax表示:

    nha cai 88bet 88bet slot 88 bet

  9. Josephsip表示:

    88bet: nha cai 88bet – nha cai 88bet

  10. Josephsip表示:

    88 bet: 88bet – 88 bet

  11. Status AI表示:

    Looking forward to reading more. Great blog post.Much thanks again. Great.

  12. Curtismence表示:

    https://k8viet.guru/# k8 th? dam

  13. Rubengax表示:

    nha cai k8 k8 th? dam nha cai k8

  14. 佳文网表示:

    Thanks so much for the article post.Much thanks again. Much obliged.

  15. Josephsip表示:

    k8 th? dam: link vao k8 – k8 bet

  16. Josephsip表示:

    88 bet: 88bet – 88bet

  17. 云顶小姐表示:

    Im obliged for the blog.Thanks Again. Great.

  18. Curtismence表示:

    http://alo789.auction/# alo 789 dang nh?p

  19. Muchos Gracias for your article.Thanks Again. Much obliged.

  20. Rubengax表示:

    alo789 chinh th?c alo 789 dang nh?p alo 789 dang nh?p

  21. Manta Bridge表示:

    US Bitcoin reserve prompts $370 million in ETF outflows: Farside

  22. Curtismence表示:

    http://alo789.auction/# alo789in

  23. Josephsip表示:

    keo nha cai 88bet: 88 bet – nha cai 88bet

發佈留言

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