利用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. Mggaci表示:

    lasix 100mg pill – oral zyloprim order doxycycline 100mg sale

  2. Cvllcp表示:

    diltiazem over the counter – buy prednisolone 5mg generic buy neurontin 800mg generic

  3. game bai表示:

    I think it is a nice point of view. I most often 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!

  4. Rsfphq表示:

    deltasone 40mg pills – accutane medication amoxil 250mg uk

  5. A thoughtful insight and ideas I will use on my blog. You’ve obviously spent some time on this. Congratulations

  6. Nmugle表示:

    cialis 10mg cheap – sildenafil 200mg for sale sildenafil 100mg usa

  7. Tmgoua表示:

    purchase levothyroxine pill – buy plaquenil online buy plaquenil pills

  8. Umfjql表示:

    order albuterol pills – buy albuterol pills order priligy 60mg

  9. Kxcgwr表示:

    order levitra 10mg generic – clomid uk buy clomiphene 100mg generic

  10. Alvwuh表示:

    buy generic lisinopril 10mg – order lopressor 100mg sale buy generic atenolol 100mg

  11. Rpyzix表示:

    metformin 1000mg cost – buy atorvastatin 10mg online cheap buy norvasc 5mg

  12. Kdxhcd表示:

    plaquenil for sale online – order baricitinib 4mg pill order baricitinib 2mg online

  13. Afnchn表示:

    furosemide brand – ivermectin 3mg stromectol where to buy ivermectin

  14. Oxygeneo表示:

    Amazing! Your site has quite a few comment posts. How did you get all of these bloggers to look at your site I’m envious! I’m still studying all about posting articles on the net. I’m going to view pages on your website to get a better understanding how to attract more people. Thank you!

  15. y2mate表示:

    I am glad to be one of the visitors on this great site (:, appreciate it for putting up.

  16. Sjepuf表示:

    prednisolone ca – buy prednisolone 10mg for sale sildenafil 100 mg

  17. Otcglc表示:

    amoxicillin canada – cheap sildenafil online order sildenafil 150mg

  18. Homerphest表示:

    us online cialis cialis mastercard cialis website

  19. Venbnz表示:

    cheap deltasone 10mg – accutane 10mg over the counter buy accutane 10mg without prescription

  20. Homerphest表示:

    cialis drug plan buy cialis blog usa generic cialis next day delivery

  21. Homerphest表示:

    viamedic cialis cialis where can i buy cialis online in australia

  22. free表示:

    Enjoyed reading through this, very good material. Thanks!

  23. cam表示:

    You are my inspiration , I possess few web logs and very sporadically run out from to brand 🙁

  24. top表示:

    Admiring the time and effort you put into your site and detailed info you offer!

  25. Frgbaa表示:

    cialis buy online – tadalafil 20mg canada modafinil 100mg cost

  26. video表示:

    There is so much to try to understand

  27. Homerphest表示:

    low cost cialis tadalafil 20mg generic cialis

  28. top表示:

    Sometimes, the sheer magnitude of the information seems overwhelming.

  29. free表示:

    Hello there I am so delighted I found your weblog, I really found you by mistake, while I was searching on Google for something else, Anyhow I am here now and would just like to say cheers for a remarkable post and a all round exciting blog (I also love the theme/design), I don’t have time to browse it all at the moment but I have book-marked it and also included your RSS feeds, so when I have time I will be back to read a lot more, Please do keep up the superb work.

  30. Homerphest表示:

    buy cialis no prescription buy tadalafil cialis cheaper

發佈留言

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