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...

19,039 Responses

  1. Williamknoto表示:

    Looking after your well-being and the health of your loved ones is a essential element of our existence that demands unremitting consideration.
    https://forum.enscape3d.com/wcf/index.php?user/67343-buy-metformin-online/
    Proactive actions, such as regular health check-ups, allow for the timely identification of prospective concerns and preclude the development of critical illnesses. Following a wholesome mode of life, which comprises a moderate diet, consistent physical exertion, and abstaining from detrimental behaviors, assists strengthen the immunity and improve overall well-being. Strict observance to physicians’ recommendations is essential for effective therapy and the circumvention of complications. Bear in mind, well-being is a value that requires responsible and caring vigilance.

  2. Allenacurf表示:

    Viagra prix pharmacie paris: viagra en ligne – Viagra homme sans ordonnance belgique

  3. StephenDeery表示:

    Why viewers still make use of to read news papers when in this technological world the whole thing is available on net?
    nomad morocco

  4. Shaneevige表示:

    Awesome blog you have here but I was wondering if you knew of any message boards that cover the same topics discussed here? I’d really love to be a part of group where I can get feed-back from other knowledgeable individuals that share the same interest. If you have any recommendations, please let me know. Appreciate it!
    pin up официальный сайт

  5. Williamknoto表示:

    Caring for your health and the well-being of your relatives is a crucial element of our lives that demands ongoing care.
    https://forum.enscape3d.com/wcf/index.php?user/67306-buy-viagra-online/
    Preventative actions, such as routine medical check-ups, facilitate the early identification of potential concerns and preclude the advancement of critical illnesses. Adopting a nutritious lifestyle, which involves a balanced diet, consistent exercise, and avoiding unhealthy practices, helps bolster the immunity and enhance overall wellness. Rigid observance to medical professionals’ guidelines is critical for successful treatment and the circumvention of side effects. Bear in mind, well-being is a value that demands diligent and thoughtful attention.

  6. XRumer23obliz表示:

    Hello!

    This post was created with XRumer 23 StrongAI.

    Good luck 🙂

  7. Allenacurf表示:

    trouver un mГ©dicament en pharmacie: levitra generique prix en pharmacie – Pharmacie sans ordonnance

  8. EdwardGROOM表示:

    trouver un mГ©dicament en pharmacie: cialis prix – п»їpharmacie en ligne france

  9. IgnacioSlima表示:

    acheter mГ©dicament en ligne sans ordonnance: achat kamagra – vente de mГ©dicament en ligne

  10. Williamknoto表示:

    Maintaining your physical condition and the physical condition of your relatives is a critical component of our lives that calls for continuous care.
    https://forum.enscape3d.com/wcf/index.php?user/67324-buy-generic-cialis-online/
    Preventive steps, such as scheduled medical examinations, facilitate the early discovery of prospective issues and avert the advancement of critical diseases. Following a wholesome mode of life, which comprises a moderate eating habits, consistent physical activity, and refraining from detrimental practices, assists bolster the immunity and improve general wellness. Unwavering observance to doctors’ recommendations is crucial for effective treatment and the prevention of complications. Remember, health is a treasure that requires diligent and thoughtful vigilance.

  11. Lhaneevige表示:

    I think that what you posted made a great deal of sense. However, think on this, suppose you were to write a killer title? I am not suggesting your content is not good, however what if you added something that makes people desire more? I mean %BLOG_TITLE% is kinda plain. You should glance at Yahoo’s front page and watch how they create post headlines to grab people to open the links. You might try adding a video or a related picture or two to get readers interested about what you’ve written. Just my opinion, it could bring your posts a little bit more interesting.
    аир дропы в крипте

  12. Williamknoto表示:

    Caring for your health and the physical condition of your relatives is a essential part of our existence that requires constant attention.
    https://forum.enscape3d.com/wcf/index.php?user/67343-buy-metformin-online/
    Proactive actions, such as routine medical check-ups, allow for the prompt discovery of prospective concerns and preclude the development of serious illnesses. Leading a nutritious mode of life, which incorporates a well-rounded eating habits, consistent exercise, and refraining from harmful behaviors, helps bolster the immune system and improve total health. Strict observance to physicians’ recommendations is essential for effective treatment and the avoidance of adverse effects. Remember, health is a value that requires diligent and thoughtful vigilance.

  13. Williamknoto表示:

    Maintaining your health and the physical condition of your dear ones is a critical part of our existence that calls for constant consideration.
    https://forum.enscape3d.com/wcf/index.php?user/67343-buy-metformin-online/
    Proactive measures, such as routine medical check-ups, facilitate the timely detection of possible issues and stop the development of serious conditions. Following a healthy way of living, which comprises a balanced eating habits, regular physical activity, and abstaining from detrimental habits, assists strengthen the immune system and enhance overall well-being. Strict observance to medical professionals’ advice is critical for efficacious management and the avoidance of adverse effects. Remember, wellness is a value that demands responsible and thoughtful vigilance.

  14. Williamknoto表示:

    Caring for your physical condition and the well-being of your family members is a vital element of our daily lives that demands continuous attention.
    https://forum.enscape3d.com/wcf/index.php?user/67334-buy-clomid-online/
    Preventative actions, such as routine medical check-ups, allow for the early identification of prospective concerns and preclude the development of critical diseases. Adopting a wholesome mode of life, which incorporates a well-rounded eating habits, frequent exercise, and refraining from harmful habits, aids bolster the immune system and boost general health. Unwavering observance to medical professionals’ recommendations is crucial for successful management and the avoidance of adverse effects. Remember, wellness is a value that requires attentive and thoughtful care.

  15. Williamknoto表示:

    Looking after your health and the health of your loved ones is a critical component of our existence that demands constant consideration.
    https://forum.enscape3d.com/wcf/index.php?user/67301-buy-doxycycline-online/
    Proactive steps, such as routine health check-ups, enable the prompt detection of possible concerns and prevent the development of critical diseases. Embracing a wholesome lifestyle, which involves a moderate nutrition, frequent physical exertion, and avoiding harmful practices, assists reinforce the immune system and boost overall wellness. Unwavering compliance to medical professionals’ advice is essential for successful treatment and the avoidance of complications. Bear in mind, well-being is a asset that requires diligent and thoughtful vigilance.

  16. Williamknoto表示:

    Looking after your health and the well-being of your relatives is a vital element of our daily lives that calls for continuous consideration.
    https://forum.enscape3d.com/wcf/index.php?user/67341-buy-tretinoin-online/
    Proactive actions, such as periodic health check-ups, facilitate the early identification of potential concerns and avert the advancement of critical illnesses. Following a nutritious way of living, which comprises a well-rounded eating habits, frequent physical activity, and avoiding unhealthy behaviors, helps reinforce the immune system and boost general health. Strict observance to doctors’ advice is essential for efficacious treatment and the circumvention of side effects. Bear in mind, health is a asset that requires attentive and thoughtful attention.

  17. Timsothyabela表示:

    This is really fascinating, You’re an overly skilled blogger. I have joined your rss feed and sit up for in search of more of your magnificent post. Also, I’ve shared your site in my social networks

    https://www.ways2gogreenblog.com/2024/02/21/welcome-to-the-world-of-del-mar-energy/

  18. Williamknoto表示:

    Looking after your health and the physical condition of your relatives is a essential aspect of our lives that requires continuous attention.
    https://forum.enscape3d.com/wcf/index.php?user/67306-buy-viagra-online/
    Preventive actions, such as regular health check-ups, facilitate the timely identification of possible problems and avert the advancement of serious diseases. Adopting a wholesome way of living, which comprises a well-rounded eating habits, frequent physical activity, and abstaining from harmful practices, assists bolster the immune system and boost general health. Strict adherence to medical professionals’ advice is crucial for effective management and the prevention of side effects. Keep in mind, well-being is a asset that demands attentive and thoughtful attention.

  19. It’s an awesome article for all the web users; they will get advantage from it I
    am sure. http://Wikivicente.x10Host.com/index.php/Usuario:May47G09516143

  20. EdwardGROOM表示:

    pharmacie en ligne livraison europe: pharmacie en ligne france fiable – Achat mГ©dicament en ligne fiable

  21. Shaneevige表示:

    Hello! I’m at work browsing your blog from my new apple iphone! Just wanted to say I love reading your blog and look forward to all your posts! Keep up the excellent work!

    https://www.ways2gogreenblog.com/2024/02/21/welcome-to-the-world-of-del-mar-energy/

  22. Allenacurf表示:

    pharmacie en ligne pas cher: levitra generique – Pharmacie sans ordonnance

  23. EdwardGROOM表示:

    Pharmacie Internationale en ligne: Levitra 20mg prix en pharmacie – Pharmacie sans ordonnance

  24. SDichaelDax表示:

    В нашем обществе, где диплом становится началом успешной карьеры в любом направлении, многие ищут максимально быстрый путь получения образования. Наличие официального документа переоценить невозможно. Ведь именно диплом открывает двери перед людьми, желающими вступить в сообщество профессиональных специалистов или учиться в ВУЗе.
    Мы предлагаем быстро получить этот важный документ. Вы можете заказать диплом нового или старого образца, что становится удачным решением для человека, который не смог закончить обучение или потерял документ. дипломы изготавливаются аккуратно, с максимальным вниманием ко всем нюансам. На выходе вы получите 100% оригинальный документ.
    Преимущества такого подхода заключаются не только в том, что можно оперативно получить свой диплом. Весь процесс организован удобно, с профессиональной поддержкой. От выбора подходящего образца документа до консультации по заполнению персональных данных и доставки в любой регион страны — все будет находиться под полным контролем наших специалистов.
    Для всех, кто ищет быстрый способ получения требуемого документа, наша услуга предлагает отличное решение. Заказать диплом – это значит избежать продолжительного обучения и сразу переходить к достижению собственных целей, будь то поступление в ВУЗ или старт профессиональной карьеры.
    mytubs.ru/5553-pochemu-rebenok-ne-hochet-uchitsja.htmlВ 
    viparmenia.org/threads/14652-%D0%9E-%D1%84%D1%80%D0%B0%D0%BD%D1%86%D1%83%D0%B7%D0%B0%D1%85-%D0%BA%D0%BE%D1%82%D0%BE%D1%80%D1%8B%D0%B5-%D0%B0%D1%80%D0%BC%D1%8F%D0%BD%D0%B5/page2В 
    savelrr.ru/raspisanie-elektrichek-volkhovstroy-pupyshevo-voybokalo-mga-sankt-peterburg.htmlВ 
    http://www.institute-catalogue.ru/rus/specialty/609.htmlВ 
    pumarefrattari.com/index.php/it/component/k2/item/19547-premiums-diplomscomВ 

  25. EdwardGROOM表示:

    pharmacie en ligne: cialis sans ordonnance – Pharmacie en ligne livraison Europe

  26. Allenacurf表示:

    Pharmacie en ligne livraison Europe: cialis sans ordonnance – pharmacie en ligne avec ordonnance

  27. RobertBlica表示:

    http://cenligne.com/# Achat médicament en ligne fiable

  28. Ignacioreura表示:

    pharmacie en ligne france pas cher: cialis generique – Pharmacie Internationale en ligne

  29. Allenacurf表示:

    vente de mГ©dicament en ligne: kamagra gel – pharmacie en ligne france livraison belgique

  30. Undeniably believe that which you said. Your favorite reason seemed
    to be on the net the easiest thing to be aware of.
    I say to you, I certainly get irked while people consider worries that they just don’t know about.
    You managed to hit the nail upon the top and defined out the whole thing without having side-effects , people
    can take a signal. Will probably be back to get more. Thanks https://Dftsocial.com/story17837726/fuzion-chez-soi

發佈留言

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