Archive for the ‘Actionscript’ Category

Installing debug FlashPlayer for Firefox on Ubuntu 10.10

July 20th, 2011 No comments

This is more of an aide-mémoire for me than a public guide. If it is helpful for other people then I am happy to make it available. If anyone has any comments or suggestion please contact me.

. . .

  • First install the ‘Adobe Flash Player plug-in’, through the ‘Software Centre’ (alternatively it can be done from the command line if you like)…
  • Download the Debug Flash Player:
$ cd ~/Downloads/
$ wget
  • Extract the files:
$ tar -xzvf flashplayer_10_plugin_debug.tar.gz
  • Copy ‘’ to the Flex SDK folder:
$ sudo mv /opt/flex/runtimes/
  • Update alternatives reference:
$ sudo update-alternatives --install /usr/lib/flashplugin-installer/ firefox-flashplugin /opt/flex/runtimes/ 60
  • (optional) Check alternatives reference:
$ update-alternatives --display firefox-flashplugin
firefox-flashplugin - auto mode
  link currently points to /opt/flex/runtimes/
/opt/flex/runtimes/ - priority 60
/usr/lib/flashplugin-installer/ - priority 50
Current 'best' version is '/opt/flex/runtimes/'.
  • Restart Firefox and type ‘about:plugins’ into the address bar to check the plug-in is loaded.

Parse Boolean value from String…

July 10th, 2009 No comments

One of the small niggles I have with AS3 is the way it parses boolean values from strings. It first tries to convert the string value to a number, then to a boolean (there is a long explanation which I will not go into at this point)… To maintain sanity I have written a very simple function to handle it for me:

static public function parseBoolean(str:String):Boolean
        // Check for true values
        case "1":
        case "true":
        case "yes":
        return true;

        // Check for false values
        case "0":
        case "false":
        case "no":
        return false;

        // If all else fails cast string
        return Boolean(str);


May 15th, 2009 No comments

Having a .NET background I frequently used the String.IsNullOrEmpty() method. However after starting with ActionScript I have noticed that this (and a few other) functionalities are missing. So here is my version:

public static function IsNullOrEmpty(value:String):Boolean
    // Check if string is 'empty'
    if (value == "")
        return true;

    // Check if string is 'null'
    if (value == null)
        return true;
    // Not 'empty' or 'null', it must be ok!
    return false;