11RIA 闪客社区 - 最赞 Animate Flash 论坛

搜索
查看: 2441|回复: 8
上一主题 下一主题

[已解决悬赏] Flash build 相关问题

[复制链接] TA的其它主题
发表于 2018-12-21 15:59:55 | 显示全部楼层 |阅读模式
60银子
最近才用 Flash build这个工具  
TypeError: Error #1006: insertAt is not a function.
一直报这个错  十分蛋疼  很纳闷  这个报错啥意思

var dataAry:Array = arrList.source;
                                var index:int = arrList.getItemIndex(selectedItems[0]);
                                dataAry.splice(index,selectedItems.length);
                                var len:int = 0;
                                switch(event.currentTarget){
                                        case moveUp:
                                                for (var i:int = 0; i < selectedItems.length; i++){
                                                        len = i + index - 1;
                                                        dataAry.insertAt(len < 0 ? 0 : len, selectedItems);
                                                }
                                                break;
                                        case moveDown:
                                                for (i = 0; i < selectedItems.length; i++){
                                                        len = i + index + 1;
                                                        dataAry.insertAt(len, selectedItems);
                                                }
                                                break;
                                        case moveTop:
                                                for (i = 0; i < selectedItems.length; i++){
                                                        len = i;
                                                        dataAry.insertAt(len, selectedItems);
                                                }
                                                break;
                                        case moveBottom:
                                                for (i = 0; i < selectedItems.length; i++){
                                                        len = i + dataAry.length;
                                                        dataAry.insertAt(len, selectedItems);
                                                }
                                                break;



最佳答案

查看完整内容

AS3 function insertAt(index:int, element:*):void 将一个单独的元素插入一个数组中。此方法会修改数组但不制作副本。参数 看红色部分!!
发表于 2018-12-21 15:59:56 | 显示全部楼层
insertAt
()
方法
AS3 function insertAt(index:int, element:*):void
语言版本: ActionScript 3.0
运行时版本: Flash Player 19, AIR 19


将一个单独的元素插入一个数组中。此方法会修改数组但不制作副本。
参数
index:int — 一个整数,指定元素要插入数组中的位置。可以用一个负整数来指定相对于数组结尾的位置(例如,-1 是数组的最后一个元素)。
element:*




看红色部分!!
回复

使用道具 举报

发表于 2018-12-21 16:19:30 | 显示全部楼层
as3 的Array 有這個 insertAt方法么?
回复

使用道具 举报

发表于 2018-12-21 16:20:48 | 显示全部楼层
很明显的嘛,,insertAt  这个方法不存在。。
回复

使用道具 举报

发表于 2018-12-21 16:44:09 | 显示全部楼层
最后一批aser 发表于 2018-12-21 16:19
as3 的Array 有這個 insertAt方法么?

哈哈,英雄所见略同
回复

使用道具 举报

 楼主| 发表于 2018-12-21 17:07:08 | 显示全部楼层
TKCB 发表于 2018-12-21 16:44
哈哈,英雄所见略同

https://help.adobe.com/zh_CN/FlashPlatform/reference/actionscript/3/Array.html       
insertAt(index:int, element:*):void
将一个单独的元素插入一个数组中。


..........
回复

使用道具 举报

 楼主| 发表于 2018-12-21 17:11:19 | 显示全部楼层
最后一批aser 发表于 2018-12-21 16:19
as3 的Array 有這個 insertAt方法么?

what  可是 我查到有的啊   
用于 Adobe® Flash® Platform 的 ActionScript® 3.0 参考
insertAt(index:int, element:*):void
将一个单独的元素插入一个数组中。

所以我才非常郁闷
回复

使用道具 举报

 楼主| 发表于 2018-12-21 17:15:45 | 显示全部楼层
TKCB 发表于 2018-12-21 17:10
AS3 function insertAt(index:int, element:*):void

意思是我的sdk 版本太低了
回复

使用道具 举报

 楼主| 发表于 2018-12-21 17:32:04 | 显示全部楼层
傻哭了
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

站长推荐 上一条 /1 下一条

感谢所有支持论坛的朋友:下面展示最新的5位赞助和充值的朋友……更多赞助和充值朋友的信息,请查看:永远的感谢名单

SGlW(66139)、 anghuo(841)、 whdsyes(255)、 longxia(60904)、 囫囵吞澡(58054)

下面展示总排行榜的前3名(T1-T3)和今年排行榜的前3名的朋友(C1-C3)……更多信息,请查看:总排行榜今年排行榜

T1. fhqu1462(969)、 T2. lwlpluto(14232)、 T3. 1367926921(962)  |  C1. anghuo(147)、 C2. fdisker(27945)、 C3. 囫囵吞澡(58054)



快速回复 返回顶部 返回列表