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

29,070 Responses

  1. Здесь можно где купить сейфы в москве сейфы москва

  2. Perryzoozy表示:

    pharmacie en ligne avec ordonnance pharmacie en ligne pas cher Pharmacie sans ordonnance

  3. Тут можно преобрести сейфы офисные цена офисные сейфы цена

  4. Richardprurf表示:

    https://pharmaciemeilleurprix.com/# Pharmacie Internationale en ligne
    vente de mГ©dicament en ligne

  5. Jacobbep表示:

    Pharmacie Internationale en ligne https://viagrameilleurprix.shop/# Viagra femme ou trouver

  6. Тут можно преобрести купить сейф в москве для офиса сейф для офиса

  7. Perryzoozy表示:

    pharmacies en ligne certifiГ©es pharmacie en ligne Pharmacie Internationale en ligne

  8. Perryzoozy表示:

    pharmacie en ligne pharmacie en ligne pharmacie en ligne livraison europe

  9. Jacobbep表示:

    Pharmacie sans ordonnance https://viagrameilleurprix.shop/# Prix du Viagra 100mg en France

  10. Robertzem表示:

    Astronomers briefly thought Elon Musk’s car was an asteroid. Here’s why that points to a broader problem
    skra cc
    Seven years after SpaceX launched Elon Musk’s cherry red sports car into orbit around our sun, astronomers unwittingly began paying attention to its movements once again.

    Observers spotted and correctly identified the vehicle as it started its extraterrestrial excursion in February 2018 — after it had blasted off into space during the Falcon Heavy rocket’s splashy maiden launch. But more recently, the car spawned a high-profile case of mistaken identity as space observers mistook it for an asteroid.
    Several observations of the vehicle, gathered by sweeping surveys of the night sky, were inadvertently stashed away in a database meant for miscellaneous and unknown objects, according to the International Astronomical Union’s Minor Planet Center.

    An amateur astronomer noticed a string of data points in January that appeared to fit together, describing the orbit of a relatively small object that was swooping between the orbital paths of Earth and Mars.

    The citizen scientist assumed the mystery object was an undocumented asteroid and promptly sent his findings to the MPC, which operates at the Harvard Smithsonian Center for Astrophysics in Cambridge, Massachusetts, as a clearinghouse that seeks to catalog all known asteroids, comets and other small celestial bodies. An astronomer there verified the finding.

    And thus, the Minor Planet Center logged a new object, asteroid “2018 CN41.”

    Within 24 hours, however, the center retracted the designation.

    The person who originally flagged the object realized their own error, MPC astronomer Peter Veres told CNN, noticing that they had, in fact, found several uncorrelated observations of Musk’s car. And the center’s systems hadn’t caught the error.

  11. Ваша сцена станет неповторимой с электрокарнизами, подчеркнут красоту представления.
    Электрокарнизы – стильное решение для сцены, делая представление более динамичным.
    Современные технологии в электрокарнизах, и незабываемым для зрителей.
    С электрокарнизами публика останется в восторге, для тех, кто ценит качество и стиль.
    Создайте неповторимую магию на сцене с электрокарнизами, с непревзойденным качеством и надежностью.
    Превратите ваше шоу с помощью электрокарнизов, и принести вашему проекту новый уровень.
    Освежите свое шоу с электрокарнизами, которые обеспечат быстрое и плавное движение.
    С электрокарнизами ваша сцена станет настоящим шедевром, и подчеркнуть важность каждой сцены.
    Трансформируйте свой спектакль с электрокарнизами, и подчеркивая профессионализм исполнителей.
    Сотни вариантов электрокарнизов для ваших выступлений, чтобы сделать шоу неповторимым и запоминающимся.
    карниз для сцены с поддержкой смарт-контроля https://elektrokarniz8.ru/ .

  12. JacobLoody表示:

    кухни от производителя – Кухни напрямую от производителя без переплат.

  13. Richardprurf表示:

    https://viagrameilleurprix.com/# Viagra Pfizer sans ordonnance
    pharmacie en ligne

  14. Have you ever considered about including a little bit more than just your articles?
    I mean, what you say is valuable and everything.
    Nevertheless just imagine if you added some great pictures or videos
    to give your posts more, “pop”! Your content is excellent but with pics and clips, this site
    could undeniably be one of the most beneficial in its field.
    Very good blog! http://mkceramic.co.kr/bbs/board.php?bo_table=free&wr_id=865524

  15. A fascinating discussion is definitely worth comment. I think that you need to publish more on this subject, it may not be a taboo matter but usually people don’t discuss these issues. To the next! Kind regards!

  16. Richardprurf表示:

    https://tadalafilmeilleurprix.com/# pharmacie en ligne
    pharmacie en ligne france livraison belgique

  17. Joshuadoula表示:

    Astronomers briefly thought Elon Musk’s car was an asteroid. Here’s why that points to a broader problem
    skraken shop
    Seven years after SpaceX launched Elon Musk’s cherry red sports car into orbit around our sun, astronomers unwittingly began paying attention to its movements once again.

    Observers spotted and correctly identified the vehicle as it started its extraterrestrial excursion in February 2018 — after it had blasted off into space during the Falcon Heavy rocket’s splashy maiden launch. But more recently, the car spawned a high-profile case of mistaken identity as space observers mistook it for an asteroid.
    Several observations of the vehicle, gathered by sweeping surveys of the night sky, were inadvertently stashed away in a database meant for miscellaneous and unknown objects, according to the International Astronomical Union’s Minor Planet Center.

    An amateur astronomer noticed a string of data points in January that appeared to fit together, describing the orbit of a relatively small object that was swooping between the orbital paths of Earth and Mars.

    The citizen scientist assumed the mystery object was an undocumented asteroid and promptly sent his findings to the MPC, which operates at the Harvard Smithsonian Center for Astrophysics in Cambridge, Massachusetts, as a clearinghouse that seeks to catalog all known asteroids, comets and other small celestial bodies. An astronomer there verified the finding.

    And thus, the Minor Planet Center logged a new object, asteroid “2018 CN41.”

    Within 24 hours, however, the center retracted the designation.

    The person who originally flagged the object realized their own error, MPC astronomer Peter Veres told CNN, noticing that they had, in fact, found several uncorrelated observations of Musk’s car. And the center’s systems hadn’t caught the error.

  18. JacobLoody表示:

    https://www.reshetnyakova.ru – Кухни от производителя в Санкт-Петербурге.

  19. Здесь можно сейф цена купить сейфы купить в москве

  20. I’m not certain the place you are getting your information, however great
    topic. I must spend some time learning much more or working out more.
    Thanks for magnificent information I was searching for this info for my mission. https://365.expresso.blog/question/ilot-de-cuisine-mobile-flexibilite-et-fonctionnalite-42/

  21. Jacobbep表示:

    Pharmacie sans ordonnance https://viagrameilleurprix.com/# Le gГ©nГ©rique de Viagra

  22. Richardprurf表示:

    http://pharmaciemeilleurprix.com/# acheter mГ©dicament en ligne sans ordonnance
    Achat mГ©dicament en ligne fiable

  23. AnthonySlupe表示:

    Astronomers briefly thought Elon Musk’s car was an asteroid. Here’s why that points to a broader problem
    skraken официальный сайт
    Seven years after SpaceX launched Elon Musk’s cherry red sports car into orbit around our sun, astronomers unwittingly began paying attention to its movements once again.

    Observers spotted and correctly identified the vehicle as it started its extraterrestrial excursion in February 2018 — after it had blasted off into space during the Falcon Heavy rocket’s splashy maiden launch. But more recently, the car spawned a high-profile case of mistaken identity as space observers mistook it for an asteroid.
    Several observations of the vehicle, gathered by sweeping surveys of the night sky, were inadvertently stashed away in a database meant for miscellaneous and unknown objects, according to the International Astronomical Union’s Minor Planet Center.

    An amateur astronomer noticed a string of data points in January that appeared to fit together, describing the orbit of a relatively small object that was swooping between the orbital paths of Earth and Mars.

    The citizen scientist assumed the mystery object was an undocumented asteroid and promptly sent his findings to the MPC, which operates at the Harvard Smithsonian Center for Astrophysics in Cambridge, Massachusetts, as a clearinghouse that seeks to catalog all known asteroids, comets and other small celestial bodies. An astronomer there verified the finding.

    And thus, the Minor Planet Center logged a new object, asteroid “2018 CN41.”

    Within 24 hours, however, the center retracted the designation.

    The person who originally flagged the object realized their own error, MPC astronomer Peter Veres told CNN, noticing that they had, in fact, found several uncorrelated observations of Musk’s car. And the center’s systems hadn’t caught the error.

  24. Jacobbep表示:

    vente de mГ©dicament en ligne http://pharmaciemeilleurprix.com/# pharmacie en ligne france fiable

  25. Jamesbop表示:

    Police raided a forger’s workshop in Rome. They found dozens of pieces, including fake Picassos and Rembrandts
    гей порно парни
    Italian police have seized dozens of forged artworks attributed to famous artists such as Picasso and Rembrandt in what authorities have called a “clandestine painting laboratory.”

    The investigation, led by the Carabinieri Command for the Protection of Cultural Heritage, the country’s arts and culture police, and coordinated with the Rome prosecutor’s office, started when authorities began searching for fraudulent works that had been put for sale online, according to a press release issued by the police.

    Police said they found a total of 71 paintings, adding that the suspect was selling “hundreds of works of dubious authenticity” on sites like eBay and Catawiki.

    Paintings attributed to the likes of Pablo Picasso and Rembrandt Harmenszoon van Rijn were among the works of art.

    There were also forged pieces purporting to be from Mario Puccini, Giacomo Balla and Afro Basaldella, as well as several other celebrated artists.

    The workshop where the paintings were being produced was located by police to a house in one of Rome’s northern neighbourhoods.

    Authorities arrived to find a room set up solely for the production of counterfeit paintings. Among the materials seized by the police were hundreds of tubes of paint, brushes, easels, along with falsified gallery stamps and artist signatures.
    The suspect, described by authorities as a “forger-restorer,” was even in possession of a typewriter and computer devices used to create paintings and falsify certificates of authenticity for the fraudulent pieces.

    One tactic the suspect used was to collage over auction catalogues, replacing the painter’s original work with an image of the fake art he created, police said. This would give the appearance that the fake painting had been the real one all along.

    Police also found various works still in the process of being made on the forger’s table bearing the signatures of different artists – leading them to believe that the suspect had created them recently.

    This is far from the first time that Italian authorities have unearthed forged artworks. Established in 1969, the Carabinieri art police are specialized in combatting crimes relating to arts and culture.

    In 2023, they recovered thousands of artifacts stolen from graves and archaeological digs.

  26. NorbertKep表示:

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

  27. I am regular visitor, how are you everybody? This article posted at this web site
    is truly good. http://www.shsenc.co.kr/bbs/board.php?bo_table=free&wr_id=1582883

  28. Тут можно преобрести сейф пожаровзломостойкие купить взломостойкие сейфы

  29. Hermanter表示:

    Astronomers briefly thought Elon Musk’s car was an asteroid. Here’s why that points to a broader problem
    sкракен онион
    Seven years after SpaceX launched Elon Musk’s cherry red sports car into orbit around our sun, astronomers unwittingly began paying attention to its movements once again.

    Observers spotted and correctly identified the vehicle as it started its extraterrestrial excursion in February 2018 — after it had blasted off into space during the Falcon Heavy rocket’s splashy maiden launch. But more recently, the car spawned a high-profile case of mistaken identity as space observers mistook it for an asteroid.
    Several observations of the vehicle, gathered by sweeping surveys of the night sky, were inadvertently stashed away in a database meant for miscellaneous and unknown objects, according to the International Astronomical Union’s Minor Planet Center.

    An amateur astronomer noticed a string of data points in January that appeared to fit together, describing the orbit of a relatively small object that was swooping between the orbital paths of Earth and Mars.

    The citizen scientist assumed the mystery object was an undocumented asteroid and promptly sent his findings to the MPC, which operates at the Harvard Smithsonian Center for Astrophysics in Cambridge, Massachusetts, as a clearinghouse that seeks to catalog all known asteroids, comets and other small celestial bodies. An astronomer there verified the finding.

    And thus, the Minor Planet Center logged a new object, asteroid “2018 CN41.”

    Within 24 hours, however, the center retracted the designation.

    The person who originally flagged the object realized their own error, MPC astronomer Peter Veres told CNN, noticing that they had, in fact, found several uncorrelated observations of Musk’s car. And the center’s systems hadn’t caught the error.

發佈留言

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