Comments on: Some legal variable names cannot be passed from ActionScript to JavaScript https://joshblog.net/2008/01/03/flash-player-externalinterface-variable-name-bug/ Archive of older blog posts written by Josh Tynjala about Flash, Flex, and ActionScript Wed, 26 Jun 2013 02:52:46 +0000 hourly 1 https://wordpress.org/?v=4.9.9 By: Josh Tynjala https://joshblog.net/2008/01/03/flash-player-externalinterface-variable-name-bug/#comment-1548 Fri, 04 Jan 2008 17:47:01 +0000 http://www.zeuslabs.us/2008/01/03/flash-player-externalinterface-variable-name-bug/#comment-1548 That’s why you can put quotes around it. Another example would be language keywords (though they pass through ExternalInterface just fine because JavaScript is less strict). myVar.class leads to a compiler error but myVar["class"] doesn’t.

Imagine if you simply couldn’t parse XHTML files with E4X because the class attribute throws errors. The ability to use string access for variable names is an important “feature of the language”.

]]>
By: jon https://joshblog.net/2008/01/03/flash-player-externalinterface-variable-name-bug/#comment-1547 Fri, 04 Jan 2008 17:03:12 +0000 http://www.zeuslabs.us/2008/01/03/flash-player-externalinterface-variable-name-bug/#comment-1547 this isnt really a bug IMO
Its a feature of the language in which you cannot use “-” in variable names as the compiler thinks its a minus sign

]]>