Zydecode Studio

Archive for the 'ActionScript' Category

Launch Flex in same Firefox window

Monday, April 23rd, 2007

about:config >> browser.link.open_external >> set to 1

getVersion() weirdness

Monday, February 13th, 2006

to generate a result for getVersion() in a swf loaded into a parent swf via loadclip(), use getVersion() in the parent and set a variable there, then call this var from your child swf if you need it.
Couldn’t get this to work any other way; tried calling the function directly from the child, but couldn’t [...]

removeEventListener with Delegate & multiple callers..

Wednesday, November 2nd, 2005

painful stuff… trying to create a row of buttons, add eventListeners to them all, and pass the ‘release’ event to a single function (rather than one function per button). Because I have to use Delegate.create, it’s difficult to add arguments - and then also make sure that the removeEventListener also works. :oP
I’m SURE there are [...]

sort an alphanumeric array numerically

Sunday, October 16th, 2005

AlphNumAscend = function(a,b){
return parseInt(a) > parseInt(b);
}
AlphNumDescend = function(a,b){
return parseInt(a) < parseInt(b);
}
myArray.sort(AlphNumAscend);