ActionScript 3.0 :: Scrollpane - The Supplied Index Is Out Of Bounds
Dec 17, 2009
I'm adding a bunch of movieclips to a container clip. I then add that to the scrollpane. When I run scrollpane.update() it gives me the error "The supplied index is out of bounds". From the full error message it looks like it's happening on the DisplayObjectContainer/getChildAt() which is run in the update() method. I thought I had it going once but now it's not again and I can't figure out what I was doing differently.
I'm trying to remove children from a movie clip upon user interaction but it's saying "the supplied index is out of bounds" - however, I must be missing something because it doesn't seem like anything is out of bounds. This is my code:
Circle.as: for (var i=0; i<3;i++){ //this number should be based on the number of children found in the XML
When I Write this code ActionScript Code: setChildIndex(loading_info,MovieClip(root).mcContent.numChildren+1);
I found this output RangeError: Error #2006: The supplied index is out of bounds. at flash.display:isplayObjectContainer/setChildIndex() at Dan_fla::mcContent_1/on_pic_loaded()
i'm trying to addChild with an interval, using this piece of code, but I allways get an error saiyng the suplied index is out of bounds.what should I do to have mc1 added then wait lets say a second and add m2 2 and so on?
var tempo_espera:Timer = new Timer(1000, 1); tempo_espera.addEventListener("timer", inserir); tempo_espera.start(); // function inserir(evt:TimerEvent):void { for (var nv1:int = 0; nv1<promocoes.length; nv1++) {
Somehow i keep getting this error message. The following code makes a fade in-out gallery that works fine by itself. But the moment i put it (manually or with addChild method, its the same) in the main timeline i get this message. Google search turned out quite baffling.
var whichmc:MovieClip=MovieClip(mainmc.getChildAt(tno))trace(whichmc.name+'<<whichmc')<<< showing movieclip's namesetChildIndex(whichmc,mainmc.numChildren-1) <<error here
I have a .sol file that can be opened using AS2 but when AS3 opens it i get RangeError: Error #2006: The supplied index is out of bounds. at flash.net::SharedObject$/getLocal()
I have tried the SharedObject.defaultObjectEncoding = ObjectEncoding.AMF0 but this is for writing, not for reading. Not sure what to do but to trap/suppress the error. Does not solve the issue, any takers? If it works in AS2 then it should work in AS3!
I've got to invoke a RPC service, and all the parameters sent are String. It works quite well when the data is relatively small, but when one of the string grows to the size about 10 or over hundred KB, immediately after the service is invoked, it goes to the error handler:
[FaultEvent fault=[RPC Fault faultString="Error #2006: The supplied index is out of bounds." faultCode="InvokeFailed" faultDetail="null"] messageId="85CF2FB3-E79D-779F-87F9-B04520318D3A" type="fault" bubbles=false cancelable=true eventPhase=2]
I've been adding and removing objects from my stage. Just when I think one part is fixed, another breaks. Basically, I'm getting the following error -
RangeError: Error #2006: The supplied index is out of bounds. at flash.display:isplayObjectContainer/setChildIndex() at flash.display::Stage/setChildIndex()
the title is self-explanatory. i'm VERY new to flash so i don't understand a lot of the lingo. can anyone give me a simple answer or, better yet, fix the code for me? i'm reading that it usually comes up when there's a child error but i'm not sure how to fix it.
i reworked the code to make it error free. now all we're dealing with is the REANGE ERROR problem. i'm extremely new to flash and am reading people's answers on sites in which they solved this problem, but do not understand what people are saying at all.
let me explain my problem a little better: i am creating a drop down menu. everything is fine UNTIL i go to scroll over the button and get the error. i added inner glow, etc. and all of that works fine. i'm only stuck at where the drop down menu is supposed to descend
I"m getting this error with these two bits of AS3:
ActionScript Code: public function tmFlashPlay():void { //Play TubMates Flash tmClip.y = 0; galleryMask.y = 0;
[Code]....
If I'm reading it right it is saying that the index supplied for the child is out of bounds. Yet it is the index captured earler, and I add or remove no children in between these functions being called.
I'm trying to build a simple as3 server/client app. When the client has connected to the server, it should send a message like "1" to the server. The server does the following:
I have a MovieClip inside a ScrollPane. Inside this MovieClip i have buttons. What i want to know is: how to click a button inside a Movie Clip, that is inside a scrollpane, and make it load a swf outside the scrollpane?
I opened up the NY Times homepage, and they have this giant Apple addvertisement that has animations over the entire top half of the page, outside the area occupied by the swf.
Although I put _x = player._x etc. code in an onEnterFrame function the masking mc is moving without the player
You see...the player is held within some borders. When cornered and then hit, the mask moves according to how it would move normally, but without the player (because he is held in place by some borders)...
Also, if I don't have a problem but I'm missing a crucial piece of code,
I have a bunch of images going on all at once, some on the stage, and some off, and i would like to find a way of telling whether or not they are currently on the stage or not....
I know i can do the whole
checkStage = function () { if ((mc._x>=0) && (mc._x<=Stage.width) && (mc._y >= 0)&&(mc._y >=Stage.height)) { //have mc do whatever here
[Code].....
that way i can satisfy my laziness AND achieve what i'm trying to do without having to deal with long winded paths and a bunch of else if's
for some reason this flex 4 code gives me an error but I can't figure out why. In my WindowedApplication I have:[code]That seems like a bogus error since I can assign pref.bounds to rect without an error. I don't know why this isn't working. It works under flex 3 compatibility mode but that also breaks a lot of my spark components so I can't use it.
I have a script that produces random motion along the y axis, however, I want that motion to occur within the movie clip that is centered on the stage, or I should say within the bounds of that movie clip. The movie clip has a height of 335 px