利用Tweener製作動畫 – 即時時鐘

前面已經介紹了很多利用Tweener所產生的動畫方式,接下來的幾篇文章,馬老師將會分享一些利用Tweener所製作出來的效果給大家參考,相信只要用心,大家都可以做出很酷的效果!

Tweener 即時時鐘 範例

主要利用Tweener和Flash擷取時間的功能,製作了一個時鐘,最主要是秒針移動的效果。

import caurina.transitions.Tweener;

pointerFn();
function pointerFn()
{
	var now:Date = new Date  ;
	var nowH:int = now.hours;
	var nowM:int = now.minutes;
	var nowS:int = now.seconds;
	pointerH.rotation=nowH*30+(nowM*6/12);
	pointerM.rotation = nowM * 6;
	pointerS.rotation = nowS * 6;
}

setInterval(clockFn,1000);
function clockFn()
{
	Tweener.addTween(pointerS, {rotation:pointerS.rotation+6, time:0.5, transition:"easeOutElastic"});
	if (pointerS.rotation == 0)
	{
		pointerFn();
	}
}

即時時鐘 原始檔 下載

You may also like...

4,119 Responses

  1. Just stumble upon your blog from from time to time. nice article

  2. I encountered your site after doing a search for new contesting using Google, and decided to stick around and read more of your articles. Thanks for posting, I have your site bookmarked now.

  3. Cnnizm表示:

    order tadalafil 20mg online cheap – mobic order online order flomax generic

  4. An interesting discussion is worth comment. I feel that it is best to write more on this matter, it may not be a taboo topic however typically persons are not enough to speak on such topics. To the next. Cheers

  5. News Sports表示:

    That’s some inspirational stuff. Never knew that opinions might be this varied. Thanks for all the enthusiasm to supply such helpful information here.

  6. Yhflsr表示:

    purchase levaquin online cheap – purchase levaquin generic order tadalafil 10mg pills

  7. Someone essentially lend a hand to make severely articles I would state. That is the first time I frequented your website page and so far? I surprised with the research you made to make this actual publish incredible. Great activity!

  8. Ojagsb表示:

    losartan ca – losartan pills promethazine drug

  9. A wholly agreeable point of view, I think primarily based on my own experience with this that your points are well made, and your analysis on target.

  10. Xlaemr表示:

    order plavix pill – order coumadin 5mg without prescription buy metoclopramide 10mg generic

  11. Thanks so much for this, keep up the good work 🙂

  12. My brother suggested I might like this websiteHe was once totally rightThis post truly made my dayYou can not imagine simply how a lot time I had spent for this information! Thanks!

  13. Hxwque表示:

    cyclobenzaprine 15mg cheap – ketorolac ca inderal uk

  14. Thanks for some other great post. Where else may anybody get that kind of information in such an ideal method of writing? I’ve a presentation next week, and I am at the look for such information.

  15. Oumynf表示:

    isotretinoin ca – isotretinoin 10mg sale buy tetracycline 250mg online cheap

  16. How long does it take you to write an article like this?

  17. Sometimes, the sheer magnitude of the information seems overwhelming.

  18. admin rdp表示:

    it is a really nice point of view. I usually meet people who rather say what they suppose others want to hear. Good and well written! I will come back to your site for sure!

  19. Ktjgjg表示:

    provigil 100mg for sale – fda approved over the counter ed pills rhinocort cheap

  20. Whats up very cool website!! Guy .. Beautiful .. Superb .. I will bookmark your web site and take the feeds additionallyKI am satisfied to find numerous helpful info right here within the submit, we’d like develop more techniques on this regard, thank you for sharing. . . . . .

  21. hire a hacker表示:

    Hello my friend! I wish to say that this post is amazing, nice written and come with approximately all vital infos. I would like to see extra posts like this .

  22. hire a hacker表示:

    It’s truly a great and helpful piece of information. I am satisfied that you just shared this helpful info with us. Please stay us informed like this. Thanks for sharing.

  23. Rzzvtq表示:

    sildenafil 100mg for sale – viagra 50mg for sale cialis tadalafil 40mg

  24. I just sent this post to a bunch of my friends as I agree with most of what you’re saying here and the way you’ve presented it is awesome.

  25. Just stumble upon your blog from from time to time. nice article

  26. This is really interesting, You’re a very skilled blogger. I have joined your feed and look forward to seeking more of your fantastic post. Also, I have shared your website in my social networks!

  27. Lbjmxu表示:

    buy cenforce pills – cenforce cheap domperidone us

  28. AMD Dedicated表示:

    A cool post there mate ! Thank you for posting.

發佈回覆給「buy rdp online with paypal」的留言 取消回覆

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