User login |
proxyJavaScript proxy for ActionScript 3I find the syntax for calling JavaScript functions from ActionScript to be awkward at best. Consider the following JavaScript: function handleClick(source) { // stuff } var Library = { processOrder: function(itemID, quantity) { // stuff } } The standard way of calling these functions is to use ExternalInterface: ExternalInterface.call("handleClick", "mainPage"); ExternalInterface.call("Library.processOrder", 51829, 3); I find the following syntax to be preferable: JS.window.handleClick("mainPage"); JS.window.Library.processOrder(51829, 3); Source code of the JS class that allows this syntax follows:
|
Recent blog posts
|
Recent comments
3 weeks 2 days ago
5 weeks 3 days ago
17 weeks 21 hours ago
20 weeks 8 hours ago
20 weeks 20 hours ago
31 weeks 1 day ago
36 weeks 2 days ago
40 weeks 2 days ago
50 weeks 4 days ago
51 weeks 22 min ago