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

25,584 Responses

  1. AndreDib表示:

    canada rx pharmacy world https://canadianmdpharm.online/# canadian discount pharmacy
    reputable indian pharmacies

  2. AngelCroft表示:

    кухни под заказ спб — Эксклюзивные проекты кухонь для вашего дома в Санкт-Петербурге.

  3. This became Industrias Kaiser Argentina AS (IKA), which was put below James McCloud, Edgar Kaiser’s brother-in-legislation.

  4. CurtisBam表示:

    Indian pharmacy international shipping: indian pharmacy – indian pharmacy

  5. kypit 1s_puEn表示:

    1с предприятие купить программу 1с предприятие купить программу .

  6. Carrolleruck表示:

    https://canadianmdpharm.com/# best rated canadian pharmacy
    canadianpharmacy com

  7. JacobLoody表示:

    https://osmio.ru — закажите кухню вашей мечты уже сегодня.

  8. Brandonnot表示:

    Mexican Easy Pharm: Mexican Easy Pharm – mexican online pharmacies prescription drugs

  9. hi88表示:

    Greetings, I think your website might be having browser compatibility issues. Whenever I take a look at your site in Safari, it looks fine but when opening in Internet Explorer, it’s got some overlapping issues. I simply wanted to give you a quick heads up! Apart from that, great blog!

  10. JacobLoody表示:

    https://www.babaiki.ru/ — Официальный сайт для заказа кухонь и получения консультаций.

  11. Brandonnot表示:

    canadian world pharmacy: Canadian Md Pharm – canada pharmacy

  12. sex nhật hiếp dâm trẻ em ấu dâm buôn bán vũ khí ma túy bán súng sextoy chơi đĩ sex bạo lực sex học đường tội phạm tình dục chơi les đĩ đực người mẫu bán dâm

  13. CurtisBam表示:

    medication from mexico pharmacy: Mexican Easy Pharm – mexico drug stores pharmacies

  14. Robertetest表示:

    Unveiling the Potential of Kelp DAO
    In today’s rapidly evolving digital economy, Kelp DAO emerges as a transformative force in the field of decentralized finance (DeFi). By leveraging blockchain technology, Kelp DAO aims to improve governance and promote sustainability.

    What is Kelp DAO?
    Kelp DAO is a decentralized autonomous organization (DAO) designed to democratize decision-making processes on the blockchain. It serves as a pivotal tool for communities seeking enhanced and a focus on eco-friendly initiatives.

    Why Choose Kelp DAO?
    Here are several compelling reasons to consider Kelp DAO for your blockchain ventures:

    Environmental Sustainability: Kelp DAO incorporates mechanisms that align with environmental conservation goals, making it an eco-conscious choice.
    Decentralized Governance: With a robust framework for community-driven governance, participants can actively influence project directions.
    Innovation in DeFi: By fostering an environment of innovation, Kelp DAO contributes to the evolving landscape of decentralized finance.
    How Does Kelp DAO Work?
    Kelp DAO operates through a token-based voting system, where community members hold the power to vote on proposals and influence project decisions. The DAO’s infrastructure ensures transparency and inclusivity, empowering stakeholders.

    Getting Involved with Kelp DAO
    Joining Kelp DAO is a straightforward process. Interested parties can engage by acquiring Kelp tokens, participating in community discussions, and voting on platform proposals. This involvement not only offers strategic governance participation but also contributes to the broader aim of sustainable development in the digital realm.

    The Future of Kelp DAO
    The ultimate vision for Kelp DAO is a fully decentralized platform where members collaboratively address global challenges while advancing decentralized financial mechanisms. As the community grows, so does its capacity to influence .

    Join Kelp DAO today and become part of a pioneering movement towards a sustainable and decentralized financial future.

  15. AndreDib表示:

    buy canadian drugs https://indiancertpharm.com/# IndianCertPharm
    indian pharmacies safe

  16. Carrolleruck表示:

    https://canadianmdpharm.com/# canada pharmacy online legit
    canada drug pharmacy

  17. DeweyTup表示:

    Renzo Protocol: Secure Blockchain Innovation
    Discover the Renzo Protocol: Revolutionizing Blockchain
    The Renzo Protocol represents a significant advancement in the blockchain technology landscape. It offers a secure and efficient platform for decentralized applications, setting a new standard in the industry.
    renzo ezeth
    Key Features of the Renzo Protocol
    The Renzo Protocol is designed to enhance the functionality and security of blockchain applications. Here are some of its key features:

    High Security: Utilizing advanced encryption methods to protect user data and transactions.
    Scalability: Capable of handling a large number of transactions per second, making it ideal for various applications.
    Decentralization: Ensures that no central authority controls the network, maintaining the core principles of blockchain.
    Interoperability: Seamlessly connects with other blockchain networks and systems.
    Benefits for Developers and Businesses
    The Renzo Protocol offers numerous benefits for both developers and businesses looking to leverage blockchain technology:

    Reduced Costs: By automating processes and cutting out intermediaries, businesses can significantly reduce operational costs.
    Improved Transparency: Every transaction is recorded on the blockchain, providing an immutable and transparent ledger.
    Enhanced Trust: The secure nature of the protocol builds trust among users and stakeholders.
    Development Support: Provides extensive documentation and tools to help developers create robust applications.
    Getting Started with the Renzo Protocol
    To start utilizing the Renzo Protocol, follow these simple steps:

    Visit the Renzo Protocol website and create an account.
    Access the API documentation and development tools.
    Join the Renzo community to connect with other developers and experts.
    Start building and deploying your decentralized applications.
    The Renzo Protocol is not only a beacon of security and efficiency in the blockchain space but also a catalyst for innovation. Whether you are a developer, a business leader, or simply interested in cutting-edge technology, the Renzo Protocol offers the tools and community support needed to drive your projects to success. Embrace the future with the Renzo Protocol and harness the full potential of blockchain technology.

    Renzo Protocol Restaking Guide
    Renzo Protocol Restaking: A Comprehensive Guide
    Renzo Protocol has revolutionized the method through which investors can maximize their crypto assets, particularly through the innovative concept of restaking. This guide will explore the benefits, processes, and strategies of restaking within the Renzo Protocol ecosystem, helping you make the most out of your investments.

  18. CharlesArelf表示:

    Welcome to Karak: Pioneering Blockchain Solutions
    The world of blockchain is evolving rapidly, and Karak is at the forefront of this revolution. Whether you are a developer, an investor, or merely a tech enthusiast, Karak offers a unique blend of innovative solutions designed to meet the diverse needs of the blockchain community.
    karak network
    What is Karak?
    is a sophisticated blockchain platform engineered to provide cutting-edge solutions that streamline processes and enhance efficiency. With a focus on decentralization, security, and speed, Karak integrates seamlessly with existing technologies to deliver a scalable blockchain experience.

    Key Features of Karak
    One of the standout aspects of Karak is its comprehensive suite of features aimed at solving complex blockchain issues.

    Scalability: Karak’s architecture is designed to handle a high volume of transactions without compromising performance.
    Security: Robust security protocols ensure the integrity and confidentiality of data across all network points.
    Interoperability: Seamlessly integrates with various blockchain networks, fostering collaboration and innovation.
    User-Friendly Interface: Intuitive design that caters to both professionals and novices in the blockchain space.
    Why Choose Karak?
    Choosing Karak is choosing a future-proof solution. Its dedicated team of developers and blockchain experts continually work to enhance the platform, ensuring it meets the present and future demands of its users.

    The benefits of using Karak include:

    Access to a rapidly growing ecosystem that supports a vast array of applications.
    A commitment to transparency and community-driven development.
    Dynamic support systems that help users navigate and maximize platform capabilities.
    Get Started with Karak
    Jump into the world of digital transformation with Karak today. Visit to explore the platform and stay ahead in the dynamic blockchain landscape.

    For more information, updates, and support, sign up for the Karak newsletter and become a part of the innovation that is reshaping the future of blockchain.

  19. Bruceder表示:

    Maximize Your Crypto Trading with ParaSwap
    If you’re looking to enhance your cryptocurrency trading experience, it’s time to explore ParaSwap. This innovative platform serves as a decentralized exchange aggregator, giving you the best deals on the market.
    paraswap exchange
    What is ParaSwap?
    ParaSwap is a cutting-edge platform that aggregates the best prices from various decentralized exchanges. It provides users with the most efficient path to execute their trades by considering factors like price impact and gas fees.

    How Does ParaSwap Work?
    ParaSwap functions by connecting directly to multiple liquidity sources. It then simplifies the process of trading across different platforms by bringing the best rates to users all in one place. This means that you don’t have to hop between multiple exchanges—you can find everything you need through ParaSwap.

    Benefits of Using ParaSwap
    Competitive Rates: ParaSwap offers some of the best rates by aggregating prices from various platforms.
    Efficiency: Trade execution is designed to be quick and reliable.
    Transparency: Get clear insights into your trades with detailed transaction information.
    Why Choose ParaSwap?
    Choosing ParaSwap means straightforward, efficient crypto trading. Whether you’re a seasoned trader or new to the crypto space, having a tool like ParaSwap can enhance your trading strategy by ensuring you’re always accessing the best available prices.

    Getting Started
    To start trading with ParaSwap, simply connect your crypto wallet, input the details of your trade, and let ParaSwap find the best route for your transaction. It’s that simple!

    Conclusion
    Maximize your trading potential by leveraging the power of ParaSwap. With its aggregated approach to finding the best prices, efficiency, and transparency, ParaSwap stands out as a leading choice for cryptocurrency traders.

  20. kypit 1s_itor表示:

    1с предприятие купить программу 1с предприятие купить программу .

發佈留言

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