Archive for June 2009

Restricting a number to a certain range

Quite often I need to restrict a number to a range with a defined maximum and minimum value. Rather than using if else statements you can do this simply with Math.max and Math.min:  var restricted_value:Number = Math.max(MIN_VALUE, Math.min(MAX_VALUE, value)); 

City Broadcasting – site launch

This site went live recently. It was a very quick build using the Gaia framework. It is XML driven and AS3.0 link

AS3 debugging with Arthropod

I was just put on to a great debugging tool called Arthropod. It is highly configurable (including password protection) and includes many very handy features such as being able to switch between standard window behaviour and staying ‘always on top’. Also you can take a screenshot of your stage and send the bitmap through and […]

Animated Rising Sun

Here is a small and simple class I wrote this morning to create an animated rising sun. You can configure the number of segments and the size very easily.  package { import flash.display.Sprite; import flash.events.Event;  public class RisingSun extends Sprite { private var _segments :Number = 40; private var _rad :Number = 730;  public function […]