What a nice title! I have updated my blog design. No, there are no shocking new features, just a more fresh and more cleaner design. Yes, it is still black and in the ‘stroep’-style, but I think it is really a little bit better. I think it is important too keep improving, so I hope you like it. I added some nice icons in the sidebar and jQuery rollovers. I have added rounded corners (only shown in modern browsers) and I really think it makes the site more friendly, which should be a good thing ๐
For all guys who use IE6, I have added a nice message for you. You cannot see my site anymore. It’s not a personal thing, but I really think this year we should all ban old crappy browsers. It would not take long till I show this message for IE7 too and some other out-dated browsers too. Let us update and enjoy fast modern browsing with new possibilities.
I have removed more Google ads from the blog. There were some ads between the posts and on the post-page. Now I have only 1 banner at the bottom of the sidebar. Yes; I have 2000 unique visitors in a month and no; I don’t earn a lot money with it, so basically the ads are useless. I dislike banners too, but still I hope to have a big hit one day and my ad is ready to be clicked (kidding) For real; one day I had the illusion I could be rich by placing these ads on my blog. But I’ve realized most people on my blog are looking for products, but looking for sources and inspiration. This site doesn’t target banner-clicking-people. I hope you are happy with it.
For a while now, I am experimenting with this new experiment. I created an algorithm with nested sinus/cosinus, to show of some cool 3d looking particles (no there is no 3d in it). It is amazing to see how many particles flash can move. I used components from bit-101 to have some interaction.
I created a useful util-class to make delayed function calling easy. You can make a chain of functions, by adding them with a delay in milliseconds. This chain can be executed multiple times, even in reversed order.
Let’s take a look at a simple example of Chain. var myChain:Chain = new Chain(); myChain.addEventListener( Event.COMPLETE, onComplete); myChain.add(one, 2000).add(two, 500).add(three, 1000).play(2);
function one():void { trace(“one”) } function two():void { trace(“two”) } function three():void { trace(“three”) } function onComplete(e:Event):void { trace(“done.”) }
/* trace output: one two three one two three done. */
What is happening here? At the first line we are instantiating the class, and the second line represents what chain does. There is a public function called ‘add’, which is an important part of the class. add(one, 2000) means: execute a function called ‘one’ after 2000 milliseconds. add(two,500).add(three,1000) are functions that are called after one is finished, with other delays. You can create your own rhythm/sequence/pattern. At the end we see play(2), which means: Execute the sequence of functions defined before, and repeat them 2 times. After that, dispatch event COMPLETE.
So that’s basically it. A cool part is you can play it reversed, using playReversed(). I am inspired by jQuery (which has nothing to do with this) to enable the ability to stick functions, but thats optional. myChain.playReversed(2);
/* trace output: three two one three two one */
Of course you can pauze/continue when you are playing, by calling stop() / doContinue(), and you can determine if it is currently playing using the isPlaying-getter.
These are all the public functions. /// Constructor public function Chain()
/// Adds a function at a specified interval (in milliseconds). public function add(func:Function, delay:Number = 0):Chain
/// Start playing the sequence and calling functions public function play(repeatCount:int = 0):void
/// Start playing the sequence reversed public function playReversed(repeatCount:int = 0):void
/// Clears sequence list. Data will be removed. public function clear():Chain
/// Stop playing, use doContinue to play futher from current point public function stop():void
/// Continue playing after a stop public function doContinue():Chain
/// Reset indexes public function reset():void
/// Returns the string representation of the Chain private vars. public function toString():String
/// Return chain is playing, stopped or completed public function get isPlaying():Boolean
Hope you like it, let me know if you like to see extra/other related features.
Updates – Private functions are protected – add-functions is now add(function, delay), where function is required. – Class now extends EventDispatcher and play/playReversed dispatches Event.COMPLETE after playing sequence, instead of calling onComplete function – Cleaned up code
I’ve updated my Image class. It is irritating flashsites break the right-click contextmenu. Well, I can’t fix that and Adobe should look at that, but I think it would nice to add some of the browser – features to my image class.
Currently I have these options added to the Image class:
View image Views image in new window/tab. I used NavigateToURL to make this happen.
Save Image as.. Saves image on your computer. I used my ImageClass.saveLocal() to make this happen. This is only available within FP10, but I think this is no problem anymore because < a href = "http://www.adobe.com/products/player_census/flashplayer/version_penetration.html" > 93 % (September 2009) has FlashPlayer 10, so most people have it, and I don’t support outdated software ๐
Copy Image location Copies the url to the clipboard, using System.setClipboard(url). It’s a pity I can’t create a ‘Copy Image’ function, because pushing bitmapdata into the clipboard is only supported in AIR.
Send Image Sends the url to the mail-client, using “mailto:&body=” + src. Also a pity; I can’t add the image directly into the mail.
How to enable the contextmenu: import nl.stroep.utils.Image;
var myImage:Image = new Image(“myImage.jpg”); myImage.enableContextMenu = true; // enable it! this.addChild(myImage); I still love this class, I use it a lot. I want to encourage you to please add these kind of usability things to your apps / websites. And share them! Yes, it takes some extra time to create/add it, because this IS the finishing touch, but a lot of people will like this kind of features.
I found out the getBounds()-function gives not exactly the right rectangle with a TextField. It always matches the border bounds, even if the borders are invisible. So I’ve created a more accurate function using getColorBoundsRect().
Click on the words. Switch between getRect() and getTextFieldBounds() by clicking on the buttons below to see the difference.
Tiger represents power. I love to express strong animals with powerful lines. This one is created with actionscript (flash). I edited the composition with photoshop to add the text and changed contrast. The lines and letters are created generatively, using mouse gestures and random movements. I have worked hard to create this image, it is full with details, full of lines. Hope you like it.