Flash 8 - setTimeout and XML.idMap
19 12 2005These are two great new features in Flash 8, but they might cause you to pull your hair out if you try to use them in a class and get nothing but compiler errors. There are a couple of ways around these compiler errors:
One way is to use array notation to access them, i.e. this["setTimeout"] and myXML["idMap"] (the setTimeout method could also be accessed via the global scope: _global.setTimeout).
Another approach is adding definitions for them in the intrinsic classes of Flash 8. You can do so as follows:
toplevel.as (C:\Documents and Settings\UserName\Local Settings\Application Data\Macromedia\Flash 8\en\Configuration\Classes\)
intrinsic function setTimeout():Number
XML.as (C:\Documents and Settings\UserName\Local Settings\Application Data\Macromedia\Flash 8\en\Configuration\Classes\FP8\)
var idMap:Object;
I’d personally recommend simply using array notation to avoid any compiler issues when you share your code with others who might not have made the necessary changes to the intrinsic classes.
Not sure why this is the case, whether it is simply an oversight of adding these to the intrinsic classes for Flash 8 or there is a larger issue at play - but this workaround is good to know nonetheless.






Hopefully these are fixed in the first dot release of Flash 8.
yes shouldn’t be too difficult to get fixed for a next release, what makes you think there will be a dot release though?
I’ve been using global space - and agree, why think there will be a dot release?
Next dot release ?
You know more than us
Please share…
Are people forgetting that the next dot release is already in public alpha ? 8.5
Flash Player 8.5 is in alpha right now but that doesn’t have anything to do with the compile-time errors, has it Guy?