Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Verified that auto format behaves badly in CS3 & CS4. Anonomous functions written like this seems to do the trick:
EventManager.addEventListener(footprints,"actionComplete", function(){ trace('here'); });
However, this works fine:
EventManager.addEventListener(cliententerBTN,MouseEvent.MOUSE_OVER,function(){ trace('test'); });
A fix to the first example is to add a variable and uto format will handle correctly:
EventManager.addEventListener(footprints,"actionComplete", somevar= function(){ trace('here') });
Usage Example:
package com.gwapps{
public class Main extends MovieClip {
public function Main() {
doBuild();
}
public function doBuild() : void{
EventManager.addEventListener(footprints,"footprintsComplete", function(){ trace('here') });
}
}
};
Without variable added & after auto formatting:
package com.gwapps{
public class Main extends MovieClip {
public function Main() {
doBuild();
}
public function doBuild():void {
}
}
}
EventManager.addEventListener(footprints,"footprintsComplete", function(){ trace('here') });
Hope this helps.