the returned result from the called extend is in form of a object; so you should add this code to the extendscript (just a example):
var xml = '<object>';
var xml = xml += '<property id="strMessage"><string>'+message+'</string></property>';
var xml = xml += '</object>';
and then return the xml variable instead of the message one.
Then, you should have to modify the actionscript code as well:
var result:SyncRequestResult = CSXSInterface.instance.evalScript("GetBackground");
if((SyncRequestResult.COMPLETE == result.status) && result.data)
oResult = result.data as Object;
//Make sure oResult has the property you are expecting
var localizedString:String = oResult.strMessage;
This can be found on the official documentation too.
Thanks so much, Luca
I believe I have to look more carefully at the samples, had tried almost anything except the correct way.
1 person found this helpful
Have you tried this? (no separate jsx required)
var message:String = HostObject.getRoot(HostObject.extensions).localize( "$$$/LayerName/Background=Background");
Just tried and works fine, thanks.
May be even better for my purpose as I don't need to add jsx.