Communication between Flex and Javascript

Leave a comment

From Enterprise Development with Flex by Yakov Fain, Anatole Tartakovsky, Victor Rasputnis

The ExternalInterface Class

Flex can communicate with JavaScript using an ActionScript class called ExternalInterface. This class allows you to map ActionScript and JavaScript functions and invoke these functions either from ActionScript or from JavaScript. The use of the class ExternalInterface requires coding in both languages.

For example, to allow JavaScript’s function jsIsCalling() to invoke a function asToCall(), you write in ActionScript:

ExternalInterface.addCallback("jsIsCalling", asToCall);

Then, you use the ID of the embedded .swf (e.g., mySwfId set in the HTML object) followed by a JavaScript call like this:

if(navigator.appName.indexOf("Microsoft") != -1){
    window["mySwfId"].asToCall();
} else {
document.getElementById("mySwfId").asToCall();
}

Web Encoding & Decoding

Leave a comment

http://www.the-art-of-web.com/javascript/escape/

This is how to change the text color of a TreeNode

Leave a comment

http://www.extjs.com/forum/showthread.php?t=79132

Google Javascript Programming Tool

Leave a comment

http://news.cnet.com/8301-30685_3-10391002-264.html?tag=newsFeaturedBlogArea.0

JavaScript – type

Leave a comment

Primitive Type: boolean, number, and string (pass by value)

Other Type: Object, null, and undefined (pass by reference)

Visual Web Developer 2008 Express Edition

Leave a comment

http://www.microsoft.com/express/vwd/#webInstall

http://www.berniecode.com/blog/2007/03/08/how-to-debug-javascript-with-visual-web-developer-express/

Javascript Tutorial

Leave a comment

http://www.javascriptkit.com/

JavaScript – Closure

Leave a comment

http://www.jibbering.com/faq/faq_notes/closures.html

OOP in JavaScript

Leave a comment

http://phrogz.net/JS/Classes/OOPinJS.html

JavaScript Kit

Leave a comment

http://javascriptkit.com/javatutors/

Older Entries

Follow

Get every new post delivered to your Inbox.