Expand my Community achievements bar.

TypeError :Error #1085: at flash.external::ExternalInterface$/call()


Former Community Member

I am calling javascript function of wrapper from flex. The
funcation is called but when it return a value , the value is not
returned to flex.

The same value if i print using alert in javascript its value
is printed.

my javascript code is like this...

function readCookie() {

var nameEQ = "user=";


var ca = document.cookie.split(';');

for(var i=0;i < ca.length;i++) {

var c = ca;

var decript_data="";

while (c.charAt(0)==' ') c = c.substring(1,c.length);

if (c.indexOf(nameEQ) == 0) {

var temp = c.substring(nameEQ.length,c.length);



alert("user="+ decript_data); // it prints value of

return decript_data;




return null;


i am calling this function from flex as;

private function userSession():void{

var usrData:String;



when i run the application , i am getting this error:

TypeError: Error #1085: The element type "string" must be
terminated by the matching end-tag "</string>".

at flash.external::ExternalInterface$/call()

at builds/userSession()

at builds/LoadFilterVal()

at builds/___Application1_creationComplete()

at flash.events::EventDispatcher/dispatchEventFunction()

at flash.events::EventDispatcher/dispatchEvent()

at mx.core::UIComponent/dispatchEvent()

at mx.core::UIComponent/set initialized()

at mx.managers::LayoutManager/doPhasedInstantiation()

at Function/

at mx.core::UIComponent/callLaterDispatcher2()

at mx.core::UIComponent/callLaterDispatcher()

..returning a simple string from javascript is returned well
to flex , but wen a variable containing string is returned the
above error occurs..

Please any one can help me to solve this problem.

0 Replies