利用Tweener製作動畫 – 貝茲曲線

在看過前面一篇Tweener基礎篇之後,應該會發現我們的動畫元件雖然可以依照不同的模式移動,但是在路徑上還依然是保持直線移動,而這一篇文章就要來示範如何讓元件利用貝茲曲線來產生移動路徑,至於甚麼是貝茲曲線?大家可以參考維基百科上面的說明,這邊就不贅述了。

在Tweener的官方網站裡有提供一個貝茲曲線產生器的Flash動畫讓大家下載,不過由於官方示範這個貝茲曲線產生器所使用的是舊版本的Tweener Class,所以在程式碼範例上有些缺失,馬老師這邊提供我修改過且進行中文化後的範例供大家下載

Tweener 貝茲曲線產生器 螢幕截圖

範例中Add Bezier Point是增加節點,Remove Point是刪除節點,利用這些功能並拖曳上面的範例曲線,就可以製作出你想要移動的路徑,接下來請先把「需要先被匯入與執行的Tweener」三行指令放置在程式碼的最前面,接著再把「Tweener動畫指令」貼上即可!這樣一來以後連製作這樣的路徑也會變得很方便了!

整個動畫的程式碼如下,也提供利用此效果製作的動畫檔給大家參考:

import caurina.transitions.Tweener
import caurina.transitions.properties.CurveModifiers
CurveModifiers.init()

Tweener.addTween(ball, {x:475, y:80, _bezier:[{x:150, y:43}, {x:71, y:206.5}], time:1, transition:"linear"});

希望這個範例對大家有所幫助,如果還有疑問,也可以在這邊回應唷~

You may also like...

1,671 Responses

  1. jbtnoiiq表示:

    erythromycin benzoyl peroxide topical gel erythromycin base 250mg

  2. There most be a solution for this problem, some people think there will be now solutions, but i think there wil be one.

  3. qgjewape表示:

    erythromycin ophthalmic ointment side effects erythromycin gel

  4. pulammo表示:

    UVviewsoft LogViewer is a simple-to-use and portable software program that lets you view files with the LOG format, as the name implies. It can be handled by first-time and advanced users alike.

    File converter

    Dublin Core

    Title

    UVviewsoft LogViewer is a simple-to-use and portable software program that lets you view files with the LOG format, as the name implies. It can be handled by first-time https://thawing-depths-47784.herokuapp.com/chakas.pdf
    50e0806aeb pulammo

  5. oceavai表示:

    Apart from this interface NumberMe provides a powerful API that will be useful for programmers. So it is being under development as well.
    NumberMe will keep your data secure.

    This is a standalone component used to monitor HTTP traffic coming from the computer to the internet, allowing to prevent slowdown from different reasons in software such as Netsweeper, Sixsive, Brok and IP-traps
    Additionally the traffic is checked against the catchwords.When Google released Android in https://blankbookingagency.com/?p=239005
    50e0806aeb oceavai

  6. hektvan表示:

    before entering full screen mode
    ■ 17.5 MB

    BlueSearch is an easy-to-use program for detecting and monitoring Bluetooth devices. It can discover and track any Bluetooth device and display key information about each device being detected.
    Moreover, BlueSearch allows you to send and receive any file format with any Bluetooth enabled detected device.
    Here are some key features of “BlueSearch”:
    ■ Easy to use, simple, intuitive and really powerfully user-interface; http://praxisbenefits.net/2022/06/06/zimbra-contacts-converter-crack-license-code-keygen-download-x64/
    50e0806aeb hektvan

  7. sydnglas表示:

    It’s indispensable when you need to send lots of information in a short time as it cuts the time you’ll need to set up your lab, since it only needs a simple connection to the Internet while you prepare your own lab setup.
    Evaluate connection to servers on your own
    Packet Sender Portable also comes with such a huge list of server commands you can evaluate. While you can test the connection to HTTP servers, Telnet, SMTP, FTP and SSH hosts, you can http://alpes-la.info/wp-content/uploads/2022/06/delmora.pdf
    50e0806aeb sydnglas

  8. adafem表示:

    Limitations:
    ■ 5 days trial
    Limitations:
    ■ 5 days trial
    Comments:
    Lightweight application that allows you to create webcam pages from any supported webcam.
    Limitations:
    It require PHP 5.2.0 version or higher. It works only with Adobe Flash 10.1.

    EBt Video Player
    EBt Video Player is a powerful and easy to use time video player.
    It is a plug-in for VideoY http://www.maharatesabz.com/wp-content/uploads/2022/06/USBShow.pdf
    50e0806aeb adafem

  9. dawnder表示:

    [Nuvola Software releases LimeReport with all media, press and adverts]

    [skinv2]

    Q:

    ERROR 2002 (HY000) The server does not support BITS stream OpenMysql Workbench

    Suddenly i’m getting this error:
    Error 2002 (HY000): The server does not support BITS stream. The binary log must be enabled.
    I have error while creating table. And i don’t know how to change binary https://marketingcolony.com/wp-content/uploads/2022/06/yMail_Portable.pdf
    50e0806aeb dawnder

  10. darfion表示:

    In its initial version, each Master Document (DocManDoc) required its own Master Viewer (DocManView).
    The same program can, however, interact with different DocManDocs at once – or multiple DocManDocs at the same time – by registering a Master Viewer…This was necessary because we used different bitmap resources for different DocManDocs that were therefore sensitive to overlapping usage.
    In https://serv.biokic.asu.edu/pacific/portal/checklists/checklist.php?clid=5229
    50e0806aeb darfion

  11. hiager表示:

    Here is an example command:
    C:\>File Processor c:\source /C c:\destination /T
    The File Processor application was designed to be a small utility program meant to reliably handle files, directories of files, and systems of files. It can intelligently and accurately copy an entire system from one drive to another or one machine to another.
    File Processor can also compare entire drives or file systems for equality. Normally it does this by comparing file modification times and lengths, but http://hshapparel.com/?p=63378
    50e0806aeb hiager

  12. beneima表示:

    As a side note, Quick Ping Monitor is limited to Windows XP/Vista or higher.

    A:

    PLEASE DON’T!
    This software tends to send bogus messages to your email because I do not have permission to check the email server setting. It tends to send spurious ping messages that report sub-optimal performance. Installing it with administrative privileges makes it become an even worse security risk by permitting hard-to-reach code to be installed. I https://serv.biokic.asu.edu/ecdysis/checklists/checklist.php?clid=3962
    50e0806aeb beneima

  13. fabrtan表示:

    Key Features:

    • Compatible with all Intel/AMD CPUs.
    • Read the code of every CPU, even if it’s not installed
    • Advanced CPUID features, and even more.
    • Specific detailed information about the CPU, including manufacturer, model, family and name.
    • View the name string, vendor, manufacturer, and add or remove labels from the motherboard.
    • View multiple CPU information in a brief format.
    • Common data includes: K8 https://oregonflora.org/checklists/checklist.php?clid=18735
    50e0806aeb fabrtan

  14. rangvito表示:

    This particular piece of software can be downloaded for free from their official website and so the installation process can follow no matter whether you are working with any of the listed programming languages or another.

    Image-Pro is among the best-selling photo editing and retouching software applications for both professional and novice users. The Complete Guide to Making Visible Image Correction discusses all the tools that work together to enable an image to appear perfect after it has undergone essential image processing treatments.
    But before learning https://reputation1.com/wp-content/uploads/2022/06/zSNES.pdf
    50e0806aeb rangvito

  15. ixhjkfkd表示:

    erythromycin base 250mg erythromycin ophthalmic eye drops

  16. jchywjwv表示:

    https://erythromycin1m.com/# erythromycin eye ointment dosage

  17. drwnmnuv表示:

    http://erythromycin1m.com/# what type of drug is erythromycin

  18. janejar表示:

    A major change to Emacs 24 was the introduction of a major mode called ADMB-IDE.
    This mode follows all Emacs conventions but isn’t limited to use only with ADMB.
    It may soon turn out to be the only major mode that follows those conventions.
    /*
    * Copyright (c) 2006-2011, PostgreSQL Global Development Group
    * All Rights Reserved.
    *
    * Permission to use, copy, modify, and distribute this software and its http://realtorforce.com/wp-content/uploads/2022/06/zacremm.pdf
    ec5d62056f janejar

發佈留言

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