PDA

View Full Version : Simple Flash and Javascript


swordfish
07-22-2009, 11:56 PM
Hello all.

How to call javascript function using flash?


like this:

Flash inside will be: Textbox and button.

the button will popup messagebox in javascript ("alert(Textboxvalue)")


Somebody can tell me how to do it?

Dean2T
07-23-2009, 12:07 AM
button_Name.addEventListener( MouseEvent.CLICK, some_Function );
function some_Function( event: MouseEvent )
{
import flash.external.ExternalInterface;
ExternalInterface.call( "JavaScript Function" );
}

The JS Function is placed it the "head" of the html document.

swordfish
07-23-2009, 12:10 AM
Thanks for your reply..

But this not work!

I think I dont write the FLA file well. so can you send me source file of this please?

mca_kkchaitanya
07-23-2009, 04:51 AM
search in google actionscript3 + external interface + javascript