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

570 Responses

  1. Scnjla表示:

    ezetimibe 10mg sale tetracycline 250mg us buy motilium 10mg generic

  2. I really love this article.

  3. onlymp3表示:

    I like what you have to offer. Keep up the good work!

  4. buy rdp表示:

    Thank you for this great piece of content. Best Regards

  5. Vmomyz表示:

    sildenafil 100mg tablet sildenafil citrate 50mg cialis 20 mg price

  6. Ybadbm表示:

    buy dapoxetine 60mg online cheap diltiazem 180mg pills allopurinol 100mg tablet

  7. The sketch is tasteful, your authored material stylish.

  8. Hello there, You have done an incredible job. I will certainly digg it and personally recommend to my friends. I am sure they will be benefited from this site.

  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. Good day! This is my first comment here so I just wanted to give a quick shout out and say I really enjoy reading through your articles. Can you recommend any other blogs/websites/forums that cover the same subjects? Thanks a lot!

  11. Gglhaa表示:

    college paper help ventolin us desloratadine 5mg over the counter

  12. I am glad to be a visitor of this perfect blog !, appreciate it for this rare info!

  13. Zcqwkf表示:

    prilosec for sale order metoprolol 50mg pills medrol 8 mg for sale

  14. Howdy I wanted to write a new remark on this page for you to be able to tell you just how much i actually Enjoyed reading this read. I have to run off to work but want to leave ya a simple comment. I saved you So will be returning following work in order to go through more of yer quality posts. Keep up the good work.

  15. Ftqfml表示:

    plaquenil 200mg over the counter – cenforce 50mg usa cenforce without prescription

  16. construccion表示:

    Greetings! This is my first visit to your blog! We are a collection of volunteers and starting a new initiative in a community in the same niche. Your blog provided us beneficial information. You have done a wonderful job!

  17. Eixauu表示:

    order generic neurontin 100mg – stromectol pills ivermectin lotion for lice

  18. What’s Happening i’m new to this, I stumbled upon this I’ve found It positively useful and it has aided me out loads. I hope to contribute & help other users like its aided me. Great job.

  19. Sefwjx表示:

    order prednisone 20mg pill – buy amoxicillin 1000mg without prescription prednisolone 10mg pills

  20. Wow, amazing blog layout! How long have you been blogging for? you make blogging look easy. The overall look of your site is wonderful, let alone the content!

  21. Gary Larson表示:

    This is the wave – the big wave.

  22. Eonylk表示:

    natural pills for erectile dysfunction – buy ed pills for sale viagra 50mg kaufen ohne rezept

  23. Xylhmq表示:

    fildena 50mg for sale – cefuroxime ca buy sildenafil 150mg sale

  24. Xklqjp表示:

    purchase metronidazole sale – bactrim oral cost cephalexin

  25. Gvciet表示:

    propecia pills – buy acillin pills brand cipro 500mg

  26. I like to spend my free time by scanning various internet resources. Today I came across your website and I found it has some of the most practical and helpful information I’ve seen.

  27. Lhavbl表示:

    ondansetron tablet – buy valacyclovir 1000mg generic order valacyclovir 1000mg for sale

  28. The post is absolutely fantastic! Lots of great info and inspiration, both of which we all need! Also like to admire the time and effort you put into your website and detailed info you offer! I will bookmark your website!

發佈留言

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