Help TapDoctor to beat the viruses that have escaped from his laboratory.
They are very bad but when they are more than two they are not able to agree.
Tap where you have to join and exterminate them. Continue reading
Category Archives: Flash
A Performance test class for AS3 Mobile dev
I currently need to do some bench to optimize my iPhone game. (TapDoctor
)
So I’m working on a simple class to facilitate the work, inspired by the Grant Skinner performance test, but with the mobile constraint : be as light as possible.
Continue reading
Time management for as3 mobile dev – Tick, Timeout and Interval
While working on my iPhone game project I realized that AIR 2.7 for IOS introduced bug with the Timer class and setTimeout.
So I wrote 3 static classes : Tick, Timeout, Interval class to bypass the problem. (With a big thx to @seraf_NSS for test, debug and enhancements)
Continue reading
A Timeout class to replace setTimeout in AIR 2.7 for IOS
After a first compilation of my AIR for IOS app with AIR 2.7 the situation was not good.
The application that was developed and optimized for AIR 2.6 was not smooth at all
A few tests later, I isolated the problem: The setTimout() method does not work properly (?) in AIR 2.7 for IOS.
Continue reading
AS3 Error Manager with UncaughtErrorEvent – ErrorHandler 0.2
Some modification on my ErrorHandler class – sources.
AS3 Error Manager with UncaughtErrorEvent
This class has been updated -> ErrorHandler 0.2
With flash player 10.1 an UncaughtErrorEvent object is dispatched when an uncaught error occurs.
Here is a small class for displaying errors within the application based on selected parameters …
Sources on Github
Continue reading
Deform your friends face with warpalizer alpha
Un petit post pour présenter un petit projet perso.
Warpalizer est une appli facebook qui permet de déformer ses photos et celles de ses amis. Actuellement en version alpha, l’appli est destinée à évoluer…
Continue reading
Why flash is not dead
I keep reading “Flash is dead” or “Flash is no use anymore”. Do they actually know what they’re talking about? Are they Flash experts, have they worked with real clients? I don’t think they do, are or have. How to bury the most innovative technology, which has inspired the current developments and uses of javascript, although it is currently the only way to offer a true rich web user experience.
Continue reading
Easy Fullscreen on a specific DisplayObject, deal with overlay and use hardware acceleration
There is several ways to show a specific zone/object in a Flash application in full-screen mode. The problems are to use hardware acceleration (interesting for video), to deal with possible overlay (display object above the target we want to show in full-screen mode) or to avoid with UI pixelization. And we have to consider various player versions and hardwares…
Continue reading
Simple component invalidation in AS3
When we develop components, it quickly becomes necessary not to update the display every time we change a parameter.
For example, this code calls three times my draw method :
1 2 3 | myComps.width = 100; myComps.height = 100; myComps.color = 0xFF0000; |
Mmmm ? Stupid ?
The solution is to wait for the next enterFrame event to update the display.
The UIComponent that is the base of Flash components offers all the methods to do this, but the last thing I want is to use them.
Here’s how to set up a simple invalidation:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | package { import flash.display.Sprite; import flash.events.Event; public class InvalidateSprite extends Sprite { private var _width:Number = 150; private var _height:Number = 100; private var _color:Number = 0xCCCCCC; public function InvalidateSprite(){ _invalidate(); } public override function set width(value:Number):void { _width = value; _invalidate(); } public override function set height(value:Number):void { _height = value; _invalidate(); } public function set color(value:Number):void { _color = value; _invalidate(); } private function _draw():void { graphics.clear(); graphics.beginFill(_color, 1); graphics.drawRect(0, 0, _width, _height); } private function _invalidate():void { if(!hasEventListener(Event.ENTER_FRAME)) addEventListener(Event.ENTER_FRAME, _invalidateCallback); } private function _invalidateCallback(e:Event):void { removeEventListener(Event.ENTER_FRAME, _invalidateCallback); _draw(); } } } |