Archive for 2008-02

Silver Explorer

2008-02-27

As most of my friends know, I’m partially colorblind. Most webdevelopers have no idea what their site looks like for someone like me. Thanks to the power of Adobe Air I’m now capable of letting you experience it firsthand.

Silver Explorer is a browser that lets you surf the net in grayscale.

silverexplorer.air
Flash version 9.0.115 required

full-screen mode in Actionscript 2

2008-02-19

How to use full-screen mode in Actionscript 2:

_root.btn_mc.onRelease = function(){
    if(Stage["displayState"] == "normal"){
        Stage["displayState"] = "fullScreen";
    }else{
        Stage["displayState"] = "normal";
    }
}

var listener:Object = {};
listener.onFullScreen = function(isFullscreen:Boolean){
    if(isFullscreen){
        trace("entered full-screen mode");
    }else{
        trace("exited full-screen mode");
    }
}
Stage.addListener(listener);

Also see Exploring full-screen mode in Flash Player 9.

forceSmoothing

2008-02-15

Rotating and scaling pictures in flash is easy. Just use _rotation, _xscale and _yscale. Except when you publish an swf for Flash Player 8 or newer. Every image you rotate or scale will become jagged. Very anoying. To remedy this you can either publish for Flash 7 or use a complicated loadBitmapSmoothed function that uses BitmapData.

When Flash Player 8.5 came out it introduced the forceSmoothing property. This property is also available in as2. Now all we need to do is set it to true when we load images. Don’t forget that this will have no effect in Flash players older than version 8.5!

It works quite well. In the example below you can clearly see the left picture is more jagged than the right one.

(more…)