|
-
[RESOLVED] RangeError: Error #2006: The supplied index is out of bounds. HELP!!!
Hi,
I made shared object application with drawing lines, arrow and circles. Almost everything works fine until I restart application.
Not every time but very often I get this error:
RangeError: Error #2006: The supplied index is out of bounds.
This is code which loading share objects:
function addNewChild(data, name) {
var child = null;
switch(data.toolType) {
case "brush":
child = new ScrappyBrush();
break;
case "arrow":
child = new ScrappyLine();
break;
case "text":
child = new ScrappyTxt();
break;
case "textBox":
child = new ScrappyTxtBox();
break;
case "circle":
child = new ScrappyCircle();
break;
case "bitmap":
child = new ScrappyBMP();
break;
}
if (child) {
child.name = name;
dragTarget.addChild(child);
child.updateSharedObject(this.so);
}
}
I was trying to replace dragTarget.addChild(child); to dragTarget.addChildAt(child,0); but that did not solved my problem.
Can anyone explain me what is wrong?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|