Using jquery,JS can we call a function in flex code.Below is that i have a button which calls a AS code.Can this be done if so how ?
<script>
function callas()
{
addBody();//call flex function
}
</script>
<input type="button" onclick="callas();" />
FLEX code
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
import mx.controls.Button;
import mx.controls.Alert;
import flash.display.InteractiveObject;
import flash.display.Sprite;
import flash.media.*;
import flash.net.*;
public function addBody():void
{
Alert.show("Got input from JS");
}
</mx:Script>
</mx:Application >