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

320 Responses

  1. Xlaemr表示:

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

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

  3. 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!

  4. Hxwque表示:

    cyclobenzaprine 15mg cheap – ketorolac ca inderal uk

  5. 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.

  6. Oumynf表示:

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

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

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

  9. 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!

  10. Ktjgjg表示:

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

  11. 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. . . . . .

  12. 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 .

  13. 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.

  14. Rzzvtq表示:

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

  15. 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.

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

  17. 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!

  18. Lbjmxu表示:

    buy cenforce pills – cenforce cheap domperidone us

  19. AMD Dedicated表示:

    A cool post there mate ! Thank you for posting.

發佈留言

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