Flash翻轉式影片播放器

這是一個結合Tweener和影片的範例,主要的目的是利用Flash載入外部視訊來播放,順帶利用ActionScript來做畫面的翻轉,翻轉後可以詳細介紹該影片的資訊,或是版權宣告等,先看看範例頁面檔案下載,要製作這樣的動畫,首先要先準備一段影片檔,我的範例中所準備的是利用數位相機拍攝出來的影片,再利用Adobe Media Encoder轉換成大小為640×360,F4V格式的影片,再利用Flash內建的組件FLVPlayback來播放。

資料夾檔案結構如下:

3D Video Flip 檔案結構

  • Caurina是Tweener Class大家可以到Tweener的官網下載,前述文章有連結。
  • 3dflip.fla、3dflip.html、3dflip.swf是Flash的原始檔、網頁檔以及播放檔。
  • Shengxing為本範例所使用到的影片檔。
  • SkinUnderPlaySeekMute為播放器的面板檔。

而在下圖是在Flash中的結構:

3D Video Flip 動畫結構

  • 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;
}

You may also like...

32,788 Responses

  1. 1win_ubMa表示:

    1win вход в личный кабинет https://1win6020.ru .

  2. Профессиональный сервисный центр по ремонту бытовой техники с выездом на дом.
    Мы предлагаем:сервис центры бытовой техники москва
    Наши мастера оперативно устранят неисправности вашего устройства в сервисе или с выездом на дом!

  3. Filters require to be cleansed and any air paths and warmth exchangers
    maintained clean.

  4. EDT, with locations like Wall Township, New Jersey, receiving 4.24 inches (108 mm) of rain in someday, greater than the town’s standard month-to-month complete of 3.98 inches (101 mm) of June precipitation.

  5. Jamesavata表示:

    пин ап казино зеркало – пин ап казино официальный сайт

  6. Профессиональный сервисный центр по ремонту бытовой техники с выездом на дом.
    Мы предлагаем:ремонт бытовой техники в мск
    Наши мастера оперативно устранят неисправности вашего устройства в сервисе или с выездом на дом!

  7. TracyRak表示:

    Struggling to lose weight? AquaSculpt is transforming weight loss with its natural, fast-acting capsules. Packed with proven AquaSculpt ingredients, these capsules burn fat, boost energy, and deliver real AquaSculpt results in weeks. Curious about AquaSculpt reviews? Users love its effectiveness and zero AquaSculpt side effects. Want to know AquaSculpt how to use? It’s simple—take daily and watch the pounds melt away. Ready to try? AquaSculpt buy now at http://aquasculpt.me and sculpt your dream body today!

  8. Dewayneepics表示:

    Struggling to lose weight? AquaSculpt is transforming weight loss with its natural, fast-acting capsules. Packed with proven AquaSculpt ingredients, these capsules burn fat, boost energy, and deliver real AquaSculpt results in weeks. Curious about AquaSculpt reviews? Users love its effectiveness and zero AquaSculpt side effects. Want to know AquaSculpt how to use? It’s simple—take daily and watch the pounds melt away. Ready to try? AquaSculpt buy now at http://aquasculpt.lifestyle and sculpt your dream body today!

  9. Williamuniot表示:

    пин ап – пин ап казино официальный сайт

  10. Mirroryrm表示:

    Получить КОНСУЛЬТАЦИЮ и ПОДДЕРЖКУ профессиональных психологов. Онлайн-консультация психолога. Онлайн-консультация психолога.

  11. TracyRak表示:

    Say hello to AquaSculpt—a game-changer in weight loss! These AquaSculpt capsules use natural AquaSculpt ingredients to shed pounds and boost confidence. No AquaSculpt side effects, just pure AquaSculpt results—see why in AquaSculpt reviews. Learn AquaSculpt how to use and join thousands who love it. AquaSculpt buy today at http://aquasculpt.me !

  12. Jamesavata表示:

    пин ап вход – пин ап

  13. Williamuniot表示:

    pinup 2025 – пин ап зеркало

  14. Jamesavata表示:

    пин ап казино – пин ап казино официальный сайт

  15. CharlesBrato表示:

    Say hello to AquaSculpt—a game-changer in weight loss! These AquaSculpt capsules use natural AquaSculpt ingredients to shed pounds and boost confidence. No AquaSculpt side effects, just pure AquaSculpt results—see why in AquaSculpt reviews. Learn AquaSculpt how to use and join thousands who love it. AquaSculpt buy today at http://aquasculpt.best

  16. KevinPsync表示:

    Say hello to AquaSculpt—a game-changer in weight loss! These AquaSculpt capsules use natural AquaSculpt ingredients to shed pounds and boost confidence. No AquaSculpt side effects, just pure AquaSculpt results—see why in AquaSculpt reviews. Learn AquaSculpt how to use and join thousands who love it. AquaSculpt buy today at http://aquasculpt.xyz !

  17. JesseDex表示:

    pinup 2025: https://pinupkz.life/

  18. Forrestteaxy表示:

    Say hello to AquaSculpt—a game-changer in weight loss! These AquaSculpt capsules use natural AquaSculpt ingredients to shed pounds and boost confidence. No AquaSculpt side effects, just pure AquaSculpt results—see why in AquaSculpt reviews. Learn AquaSculpt how to use and join thousands who love it. AquaSculpt buy today at http://aquasculpt.one !

  19. JesseDex表示:

    пин ап: https://pinupkz.life/

  20. Dwayneseisa表示:

    Kamagra Kopen kamagra 100mg kopen Kamagra Kopen Online

  21. Dewayneepics表示:

    AquaSculpt weight loss is here to stay! With AquaSculpt capsules, you get fast AquaSculpt results thanks to natural AquaSculpt ingredients. No worries about AquaSculpt side effects—users confirm it in AquaSculpt reviews. Curious AquaSculpt how to use? It’s easy and effective. AquaSculpt where to buy? Visit http://aquasculpt.lifestyle and transform your body now!

  22. Dewayneepics表示:

    Say hello to AquaSculpt—a game-changer in weight loss! These AquaSculpt capsules use natural AquaSculpt ingredients to shed pounds and boost confidence. No AquaSculpt side effects, just pure AquaSculpt results—see why in AquaSculpt reviews. Learn AquaSculpt how to use and join thousands who love it. AquaSculpt buy today at http://aquasculpt.lifestyle !

  23. CharlesBrato表示:

    AquaSculpt weight loss is here to stay! With AquaSculpt capsules, you get fast AquaSculpt results thanks to natural AquaSculpt ingredients. No worries about AquaSculpt side effects—users confirm it in AquaSculpt reviews. Curious AquaSculpt how to use? It’s easy and effective. AquaSculpt where to buy? Visit http://aquasculpt.best and transform your body now!

  24. Forrestteaxy表示:

    AquaSculpt weight loss is here to stay! With AquaSculpt capsules, you get fast AquaSculpt results thanks to natural AquaSculpt ingredients. No worries about AquaSculpt side effects—users confirm it in AquaSculpt reviews. Curious AquaSculpt how to use? It’s easy and effective. AquaSculpt where to buy? Visit http://aquasculpt.one and transform your body now!

  25. Forrestteaxy表示:

    Struggling to lose weight? AquaSculpt is transforming weight loss with its natural, fast-acting capsules. Packed with proven AquaSculpt ingredients, these capsules burn fat, boost energy, and deliver real AquaSculpt results in weeks. Curious about AquaSculpt reviews? Users love its effectiveness and zero AquaSculpt side effects. Want to know AquaSculpt how to use? It’s simple—take daily and watch the pounds melt away. Ready to try? AquaSculpt buy now at http://aquasculpt.one and sculpt your dream body today!

  26. Jamesavata表示:

    пин ап зеркало – пин ап зеркало

發佈留言

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