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

11,649 Responses

  1. Bcuwep表示:

    cost prednisolone 40mg – gabapentin without prescription viagra 100mg us

  2. zabmblhq表示:

    erythromycin eye ointment side effects http://erythromycinn.com/#

  3. Noxulf表示:

    buy amoxicillin 1000mg generic – brand zithromax 500mg purchase sildenafil online cheap

  4. Ikiuli表示:

    amoxicillin 1000mg oral – purchase azithromycin without prescription sildenafil viagra

  5. AndrewEcork表示:

    cialis 20 mg best price tadalafil 20mg lisinopril and cialis

  6. AndrewEcork表示:

    generic of cialis best price for daily cialis cialis black online

  7. AndrewEcork表示:

    generic cialis made in america tadalafil 20mg best price cialis overnight pharmacy

  8. Wwahgc表示:

    cost deltasone – erection pills online accutane 10mg usa

  9. Xyvkkc表示:

    order deltasone generic – medicine erectile dysfunction isotretinoin 10mg generic

  10. free表示:

    I found your blog through google and I must say, this is probably one of the best well prepared articles I have come across in a long time. I have bookmarked your site for more posts.

發佈留言

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