Flash Quick Tip: How to randomize an Array

I had to google this today so i though i would share it with you! This snippet of actionscript can be used to simply re-order or randomize an array in Adobe Flash.
var myArray = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9);
myArray.sort(function (){
return Math.round(Math.random());
});
trace(myArray);
ps and yes i know I’ve spelt randomise wrong ; )

Inspired thinking – I Wear Your Shirt

iwearyourshirt Do you remember the guy that created www.milliondollarhomepage.com to get himself through college and pocketed one million dollars? Everyone was jealous because they didn’t think of it first. Well, someone else has updated the concept and it still works! Jason is a web designer from the states who has designed and created www.iwearyourshirt.com. The idea is simple. Everyday he will wear a t-shirt with a company’s name and brand on the front of it. That alone will get you nowhere but Jason has cleverly linked up his idea with blogging and social media platforms to provide really good marketing posibilities. He posts daily on youtube, flickr and twitter to make sure the t-shirt gets noticed. The daily price goes up as the year passes, it originally started a $1, this makes sense as more people will know about the site by December! Top idea Jason. Good luck. (i wonder what he will do with 365 used t-shirts in a years time?)

Goon City – A pixel art world

Ryan Allen is a member of the something aweful forums and together with the forum members has produced a pixel art world. It instantly brings back memories of the original simcity games and is very similar to the works of eboy. Using a few photoshop brushes you can create a plot of land for this map in no time at all. You can tell some of the artists have spent a long time of theirs. I especially love the sense of humour in some of the creations.

a screen shot of goon city

a screen shot of goon city

a screen shot of goon city

The site was originally created with a google maps platform but suffered from a huge hit rate and was taken down. I’m very glad to say it is now back up and surprisingly it is now built using the Microsoft silverlight platform. This is one of the first times i have seen a practical use of the silverlight over adobe flash. A hint of things to come perhaps?

iPhone emulator built with Safari 3

iphone_emulator

Ajaxian recently posted a link to blackbaud.com and the release of an iPhone Browser Simulator. The guys over at blackbaud labs have carefully skinned a full version of safari 3 into a windows compatible program. The iPhone is apparently based on an older version of Safari than the current released one so this provides an excellent way to check your websites compatibility without having to bug your friends who own an iPhone!

Hows to draw a PSP in MS Paint – the good and the bad!

TechEBlog posted another great video where a skilled digital artist draws a Sony PSP by hand in MS Paint. Yes, MS Paint, that well known digital creative tool. It rivals an etch-o-sketch in advanced technology! Surprisingly it turns out quite well. The artist is obviously very talented and spent a long time on it. Then i did a quick search on youtube and found a whole host of copycat videos. These ones are no way near as good but they have a certain charm about them. If you watch them you will soon see what i mean. This is why i love youtube! Ascii art rocks! and of course.. the best til last!

Detect ALL versions of internet explorer 6 with one line of javascript!

One of the projects i am currently working on required me to determine if the user’s browser was Internet Explorer 6 or not. The website’s menu came slightly out of alignment by a few pixels. I would normally use a conditional statement to add extra CSS but since this was a javascript menu my choice was limited to one.. ..change the variable by a couple of pixels! After some quick googling i found a way of doing it by using the user-agent string. The Future of the Web Ā» Detect Internet Explorer 6 in JavaScript This seemed perfect until i read the comments and stumbled across something. I was already aware that there are several different versions of IE6 and IE7 in existance but i didn’t know that some IE7′s return ‘msie 6‘ as it’s user string. An oversight by Microsoft perhaps? Thankfully the user who pointed this out also offered a solution. Kudos to James King (comment number 8)!
var IE6 = (navigator.userAgent.toLowerCase().indexOf('msie 6') != -1)
 && (navigator.userAgent.toLowerCase().indexOf('msie 7') == -1)

A Tasty Blog – This is why you’re fat!

This is why you're fat - blog - logo

heart attack for breakfast?

heart attack for breakfast?

Pizza burger - genius!

Pizza burger - genius!

Thanks goes out to Stephen Fry on twitter for tweeting this amazing website! Thisiswhyyourefat.com A simple but brilliant idea for a blog. Everyone has a weakness when it comes to food, some peoples idea of gastronomy is hardly gourmet, and yet they all look so delicious. Personally, i can’t wait to try a pizza burger. Now where did i leave my cholesterol tablets? ;)

Checklist for a Successful Website Launch

moxie.com

Moxie.com have blogged a useful checklist. They list 13 steps you would do well to consider before launching a website to the world wide web! 13 Steps to a Successful Website Launch via e-moxie.com. I agree with all their points and can think of a couple extra.. 14. Gzip all your javascript (if supported by your server). Otherwise use a javascript compressor to shrink the code. 15. Compress all your CSS using a CSS compressor. Try to compile it into one file and with different media types for print and screen. 16. Remove all your annotations from your code and insert a copywrite comment. 17. Run a broken link checkingĀ  site to find all the problem links. 18. Use a sitemap generator to create your sitemap.xml. 19. Verify your site with google webmaster tools. 20. Finally, don’t forget a favicon! Wow, that’s seven more tips! I hope you find this useful. more posts coming soon..