You Are Here Home > Flash

Flash

Calling a JavaScript function from Actionscript 3 (Flash)

It’s very easy:

import flash.external.ExternalInterface;
...
ExternalInterface.call("your_javascript_function()");

You can even get a return value:

var x:int = ExternalInterface.call("get_x()");

To pass an argument try:

var retval:int = ExternalInterface.call("some_js_function()", "the-argument");
Calling a JavaScript function from Actionscript 3 (Flash)
Comments (56)   Filed under: Actionscript,Flash,JavaScript,Web Development   Posted by: Hamid

Flash CS3 is slow on Windows Vista

Here is how to fix it:
1 – Right click on Flash’s desktop (or whatever) icon and then click “Properties”
2 – Go to compatibility tab
3 – Check the box “Run this program in compatibility mode for:”
4 – From the drop down select “Windows XP (Service Pack 2)”
5 – Open Flash

And that’s it, it will run smoothly, or at least it did for me.

Flash CS3 is slow on Windows Vista
Comments (6)   Filed under: Actionscript,Annoying Stuff,Flash   Posted by: Hamid
« Newer PostsOlder Posts »