I started messing around with Conway’s game of life this morning when no projects were assigned to me (I got plenty just before lunch, though). I was pretty bored with the tried-and-true 2-d grid rendering, so I tried the tried-and-true process of exploding the individual cells out into space based on pixel brightness (colors are currently selected randomly from a photo). I’ll probably continue to explore this in the near future to see what I can massage out of it.
I created a simple text animation class this evening that mimics the transition effect found on yugop.com. Type on the second line, then click ‘animate transition’ to watch the top line transition to what you entered.
The text effect now exists in both AS2 and AS3 versions. The timer class in AS3 provides a cleaner way to manage the animation, although I kind of liked normalizing the milliseconds myself.
Alright, so the influence on this is pretty obvious. Type in the text field at the bottom to break your own message. I’m still messing around with the matrix in flash — it really bothers me that I can’t just push/pop and know where I am in space. I ended up using some trig at one point to try to predictably adjust the matrix values. Perhaps I will resort to papervision so I can do simple matrix translations. Anyone who cares to look in to the matter in 2d can download the source.
I am loading a bunch of DisplayObjects and lining them up horizontally by grabbing their .width property and separating each by a certain margin. In doing so, I encountered a bizarre quirk in Flash. Sometimes, Sprites report a massively negative width ( -107373134.4, to be exact ). This occurs when I have attached a DisplayObject that has begun playing a NetStream but has not yet received metaData for the stream (a local .flv). My row gets all confused and places the next object at that massively negative location, which bungles up the rest of the view.
Okay, so the issue was coming from setting the position of the playhead based on the progress of the video before the video had made any progress. Rather than reporting the attempted access of an undefined value, flash decided to try to place the playhead in non-space. While theoretically cool, this prevents practical things from happening. A simple conditional statement fixed things if( video.progress > 0 ) position stuff.
Going back on my promise, I revisited my BitmapSmoke class and created something beyond cheesy. Move the mouse to position the heat/smoke source. Regardless, this one is all AS3 and was used primarily as a means to play around with displacement maps. The included Displacer class accepts a movie clip to displace and a map to displace it with, then updates the displacement every time you call run(). What’s neat is that you can keep updating the map you passed in, thereby animating the displacement. Banners are looking better all the time.