Hyphens are everywhere in our CSS world, and it's a pain. I can't double-click the class names to select them, I always have to hold shift+alt to grab the whole thing. Using shift+alt+left(or right) won't suffice, as hyphens stop selection each bit counts as a word !
This is about development time. Quick selections are crucial for fast development.
As I only adhere to conventions where I find them useful to humanity, I'm sticking to underscore_sweetness to make my editing much faster.
Don't get me started with the "|= attribute selector" because one single good feature is no justification for a permanent handicap while coding.
Ever wondered how to make those smooth looking blur trails with AS3? Well if you did and still don't know, you have just found it. I's done using BitmapDatas drawing a Bitmap with a given BlurFilter in a given Sprite or MovieClip which contains all the contents we want to have the motion blur. Some examples in the internet don't handle this properly because they flood the backgound with a colour, but in this one we are using a custom background to demonstrate how it is implemented. The trick is that the BitmapData must apply the "draw()" method only in a given Sprite or MovieClip where all the contents-to-be-blurred are nested.
The background pattern is a great technique developed by the guys at Bumpslide.
Here is an example of the fine Physics engine for Flash (AS3) named Box2DAS3.
This example demonstrates the implementation of some features required for real game or application development.
Collision detection (and reaction)
Mouse interaction (for all objects)
Keyboard interaction (for the main character - blue ball)
Camera follow (for the main character - blue ball)
Custom graphics (taken at run-time from the Flash library)
Collision detection (and reaction):
To implement collision detection and reaction, one must first initialize a ContactListener class and then modify it to have the collision reactions the way we need. The initial setup is pretty easy:
contact_listener_var = new ContactListener()
Check the source code to see how to reactions are handled.
Mouse interaction is easy to implement, one has only to activate it with the appropriate Box2DAS3 code, check the source for details.
The keyboard interaction had to be implemented manually, at least it was the fastest way I had to obtain the behaviour I required from the main character (the blue ball). To do this I used the great Key class from CASALIB check the source code for details.
It basically consists in moving the Sprite where your Box2DAS3 "world" is nested. Pretty easy. I added a slight easing effect to make it smoother. NOTE: in this example it is disabled when the user clicks an object.
Box2DAS3 objects have a body definition property (class b2BodyDef) which in it's turn has a sub property named "userData" that contains the visual content of your Box2DAS3 object. It's basically a MovieClip. So you may draw graphics in it or addChild a MovieClip from your Flash library into it. Like bodyDef.userData = new SymbolLinkageName();