It uses a hybrid of legacy AS2 modules and required integration with AS3, which I brought up-to-date and solved the intercommunication restrictions between Adobe Flash AVM1 and AVM2 (AVM – ActionScript Virtual Machine) by using a LocalConnection object as a proxy. Hopefully we’ll be adding more features soon!
I recently stumbled upon an old bit of code which demonstrates a technique I created for an efficient scrolling data grid for the YouView TV platform. I call it ‘Blit Scrolling’. Below is a demo of the concept (click on the window and use the arrow keys to scroll around):
Continue reading Optimal scrolling for 2D games or UIs
A common oversight when using Bitmaps with loaded content is that Flash will revert a Bitmap’s smoothing parameter to false when you replace its bitmapData. It’s simple enough to fix, but since you may not know if someone is going to replace the bitmapData of a Bitmap you have created – then it’s often better to code defensively around it.
This little SmoothBitmap class is for just such an occassion. Instantiate it like a regular Bitmap and, no matter what another developer does with it, smooth pixels when scaling/rotating will be ensured.
I was recently creating an API that required extending TextField and happened across the getRawText() method. I assumed this returned the text from the field without formatting or something – so I looked up the AS3 docs for flash.text.TextField.
Nothing there – gee thanks Adobe. A quick search turned up this which, it turns out, isn’t quite accurate.
So, with a tad of testing, it appears that getRawText() returns the text, stripped of any HTML tags (if you had set htmlText). I now wonder if this is faster than using a RegEx to strip the tags and why Adobe didn’t document it?