Feb 21 2012
Actionscript

Call order of initalization events in Flex

Posted by Gerrit Schimpf in Actionscript

This article explains the order in which the initalization events like preinitialize, initialize, creationComplete, etc in flex are called.
Read entire article.

Feb 20 2012
Android

Catch uncaught exceptions to avoid app crash

Posted by Gerrit Schimpf in Android, Java

How to catch an uncaught Exception in android and avoid the default popup which normally shows.
Read entire article.

Feb 20 2012
Actionscript

Flash commando to export swc only

Posted by Gerrit Schimpf in Actionscript

Flash commando to export swc only:

var dom = fl.getDocumentDOM();
var domFolder = getDomFolder();
var publishURI = getPublishURI();
 
dom.publish();
 
if(FLfile.exists(publishURI))
    FLfile.remove(publishURI);
 
function getPublishURI()
{
    var profileXML = new XML(dom.exportPublishProfileString()).children();
 
    for(var i = 0; i < profileXML.length(); i++)
    {
        var node = profileXML[i];
        switch(String(node.name())){
            case "PublishFormatProperties" :
                return domFolder + "/" + String(node.flashFileName);
            break;
        }
    }
}
 
function getDomFolder()
{
    var splitURI = dom.pathURI.split("/");
    splitURI.pop();
    return splitURI.join("/");
}
Feb 20 2012
Linux

Install Icinga Classic Web on debian squeeze

Posted by Gerrit Schimpf in Linux

Little howto explaining the install of Icinga Classic web on debian queeze.
Read entire article.

Feb 20 2012
Actionscript

Create a class in actionscript 3

Posted by Gerrit Schimpf in Actionscript

Little explanation about the use of classes in actionscript 3.
Read entire article.

Feb 20 2012
Actionscript

Actionscript 3 mini tutorial

Posted by Gerrit Schimpf in Actionscript

Variables

var untyped:*; // (or no typing) undefined
var boolean:Boolean; // false
var number:Number; // NaN
var integer:int; // 0
var unsignedInteger:uint; // 0
var string:String; // null
var object:Object; // null

Functions

A function which does not return any value and is acception one parameter:

function returnNothing(int i) : void {
    trace(i);
}

A function returning a String:

function returnString(int i) : String{
    trace(i);
}

A function with a default value for a parameter which will be used when the function is called without providing the parameter:

function defaultValue(msg:String= "foo"):void {
    trace(msg);
} 
 
defaultExample(); // traces "foo"
defaultExample("bar"); // traces "bar"