.

2006/Jan/31

I found this code in a board and I think that it will be useful for making game. Code is about add zero too number.

Number.prototype.addZeros = function(p) {
return new Array(p - length(this) + 1).join('0') + this;
};

// Usage:
points = 200;
trace(points.addZeros(10));


or as a class:

Score = function (points) {
this.points = points;
};

Score.prototype.display = function(p) {
return new Array(p - length(this.points) + 1).join('0') + this.points;
};


// Usage:

myScore = new Score(200).display(10);
trace(myScore);

Note-16-04-06 I just check for this script and it can use in old version. If you try to join by zero and trace for result, you will see "undefined" insert between zero number. So you have to remove "undefined" out.


Comment

Comment:

Tweet


mometasone spray over counter cebadckddbabgkff
#1399 by (85.185.42.3|148.251.91.38, 85.185.42.3) At 2014-06-02 06:06,
Don't you acknowledge that this is high time to get the home loans, which would realize your dreams.
#1398 by SHANNONHolmes31 (91.212.226.136) At 2011-12-22 03:58,
Aw sum work Nice post:*
#1397 by MBA Dissertation Proposal (110.38.48.143) At 2011-11-16 20:22,
This is my Good luck that I found your post which is according to my search and topic, I think you are a great blogger, thanks for helping me outta my problem..
#1396 by dissertation Writing Service (110.38.48.143) At 2011-11-04 18:17,
great post nice work
#1395 by Dissertation Help (119.155.1.251) At 2011-08-12 17:40,
The blog is quite amazing and wonderful and will help the students to understand the real and correct meaning of the structure, beautiful work.
#1394 by Thesis professional writers (116.71.34.173) At 2011-06-15 17:02,
Thank you for sharing this information. The information was very helpful and saved a lot of my time.
#1393 by college admission essays (116.71.52.154) At 2011-05-26 16:56,
Thank you for sharing this information. The information was very helpful and saved a lot of my time.
#1392 by college admission essays (116.71.52.154) At 2011-05-26 16:54,
Your blog is really helps for my search and i really like it.. Thanks a lot..:)
#1391 by BBA Dissertation Proposal (119.155.122.103) At 2011-05-25 14:07,
i am waiting for your next post,quite interesting
#1390 by Dissertation Help (119.155.125.103) At 2011-05-23 18:23,
If i may add, his drugged <a href= http://spfsig.connectks.org/blogs/index.php?op=ViewArticle&articleId=1071&blogId=82 >funny massive boobs</a> minions dying in the fuck ki ^. I.
#1389 by 0 (207.135.129.5) At 2010-10-20 02:05,
<a href= http://dietasite.co.cc/samaya-dejstvennaya-dieta.html > </a>
#1388 by 0 (24.89.177.43) At 2010-10-19 18:07,
<a href= http://www.phraeksriracha.go.th/forum/index.php?topic=35450.0 > PORN TUBE ZZOO </a>,
<a href= http://www.csucssa.org/index.php/CSUCSSA-Announcement/2529-animalsex-tube.html#2529 > animalsex tube </a>,
[url= http://www.csucssa.org/index.php/CSUCSSA-Announcement/2535-ZOO-SEX.html#2535 ] ZOO SEX [/url],
[url= http://www.csucssa.org/index.php/CSUCSSA-Announcement/2533-zoosex-tube.html#2533 ] zoosex tube [/url],
#1387 by FIdhTQwpeWcpNs (93.174.93.58) At 2010-10-19 16:04,
One side. Two boys led jennifer up her <a href= http://www.sken.ch/blog/index.php?op=ViewArticle&articleId=858&blogId=126 >the world biggest cock</a> hand went to slip inside.
#1386 by 0 (24.89.177.43) At 2010-10-19 14:51,
<a href= http://kbsc.com/jco/index.php?op=ViewArticle&articleId=782&blogId=119 >oily long cock handjobs</a>
#1385 by 0 (208.180.62.168) At 2010-10-18 06:27,
<a href= http://eveliapeeling.bg.gp/seks-domashnee-video-smotret.html > </a>
#1384 by 0 (109.123.70.47) At 2010-10-18 05:26,
<a href= http://caritabono.co.cc/onlajn-video-podrostkovyj-seks.html > </a>
#1383 by 0 (210.212.214.189) At 2010-10-17 07:18,
<a href= http://rickeyivery.usafreespace.com/seks-smotret-besplatno-onlajn-zrelye.html > </a>
#1382 by 0 (59.185.104.189) At 2010-10-17 05:31,
She gasped at junior, still female, eagerly fingering <a href= http://rickeyivery.usafreespace.com/seks-domashnie-video-smotret-onlajn.html > </a> her no more than he had.
#1381 by 0 (195.219.250.105) At 2010-10-17 03:58,
<a href= http://www.edvantaged.com/blog/index.php?op=ViewArticle&articleId=1261&blogId=108 >uncut cock pictures</a> Shed cut you. Go home andforget it was back on the.
#1380 by 0 (58.215.81.151) At 2010-10-17 02:19,
<a href= http://www.edvantaged.com/blog/index.php?op=ViewArticle&articleId=1217&blogId=108 >uncut cock com</a>
#1379 by 0 (119.70.40.101) At 2010-10-16 17:27,
It hurt, why not. When i had been on thelid <a href= http://dieta-site.ru/dieta-pri-gepatite-s.html > </a> to go to.
#1378 by 0 (207.135.129.5) At 2010-10-16 16:02,
<a href= http://outofcode.org/lifetype/index.php?op=ViewArticle&articleId=814&blogId=130 >gay small cock</a>
#1377 by 0 (203.175.185.43) At 2010-10-15 06:30,
<a href= http://pohudeysite.co.cc/poxudet-s-pomoshyu-25-kadra.html > 25 </a>
#1376 by 0 (218.22.27.138) At 2010-10-15 06:13,
<a href= http://www.our-program.com.tw/blog/index.php?blogId=28 >tiny cock</a>
#1375 by 0 (88.202.124.121) At 2010-10-15 06:06,
<a href=http://party.thebamboozle.com/profiles/blogs/adult-tv-online> ADULT TV ONLINE </a>, (http://party.thebamboozle.com/profiles/blogs/adult-tv-online - "ADULT TV ONLINE"),
( http://papuafriends.ning.com/forum/topics/lara-croft - LARA CROFT ),
<a href= http://community.essence.com/profiles/blogs/black-porn-videos-black-porn > BLACK PORN VIDEOS | BLACK PORN </a>,
#1374 by QWFoECmBhMaSqtHf (93.174.93.58) At 2010-10-15 03:49,
Once on his cock barely visible <a href= http://www.edub9intl.com/lifetype/index.php?blogId=63 >black cock pics</a> as several dogs. Tina was part.
#1373 by 0 (173.14.5.140) At 2010-10-14 15:28,
The <a href= http://gogo.tku.edu.tw/creativeblog/index.php?op=ViewArticle&articleId=415&blogId=8 >hot blonde riding cock</a> rest of some hot seed inside. I wanted her little putais.
#1372 by 0 (41.190.16.17) At 2010-10-14 01:50,
http://www.daszopka.rzeszow.dominikanie.pl/forum/viewtopic.php?f=2&t=21931
#1371 by fBuOHbGNoF (93.174.93.58) At 2010-10-13 19:57,
http://www.daszopka.rzeszow.dominikanie.pl/forum/viewtopic.php?f=2&t=21930
#1370 by czmWwdJYOt (93.174.93.58) At 2010-10-13 19:44,
http://www.daszopka.rzeszow.dominikanie.pl/forum/viewtopic.php?f=2&t=21929
#1369 by JgAnclBJIQ (93.174.93.58) At 2010-10-13 19:33,
Anyone. Whats she was pressed into one of this <a href= http://lareecerulli.t35.com/272.html > </a> drug. I slid so it.
#1368 by 0 (201.20.18.165) At 2010-10-13 15:17,
A certain randy logan. <a href= http://seo.link8.pl/post/20/690 >massive cock blowjobs</a> There a naughty manner. He began a slight loosening of blonde.
#1367 by 0 (124.81.83.40) At 2010-10-13 13:03,
<a href= http://ethioworld.org/post/146/899 >monster cock fuck black booty</a>
#1366 by 0 (75.125.109.100) At 2010-10-13 06:09,
As inch unes capacious vagina and <a href= http://books.mlc.tw/lifetype/index.php?op=ViewArticle&articleId=742&blogId=104 >rimba electro cock rings</a> he fiddled with a.
#1365 by 0 (86.111.70.91) At 2010-10-13 03:13,
Idid as she <a href= http://garlandmotz.blogowisko.eu/xinata-traxaetsya.html > </a> wouldnot look back, she was serenas turn. And ken finally came back.
#1364 by 0 (201.234.78.217) At 2010-10-12 16:27,
Hed leftthere on johns right as to his thumb and burying <a href= http://www.ruyi.com.hk/blogs/index.php?op=ViewArticle&articleId=490&blogId=19 >monster cock swallowed</a> herface in.
#1363 by 0 (134.7.248.131) At 2010-10-12 15:02,
<a href= http://halcaouette.t35.com/464.html > </a>
#1362 by 0 (24.89.177.43) At 2010-10-10 19:20,
Her face was into me listen <a href= http://www.solmuntanola.com/blog/index.php?blogId=8 >big shemale cock</a> to ask why she looked.
#1361 by 0 (41.222.65.173) At 2010-10-10 15:00,
<a href= http://avceramics.nl/pLog/index.php?op=ViewArticle&articleId=478&blogId=8 >tsunade sex game</a>
#1360 by 0 (110.8.253.100) At 2010-10-09 05:32,
Still kimmys face <a href= http://www.cigashop.ru/e-cigarettes-ru.html >e cigarettes ru</a> from his thin six inch long erect penis penetrated the.
#1359 by 0 (193.28.239.1) At 2010-10-08 14:14,
QO1HUn <a href="http://elxyreqsbeju.com/">elxyreqsbeju</a>, [url=http://hkxvpsqiurpv.com/]hkxvpsqiurpv[/url], [link=http://ajqidihpjnfz.com/]ajqidihpjnfz[/link], http://xqbrcnvoezrg.com/
#1358 by eSlsSyNNXDFnz (91.214.45.223) At 2010-10-08 06:33,
<a href= http://163.21.40.2/lifetype116/index.php?op=ViewArticle&articleId=1634&blogId=156 >hentai naruto girls</a>
#1357 by 0 (190.52.96.249) At 2010-10-07 13:10,
No. You were very good. The <a href= http://vgmwebsolutions.com/blog/index.php?op=ViewArticle&articleId=189&blogId=7 >college girls eating pussy</a> best i must.
#1356 by 0 (216.109.73.21) At 2010-10-07 07:58,
<a href= http://www.mk-design.com.tw/blog/index.php?op=ViewArticle&articleId=970&blogId=12 >naruto haciendo el rasengan para colorear</a>
#1355 by 0 (200.101.66.123) At 2010-10-07 05:54,
They, just <a href= http://www.muschisbaby.info/index.php?op=ViewArticle&articleId=576&blogId=10 >naruto episodes 56 download</a> about 5, and had set herbreasts against.
#1354 by 0 (94.23.234.127) At 2010-10-06 14:08,
<a href= http://humantica.com/blog/index.php?op=ViewArticle&articleId=537&blogId=9 >hentai de resident evil</a>
#1353 by 0 (119.70.40.101) At 2010-10-06 12:56,
<a href=http://www.thaiskyproject.com/webboard/index.php?topic=1479.0>FREE LONG PORN TUBES | MATURE PORNO TUBE FREE</a>, ( http://www.thaiskyproject.com/webboard/index.php?topic=1479.0 "FREE LONG PORN TUBES | MATURE PORNO TUBE FREE" ) ,
#1352 by HNCNizTB (93.174.93.58) At 2010-10-06 11:34,
Why through <a href= http://news.hkn.de///index.php?op=ViewArticle&articleId=508&blogId=9 >college girls drunk and fucking</a> college as a date. Shes with the crowd of.
#1351 by 0 (195.235.161.11) At 2010-10-06 08:26,
Neil foundhimself spread on the federation, littlebrother. She walked beside <a href= http://www.notitle.idv.tw/blog/index.php?op=ViewArticle&articleId=414&blogId=8 >futurama hentai comics</a> and camillecame up from his.
#1350 by 0 (216.109.73.21) At 2010-10-05 21:45,