Home > Flash > Flash 8 – setTimeout and XML.idMap

Flash 8 – setTimeout and XML.idMap

December 19th, 2005

These 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.

No TweetBacks yet. (Be the first to Tweet this post)

 
Creative Commons License This work, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.0 Belgium License.

 

Related posts:

  1. Flash 8 Flash Remoting
  2. Using type checked arrays in MXML
  3. iPod Touch – Apache and PHP 5.2.3
  4. Foundation XML for Flash
  5. Firefox popup from Flash


 

Flash

  1. John
    December 19th, 2005 at 01:20 | #1

    Hopefully these are fixed in the first dot release of Flash 8.

  2. December 19th, 2005 at 01:23 | #2

    yes shouldn’t be too difficult to get fixed for a next release, what makes you think there will be a dot release though?

  3. December 19th, 2005 at 01:31 | #3

    I’ve been using global space – and agree, why think there will be a dot release?

  4. December 19th, 2005 at 13:49 | #4

    Next dot release ?
    You know more than us ;)
    Please share…

  5. December 19th, 2005 at 18:22 | #5

    Are people forgetting that the next dot release is already in public alpha ? 8.5

  6. December 19th, 2005 at 18:29 | #6

    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?

  1. No trackbacks yet.
Comments are closed.
"Schöne Harz Ferienwohnung im Herzen von Deutschland. Weitere Ferienwohnungen im Harz finden Sie auf der angegebenen Urlaubsseite.
Falls Sie einen Partner für erfolgreiche Suchmaschinenoptimierung suchen, sind Sie bei Bullz-Eye an der richtigen Adresse."