热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

在AS中使用带有loadClip的数组?-UsingarrayswithloadClipinAS?

Ivepreloadedimagesfromxmlintoanarraynamedarr.ButImhavingproblemswithloadClipandge

I've preloaded images from xml into an array named arr. But I'm having problems with loadClip and getting the string from the array. So it doesn't load the image in the box.

我已经将xml中的图像预加载到名为arr的数组中。但我遇到loadClip问题并从数组中获取字符串。因此它不会在框中加载图像。

Example:

arr[0] = "images/photo1.jpg";
var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(this);
mcLoader.loadClip(arr[0], box_mc.loader_mc);

Any thoughts on how to work around this?

有关如何解决这个问题的任何想法?

1 个解决方案

#1


Solution for this is:

解决方法是:

mcLoader.loadClip(arr[0].toString(), box_mc.loader_mc);

推荐阅读
author-avatar
羽靜幻雲_100
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有