以下是Flash中的代码:
复制内容到剪贴板
代码:
var myload=new URLLoader();
myload.load(new URLRequest("test.php"));
myload.addEventListener(Event.COMPLETE,com);
function com(e:Event):void
{
trace(e.target.data);
}以下是php中的代码:
复制内容到剪贴板
代码:
<?php
$a ='this data is form php!';
echo $a;
?>结果Flash中输入的是
"<?php
$a ='this data is form php!';
echo $a;
?>"
我想获取到这个页面中变量a的值,就写成了"trace(e.target.data.a);",可是编译时却报错说"ReferenceError: Error #1069: 在 String 上找不到属性 a,且没有默认值。
at album_fla::MainTimeline/com()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()"
请教大家,我应该怎样才能获取到变量a的值呢?
[
本帖最后由 xiguanqingyu 于 2008-5-13 11:41 编辑 ]