Flash翻轉式影片播放器
這是一個結合Tweener和影片的範例,主要的目的是利用Flash載入外部視訊來播放,順帶利用ActionScript來做畫面的翻轉,翻轉後可以詳細介紹該影片的資訊,或是版權宣告等,先看看範例頁面,檔案下載,要製作這樣的動畫,首先要先準備一段影片檔,我的範例中所準備的是利用數位相機拍攝出來的影片,再利用Adobe Media Encoder轉換成大小為640×360,F4V格式的影片,再利用Flash內建的組件FLVPlayback來播放。
資料夾檔案結構如下:
- Caurina是Tweener Class大家可以到Tweener的官網下載,前述文章有連結。
- 3dflip.fla、3dflip.html、3dflip.swf是Flash的原始檔、網頁檔以及播放檔。
- Shengxing為本範例所使用到的影片檔。
- SkinUnderPlaySeekMute為播放器的面板檔。
而在下圖是在Flash中的結構:
- container是包含播放器、解說文字的影片片段,該元件包含FLVPlayback播放器組件(Video)和解說文字(Text)兩個圖層。
- FLVPlayback是Flash內建的影片播放器組件。
- loading影片載入時會出現的文字。
- spin影片右上角旋轉的按鈕。
- text包含有介紹文字的影片片段,文字中亦製作有超連結(維基百科)。
- vid如果有自己的影片想要更換,請進入名為Vid的影片片段中利用屬性面板修改。
本範例所包含的ActionScript都在場景中的第一個影格,程式碼如下:
import caurina.transitions.*; import fl.video.*; con.visible = false; var flv:FLVPlayback = con.vid.flvp; flv.addEventListener(VideoEvent.PLAYING_STATE_ENTERED, onStart); function onStart(e:Event):void { con.visible = true; loading.visible = false; } con.vid.spin.addEventListener(MouseEvent.CLICK, cl); con.tclip.spin.addEventListener(MouseEvent.CLICK, cl); var isTurning:Boolean = false; function cl(e:Event):void { if(!isTurning) { Tweener.addTween(con, {rotationY:con.rotationY+180,time:1, onComplete:function(){isTurning=false;}}); isTurning = true; } } addEventListener(Event.ENTER_FRAME, loop); function loop(e:Event):void { if(con.rotationY > 90 && con.rotationY < 270) con.addChild(con.tclip); else con.addChild(con.vid); if(con.rotationY >= 360) con.rotationY = 0; }
This is really fascinating, You’re an excessively professional blogger. I’ve joined your rss feed and sit up for looking for more of your fantastic post. Additionally, I have shared your website in my social networks
https://catsincare.com/pags/888starz-promo-code.html
Remarkable things here. I am very satisfied to peer your article. Thanks so much and I am looking forward to contact you. Will you kindly drop me a mail?
http://aliseplus.lv/inc/pgs/?1xbet_promokod___bonus_pri_registracii_1.html
where to buy clomid pill clomidonpharm order cheap clomid without rx
Hi great blog! Does running a blog similar to this require a massive amount work? I’ve absolutely no understanding of programming however I had been hoping to start my own blog in the near future. Anyway, if you have any ideas or techniques for new blog owners please share. I know this is off topic however I simply wanted to ask. Cheers!
https://idematapp.com/wp-content/pages/paripesa_promo_code.html
The rites had been accountable for the Pythian sisters of Marlin, and the Rev Scott Wallace of Wilbur Community church preached the sermon.
вывод из запоя на дому спб цены вывод из запоя на дому спб цены .
Great post. http://Wiki.myamens.com/index.php/Traitements_M%C3%83_dicaux_Personnalis%C3%83_s_Au_Qu%C3%83_bec_:_R%C3%83_volution_Dans_Les_Soins_De_Sant%C3%83
WOW just what I was looking for. Came here by searching for %meta_keyword%
https://www.hoyesarte.com/pages/paripesa_promo_code.html
can you buy cheap clomid without rx: clomid on pharm – generic clomid
This is very interesting, You’re a very skilled blogger. I have joined your rss feed and look forward to seeking more of your great post. Also, I’ve shared your site in my social networks!
http://centroculturalrecoleta.org/blog/pages/codice_promozionale_11.html
Nick Lowles, the chief govt of the UK anti-racist group Hope Not Hate, said: “What we’ve got seen …
https://prednibest.com/# purchase prednisone no prescription
bookmarked!!, I love your web site! https://bdstarter.com/lassemblage-de-metal/
I relish, lead to I discovered exactly what I used to be looking for. You have ended my four day lengthy hunt! God Bless you man. Have a great day. Bye
https://accentforex.com/wp-conent/pgs/betwinner_promo_code_54.html