Fast sorting in AS3

Source http://www.infiniteturtles.co.uk/blog/fast-sorting-in-as3

U
A blog article recently caught my eye over at http://www.simppa.fi on z-sorting that i simply couldn’t resist to pick up on. Simo is someone that has great claims to geek-worship – being one of the awesome team that make up evoflash and having a hand in their latest Severity Of Grey demo, while also progressing with some amazing 3D and particle demos in recent blog posts.
The latest post is about sorting in AS3, and specifically, z-sorting objects that are being drawn in a 3D scene. Having done a fair amount of research on the topic myself while putting together Away3D Lite, I was very interested in seeing an adapted Insertion Sort method that had essentially been laid down gauntlet-style as ‘The fastest way to z-sort and handle objects in AS3′…

Read more >>

Embedding Fonts Using Flash Builder 4

Source http://philperon.com/2009/09/03/embedding-fonts-using-flash-builder-4/

Not too long ago, I struggled with embedding fonts in my AS3 app that I build with Ant. Building my .swfs with Ant has been my practice for quite a while but embedding fonts wasn’t. It took some time but I finally figured it out. Everything was fine until I tried to build using Flash Builder which kept reporting transcoding errors.
So how do you enable proper transcoding of fonts in Flash Builder? Add the following to your compiler options.
-managers flash.fonts.AFEFontManager
If this doesn’t work, let me know…

Read more >>

Accessing TextField.text is slower than a bag of dried ...

Source http://feedproxy.google.com/~r/destroytoday/~3/wkORv3zyk90/

I always assumed accessing TextField.text would be slow, since we’re warned against TextField.text += String in the ASDocs, but I didn’t realize how slow. I switched to my test project for a quick verification. Lo and behold, it’s over 11 times slower than storing to a String variable and accessing that. Here are the results and test code:

TextField.text……………………………454 (100000 iterations)
text……………………………………..41 (100000 iterations)
bag of dried apricots…

Read more >>

Ranged Numbers. Non-Linear response curves for Sliders and ...

Source http://swingpants.com/2009/11/18/ranged-numbers-non-linear-response-curves-for-sliders-and-touchpads/

I’ve been building a few apps recently and have found that a linear response over a range of numbers has been a poor solution. I needed to be able to apply different response curves to user interface components (knobs, sliders, touchpads) as well as on screen display objects, characters, etc.
I needed a good name for the class, but instead came up with the pretty poor moniker ‘RangedNumbers’. I’ll change it when I come up with a better one.
So the idea is, a ‘ranged number’ is instantiated, initialised for the required range then a simple call with a value in that range will result with a percentage that can be applied to the intended recipient accordingly…

Read more >>

Using %tokens% with Flex resource bundles

Source http://dispatchevent.org/mims/using-tokens-with-flex-resource-bundles/

When I use Flex, I make extensive use of Resource Bundles for all but the most basic applications. In short, they allow you to keep all of your static string values (and non-string values) separated out of your code. That way, down the line it’s a very easy change when you want to localize the [...]

Read more >>

Top security threats to Flash/Flex applications and how to ...

Source http://feedproxy.google.com/~r/oreilly/insideria/~3/cgeCPe1uFhg/top-security-threats-to-flashf.html

In this new InsideRIA series I will be covering specific security vulnerabilities, showing examples of how an attacker can abuse Flash/Flex applications, and pointing out ways to help prevent these attacks. The purpose of these articles is to increase awareness so you will take security into consideration when building your applications. In part one we’ll examine cross-domain scripting vulnerability.

Read more >>

Video Processing Tests

Source http://labs.eric-decker.com/2009/11/video-processing-tests/

Recently I did some playing around with video and thresholds, mostly just for fun. I first experimented with just changing the threshold of the video, essentially converting it to black and white. Then I tried comparing the current frame threshold and the previous frame threshold to get the difference. The result looks like an outline/edge effect. It’s an interesting way to visualize movement. Then, just for kicks, I decided to display the previous comparison and the current one, colorizing the current difference as red and the previous as cyan…

Read more >>

Page 20 of 48« First...10«1819202122»3040...Last »