We’re using the random object for many things, by its nature it may repeat a number, but sometimes we don’t want to get the same number more than once, for example when showing a random image out of an array of images, or jumping to...
Category: class
Pure code AS3 spinning loading animation
While working on the video player, I wanted to show spinning loading animation while buffering, and since I decided that the whole thing will be pure code, with no library assets, I had to code this animation – just the kind of things I like....
Glossy buttons in pure as3 code
I’ve been playing with the drawing classes, experimenting gradients and blending modes, and so I put together a small (basic) as3 class that generates a glossy button with pure code – no library assets. You can download the class here. The class constructor expects only...
ResizeManager – simple scaling engine for MovieClips
Flash objects (SWF) can fill the entire Html body, and scale along with browser window as you resize it (it’s done by setting width and height attributes to 100% in the embed tags). However unless scaleMode is properly defined as well, the outcome may look...
Hunting swf memory issues – take ‘em down!
In one of my current projects I’m experiencing a ‘memory waste’ issue, after a basic efficiency re-writing did not solve the problem, I began reading about how flash handles scope chains and memory, and found this very interesting article ‘Scope Chain and Memory waste in...
Flash – Highlighting a string in a textfield
Jack Doyle at greensock shared a really cool AS2 class he calls ‘TextMetrics’ – sounds promising ha?The class calculates x/y coordinates of a string in a textfield, allowing highlighting it or calculating rows width.. nice.Check out his example. Thanks Jack!