I have a Javascript function that returns the innerHTML of a div. I am attempting to call this function from Actionscript and store the return value. I know that the Java
It seems to me that your problem is that from javascript you are returning a string, the innerHTML property of your myDiv element. In actionscript you have datatyped the variable that the ExternalInterface call returns to as an Object, but it is a String. Maybe you have already caught this, but I can't tell as you haven't amended your code.
//The following is an Object
var x = document.getElementById("myDiv");
/*
You are returning the innerHTML property of x, a string, but on the
flash end your expecting an object in your actionscript.
*/
return x.innerHTML;
//The following seems incorrect to me.
var retData:Object = ExternalInterface.call("JSFunc");
//Should be
var retData:String = ExternalInterface.call("JSFunc");
Hope this was helpful, take care.