图片组件无法显示在线图片
Image component cannot display online image
用户信息通过 SOAP 服务传送到 Flex 应用程序,并显示特定用户的头像。但是,当应用程序 运行 时,什么也没有显示。图像的路径在一个数组中,它被分配给图像的来源但实际上不起作用。另一方面,当我像 link 一样给它时,它就起作用了。
stu_avatar.source = Info.repStuArr[Info._StuList].avatar;//it shows empty
stu_avatar.source = "http://extremelifechanger.com/web_images/avatar-sam09-8-251.jpg";//when change to this, it displays the image
我也可以得到 link 正确的时候;
trace(Info.repStuArr[Info._StuList].avatar);
如何显示保存在该数组中的用户头像?
尝试将 Info.repStuArr[Info._StuList].avatar
放入字符串并将该字符串应用于 stu_avatar.source
喜欢:
var str:String = Info.repStuArr[Info._StuList].avatar;
stu_avatar.source = str;
或尝试:
stu_avatar.source = (Info.repStuArr[Info._StuList].avatar).toString();
用户信息通过 SOAP 服务传送到 Flex 应用程序,并显示特定用户的头像。但是,当应用程序 运行 时,什么也没有显示。图像的路径在一个数组中,它被分配给图像的来源但实际上不起作用。另一方面,当我像 link 一样给它时,它就起作用了。
stu_avatar.source = Info.repStuArr[Info._StuList].avatar;//it shows empty
stu_avatar.source = "http://extremelifechanger.com/web_images/avatar-sam09-8-251.jpg";//when change to this, it displays the image
我也可以得到 link 正确的时候;
trace(Info.repStuArr[Info._StuList].avatar);
如何显示保存在该数组中的用户头像?
尝试将 Info.repStuArr[Info._StuList].avatar
放入字符串并将该字符串应用于 stu_avatar.source
喜欢:
var str:String = Info.repStuArr[Info._StuList].avatar;
stu_avatar.source = str;
或尝试:
stu_avatar.source = (Info.repStuArr[Info._StuList].avatar).toString();