html - Extract the contents of a div using Flash AS3 -
i have sfw embedded in php page. there div on page id="target"
.
i want access content of div (ie: characters inside it) , hold them string
variable in as3. how can this?
my attempt far
import flash.external.externalinterface; var mydivcontent = externalinterface.call("function(){ return document.getelementbyid('target');}"); var mydivcontent2:string = mydivcontent.tostring(); test_vars.text = mydivcontent2; //dynamic text output
you're there :
var res : string = externalinterface.call("function(){return document.getelementbyid('target').outerhtml}");
if want content of target
, use innerhtml
instead of outerhtml
.
Comments
Post a Comment