Snippet Saturday: limit() function

Flash 程式設計
很多Action Script的語法

Snippet Saturday: limit() function | dispatchEvent() Blog™

Snippet Saturday: limit() function
Posted on March 5, 2011 by Mims H Wright

So I’m sitting on a bunch of pretty useful code and I’m not sure how to share it with people. I could create a massive library that combines all the miscellaneous bits into a single, poorly documented library, but after looking at the Flash Game Dojo’s wiki, I’m starting to believe more strongly in the idea of releasing code in smaller pieces that achieve a particular function. So, I’m going to try to kick off this idea of #SnippetSaturday. I’m sure I won’t manage to post something every week but I’ll do my best. If you’ve got a blog or just twitter, I’d encourage you to join in too!

Anyway, here’s my first contribution. It’s a simple little function that limits a number between an upper and lower limit.

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *

What is 10 + 7 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)