[Flashjs] parse xml with flash and javascript
Sandeep Jangity
sjangity at gmail.com
Wed Mar 21 07:16:41 EST 2007
I am using the Flash Javascript integration kit found here:
http://osflash.org/projects/flashjs
I have the following javascript function:
-------------------------------------------------------
<script type="text/javascript">
function getXMLSrc() {
file_name = '<?xml version=\"1.0\" ?><rsp status_code=\"0\"
status_message=\"Success\"><daily_counts><count date=
\"20050412T00:00:00\">0</count></daily_counts></rsp>';
return file_name;
}
</script>
<script type="text/javascript">
var lcId = new Date().getTime();
var flashProxy = new FlashProxy(lcId, "/flash/timeline/sfw/
JavaScriptFlashGateway.swf");
var sample = new FlashTag("/flash/timeline/sfw/flashfile.swf, 1100,
130);
sample.setFlashvars("lcId=" + lcId);
sample.setFlashvars("flashSource=http://www.measuremap.com/developer/
slider/&contentLicense=http://creativecommons.org/licenses/by/2.0/");
sample.write(document);
</script>
Note: My flash component has no problem parsing an xml source document
when I test in DEBUG mode, but problem when I have all this plugged into on
the web server.
In my AS file:
--------------------
import com.macromedia.javascript.JavaScriptProxy;
var proxy:JavaScriptProxy = new JavaScriptProxy(_root.lcId, this);
PROBLEM?
file_name = proxy.call("getXMLSrc")
is returning null
Again, this should be simple, right? I am just trying to dynamically pass in
xml data to the flash component by making a call to a simple javascript fxn
which contains the dynamic xml tree. Any help? Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/flashjs_osflash.org/attachments/20070321/51408180/attachment.htm
More information about the Flashjs
mailing list