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. These codecs are seemingly to alter Web page functionality once they’re adopted more fully.

  2. Brandonnot表示:

    canadian online pharmacy reviews: canadian drugs – canadian pharmacy meds

  3. kypit 1s_zrEn表示:

    настройка 1с бухгалтерии цена настройка 1с бухгалтерии цена .

  4. Brandonnot表示:

    indian pharmacy: Indian Cert Pharm – buy medicines online in india

  5. kypit 1s_boor表示:

    1с предприятие купить программу http://svstrazh.forum24.ru/?1-3-0-00000323-000-0-0-1737110513/ .

  6. CurtisBam表示:

    Mexican Easy Pharm: Mexican Easy Pharm – Mexican Easy Pharm

  7. I really like your blog.. very nice colors & theme. Did you create
    this website yourself or did you hire someone to do it for you?

    Plz reply as I’m looking to construct my own blog and would like to find out where u got this from.
    kudos https://www.kasimarket.techandtag.co.za/index.php?page=user&action=pub_profile&id=166199

  8. Rickybus表示:

    Getting Started with Quickswap
    Quickswap is revolutionizing the way we trade cryptocurrencies by offering a decentralized platform for seamless crypto trading. As a user-friendly decentralized exchange (DEX), Quickswap allows users to swap tokens effortlessly without the need for intermediaries. Here’s a detailed guide to getting started with Quickswap.
    quickswap v3
    What is Quickswap?
    Quickswap is a layer-2 decentralized exchange built on the Polygon network, which is known for its high-speed and low-cost transactions. This platform provides an efficient and secure way to trade a wide range of cryptocurrencies without enduring hefty fees typical of Ethereum-based DEXes.

    Why Use Quickswap?
    Low Fees: Thanks to the Polygon network, trading on Quickswap is significantly cheaper than on Ethereum-based platforms.
    High Speed: Experience fast transaction speeds that enhance user experience and trading efficiency.
    User-Friendly Interface: Quickswap’s interface is designed to be intuitive, even for beginners, making it easy to trade cryptocurrencies.
    How to Use Quickswap
    Set Up a Crypto Wallet: You’ll need a compatible wallet like MetaMask or Trust Wallet. Ensure it’s connected to the Polygon network.
    Fund Your Wallet: Purchase or transfer tokens into your wallet for trading.
    Visit Quickswap Platform: Navigate to the Quickswap website and connect your wallet. This step is essential to access all features of the platform.
    Start Trading: Select the tokens you want to swap. With its simple interface, you can execute trades in just a few clicks.
    Tips for Effective Trading on Quickswap
    To make the most out of your trading experience on Quickswap, consider these tips:

    Keep an eye on the market trends and choose the right time for your trades.
    Understand the token pairs and their liquidity status to avoid high slippage.
    Regularly update your wallet and security settings to protect your assets.
    Conclusion
    Quickswap offers a robust platform for trading a wide range of cryptocurrencies efficiently. By leveraging the benefits of the Polygon network, it minimizes delays and costs associated with traditional crypto trading. Whether you’re a beginner or a seasoned trader, Quickswap empowers you to navigate the DeFi space with ease and confidence.

  9. StevenEmurl表示:

    Welcome to Orbiter: Your Gateway to Financial Innovation
    In the ever-evolving landscape of finance, Orbiter stands out as a pioneering platform dedicated to providing cutting-edge solutions for modern investors. As we navigate the future of digital assets and decentralized finance, Orbiter remains at the forefront, committed to innovation and accessibility.
    orbiter fi
    Why Choose Orbiter?
    Orbiter offers unique advantages that set it apart in the financial world:

    Decentralized Solutions: Benefit from a trustless environment where transactions are secure and transparent.
    Innovative Technologies: Leverage groundbreaking technologies, designed to maximize efficiency and utility.
    Community Driven: Engage with a global community that supports and uplifts each other in the financial journey.
    Key Features of Orbiter
    Orbiter’s platform is rich with features tailored to both new and experienced investors.

    1. Smart Investments
    Utilize intelligent tools that enable you to optimize your investment strategies. Orbiter’s algorithms are crafted to pinpoint opportunities in both volatile and stable markets.

    2. Secure Transactions
    Enjoy peace of mind with Orbiter’s advanced security measures. Our platform ensures that each transaction is protected through top-tier encryption and blockchain technology.

    3. User-Friendly Interface
    Navigate with ease! Our user-friendly design ensures accessibility for everyone, from beginners to seasoned traders.

    Join the Orbiter Community
    By joining Orbiter, you’re becoming part of a larger movement towards decentralized and democratized finance. Share insights, learn from peers, and grow your financial acumen in the company of like-minded individuals.

    Ready to explore the future of finance? Let Orbiter guide your journey towards smarter, more secure, and lucrative investments. Join us today and revolutionize how you approach financial management.

  10. вывод из запоя в стационаре воронежа http://www.vyvod-iz-zapoya-v-stacionare-voronezh23.ru .

  11. MiltonNut表示:

    Understanding Venus Protocol: Your Gateway to DeFi
    Venus Protocol has carved a niche in the fast-paced DeFi landscape by offering a one-stop solution for decentralized finance activities. Whether you’re interested in lending, borrowing, or yield farming, Venus provides secure and scalable services on the blockchain.
    venus swap
    Why Choose Venus Protocol?
    The Venus Protocol stands out because:

    It operates on the Binance Smart Chain, ensuring fast and cost-effective transactions.
    It offers a decentralized lending platform that allows users to earn interest by supplying assets.
    The protocol enables borrowing against crypto collateral without the need for a trusted counterparty.
    It supports a wide range of crypto assets, providing higher liquidity and flexibility.
    Key Features of Venus Protocol
    Lending and Borrowing
    Venus Protocol facilitates decentralized lending and borrowing with minimal fees, supported by a robust risk management framework. Users can seamlessly supply assets to the protocol and earn interest, or borrow by simply collateralizing their holdings.

    Automated Yield Farming
    Maximize your returns with Venus Protocol’s yield farming opportunities. By leveraging your assets, you can participate in governance and earn rewards in the form of XVS, Venus Protocol’s native token.

    Multi-Asset Support
    The platform supports numerous cryptocurrencies, enabling diverse investment strategies and providing a convenient way to gain returns on multiple asset classes.

    Getting Started with Venus Protocol
    Start your DeFi journey with Venus Protocol by following these steps:

    Create a Wallet: Use a compatible wallet like Metamask or Trust Wallet to interface with Venus.
    Fund Your Wallet: Transfer crypto assets to your wallet to engage with the Venus Protocol.
    Connect and Start Earning: Connect your wallet to the Venus platform and start supplying or borrowing assets.
    Venus Protocol is your trusted partner in the decentralized financial ecosystem. With its advanced features and strong community support, it simplifies DeFi for everyone from beginners to seasoned users. Embrace the future of finance with confidence and start exploring the possibilities at .

  12. JacobLoody表示:

    nedra2021.ru — качественные кухни, доступные каждому.

  13. AngelCroft表示:

    кухня заказать — Сделайте заказ на кухню своей мечты в несколько простых шагов.

  14. Brianprala表示:

    Welcome to Swell Network: Your Gateway to Decentralized Finance
    The world of cryptocurrency is rapidly evolving, with new platforms emerging to offer innovative financial solutions. Swell Network stands out as a pioneering force in decentralized finance (DeFi), providing users with unique opportunities to engage with the financial future.
    swell network
    What is Swell Network?
    Swell Network is a blockchain-powered platform that aims to disrupt traditional financial systems. It offers a wide range of DeFi services designed to enhance user autonomy and financial inclusivity. By leveraging blockchain technology, Swell Network ensures secure, transparent, and efficient financial transactions.

    Key Features of Swell Network
    Decentralization: Operates on a decentralized framework, reducing reliance on traditional financial institutions.
    Security: Utilizes cutting-edge security protocols to protect user assets and data.
    Transparency: All transactions are recorded on the blockchain, ensuring complete visibility and traceability.
    Accessibility: Open to anyone with internet access, promoting global financial inclusivity.
    Benefits of Using Swell Network
    Adopting Swell Network for your financial activities comes with several benefits:

    Reduced Fees: Experience lower transaction fees compared to conventional banking systems.
    Greater Control: Manage your funds in real-time without intermediaries.
    Innovative Opportunities: Participate in a variety of financial ventures such as liquidity pools and yield farming.
    Getting Started with Swell Network
    If you’re ready to join the DeFi revolution, getting started with Swell Network is straightforward. First, create your account on the platform, then explore different financial instruments that meet your needs. Swell Network offers comprehensive support and resources to guide new users through the onboarding process.

    Stay Informed
    In the ever-evolving crypto landscape, staying informed is crucial. Swell Network regularly updates its community with the latest developments and feature releases. Follow their official communication channels such as blogs, newsletters, and social media to stay up-to-date.

    Embrace the future of finance today with Swell Network and explore the endless possibilities of decentralized finance. to learn more and start your journey.

  15. 10 Things That Your Family Teach You About Retro Fridge Freezer For Sale retro Fridge Freezer For sale

  16. Brianmes表示:

    Unlock Your Financial Potential with Puffer Finance
    In an ever-evolving economic landscape, finding the right financial partner is essential for achieving your investment goals. Puffer Finance stands out as a beacon of innovation and stability, offering a plethora of opportunities to enhance your wealth.
    puffer finance
    Why Choose Puffer Finance?
    Choosing the right financial institution is pivotal in ensuring the security and growth of your investments. Here are compelling reasons to partner with Puffer Finance:

    Innovative Financial Solutions: Puffer Finance provides cutting-edge options tailored to meet diverse investment needs.
    Expert Guidance: Harness the wisdom of experienced finance professionals dedicated to optimizing your portfolio.
    Robust Security Measures: Your investments are well-protected, ensuring peace of mind amidst market fluctuations.
    Services Offered by Puffer Finance
    Puffer Finance prides itself on offering a wide range of services, each designed to cater to specific client needs and financial ambitions. These include:

    1. Investment Management
    Our thorough investment management services provide strategic planning and execution to enhance your portfolio’s performance.

    2. Personal Financial Planning
    Whether you are saving for retirement or planning a major purchase, our personal financial planning services are tailored to help you achieve your ambitions.

    3. Wealth Preservation Strategies
    We offer strategies that not only aim to grow your wealth but also safeguard it against potential risks.

    Getting Started with Puffer Finance
    Embarking on your financial journey with Puffer Finance is a seamless process. Simply to explore how we can help tailor financial strategies to your individual needs. With Puffer Finance, you are not just investing your money; you are investing in a future laden with possibilities.

    Testimonials from Satisfied Clients
    Puffer Finance has been a trusted partner for many satisfied clients:

    “Thanks to Puffer Finance, I have not only grown my wealth but gained confidence in my financial future.” – Alex T.
    “The tailored advice and financial strategies have truly transformed my investment approach.” – Samantha L.
    In conclusion, if your goal is to enhance and secure your financial estate, Puffer Finance provides the tools and expertise to guide you through a prosperous journey.

  17. JesusMox表示:

    What is Lido Finance?
    Lido Finance is a decentralized finance (DeFi) platform that provides simple and efficient solutions for crypto staking. It allows users to stake their digital assets without locking them up, thus maintaining liquidity and flexibility.
    lido staking
    Why Choose Lido Finance?
    Lido Finance provides several benefits to its users:

    Liquidity: Unlike traditional staking, Lido issues liquid tokens that can be traded or used within other DeFi applications.
    Flexibility: Avoid the rigid locking periods that come with typical staking protocols.
    Security: Leverages the security and decentralization inherent in blockchain technology, ensuring your assets are safe.
    How Does It Work?
    Users can stake their assets via Lido’s platform, which then delegates these assets across a set of trusted validators. In return, users receive staked tokens which represent their staked assets and accrue rewards over time.

    Getting Started with Lido Finance
    Follow these steps to begin staking:

    Visit the Lido Finance website and connect your crypto wallet.
    Select the asset you wish to stake, for instance, ETH.
    Enter the amount and execute the transaction.
    Receive staked tokens that represent your staked amount.
    Join the Decentralized Finance Revolution
    With Lido Finance, enjoy the benefits of staking without compromising on liquidity and flexibility. Start today and keep your crypto assets working round the clock.

  18. JacobLoody表示:

    кухни санкт петербург — Лучшие кухни на заказ в городе. Удобство, надежность и современный стиль.

  19. I do not know if it’s just me or if everybody else encountering problems with your site.
    It appears like some of the written text within your posts are running
    off the screen. Can somebody else please provide feedback and let me
    know if this is happening to them too? This might be a problem with my web browser
    because I’ve had this happen before. Thanks http://thankyou.eoapps.co.kr/bbs/board.php?bo_table=free&wr_id=1515890

  20. kypit 1s_hfEn表示:

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

  21. 4, thus gaining a central preponderance; nevertheless, in return, their queen will usually be uncovered as Black’s queenside play unfolds in the middlegame.

  22. Your style is so unique compared to other folks I’ve read stuff from. Thank you for posting when you have the opportunity, Guess I’ll just bookmark this blog.

  23. JoshuaAtope表示:

    Welcome to SushiSwap: Your Gateway to Decentralized Finance
    SushiSwap is a leading decentralized finance (DeFi) platform that allows users to trade cryptocurrencies directly from their digital wallets. Built on top of the Ethereum blockchain, SushiSwap is designed to offer a seamless, trustless, and secure trading experience.
    sushiswap exchange
    Key Features of SushiSwap
    Here’s what sets SushiSwap apart from other decentralized exchanges:

    Swaps: Instantly swap a wide array of tokens without the need for an intermediary.
    Liquidity Pools: Provide liquidity to earn rewards from transaction fees and Sushi tokens.
    Yield Farming: Stake your tokens and earn additional incentives with high returns.
    Governance: Participate in community decision-making processes to shape the future of the platform.
    How to Use SushiSwap
    Follow these steps to get started on SushiSwap:

    Connect Your Wallet: Select a compatible wallet like MetaMask to interact with the platform securely.
    Select Tokens: Choose the cryptocurrencies you wish to swap.
    Confirm Transaction: Review and confirm your transaction details.
    Manage Liquidity: Optionally, add liquidity to pools and earn rewards.
    Why Choose SushiSwap?
    SushiSwap offers numerous advantages for crypto traders:

    Decentralized control ensures your funds are always under your personal control.
    Competitive fees and rewards mechanisms encourage active participation.
    A diverse range of tokens and pairs expands your trading options.
    Join the SushiSwap community now and transform the way you trade using our state-of-the-art platform.

    Stay Informed
    Stay updated with the latest developments and community news by joining SushiSwap’s social media channels and forums. Unlock the potential of decentralized trading today.

  24. Raymondgoatt表示:

    Pendle Finance: Unlocking New Opportunities in DeFi
    As the world of decentralized finance (DeFi) continues to evolve, Pendle Finance is at the forefront, offering innovative solutions for yield and trading. This platform has quickly become a go-to resource for individuals looking to maximize their crypto investments.
    pendle finance
    What is Pendle Finance?
    Pendle Finance is a DeFi protocol designed to provide enhanced yield management opportunities by leveraging tokenization of future yield. It allows users to trade tokenized yield, offering flexibility and potential for optimized earnings.

    Key Features
    Yield Tokenization: Convert future yield into tradable assets, enhancing liquidity.
    Yield Trading: Enter and exit yield positions at strategic times to capitalize on market conditions.
    Multi-Chain Support: Access a wide range of DeFi ecosystems through cross-chain functionality.
    Benefits of Using Pendle Finance
    Pendle Finance provides numerous benefits to its users, making it a compelling choice for DeFi enthusiasts and investors:

    Diversified Investment Options: By tokenizing future yields, Pendle offers a variety of strategies to enhance your investment portfolio.
    Market Flexibility: Trade yield tokens freely, allowing for strategic entry and exit points.
    Enhanced Liquidity: Tokenization increases the liquidity of yields, offering more opportunities for dynamic financial strategies.
    How to Get Started with Pendle
    Embarking on your Pendle Finance journey is straightforward. Follow these steps to unlock the potential of yield trading:

    Create an Account: Set up a user account on the Pendle Finance platform.
    Link Your Wallet: Connect your cryptocurrency wallet to seamlessly manage transactions.
    Start Trading: Explore the available yield tokens and start trading to optimize your returns.
    Conclusion
    In a rapidly changing financial landscape, Pendle Finance stands out by offering innovative solutions aimed at enhancing investment opportunities. Whether you are a seasoned DeFi user or a newcomer, Pendle provides tools and resources to empower your financial growth. Join the community and start unlocking the potential of your investments today!

發佈留言

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