Yes,

I have an mdi pane that resizes and moves at the same time window effects.

I actually tried this in the beginning but found it didn't work. Just
becasue you are adding an effect end to the last instance in the loop, it
doesn't mean that it will actually be the last one to end.

This might not actually answer you r question but a solution that is bullet
proff for me;

in the loop, create a incremental pointer.
add the effect end handler to all of the instances being effected.
increment the pointer for all even if it's resize and move events, get them
all.
in the effect end handler have something like...

this is just my copy and paste

   private function moveEffect_tweenEndHandler(event:TweenEvent):void
   {
       currentEffectsLength--
       //log("moveEffect_tweenEndHandler()", currentEffectsLength)
       if (currentEffectsLength == 0)
       {

           var len:int = currentEffects.length;
           for (var i:int = 0; i < len; i++)
           {
               var effect:EffectInfo = currentEffects[i];

               effect.overlay.x = effect.position.x;
               effect.overlay.y = effect.position.y;
               effect.overlay.width = effect.position.width;
               effect.overlay.height = effect.position.height;

               IInvalidating(effect.overlay).validateNow();

               effect.position.child.visible = false;
           }

           callLater(defferEffectEnd);
       }
 }
   ---------------------------------------

I have not had a problem with this at all. when the stack is empty you know
all your effects are finished.

Peace, Mike




On 1/9/07, John Grden <[EMAIL PROTECTED]> wrote:

  Did you ever get an answer for this or figure out a solution?  I'm
getting the samething.

If I create a new Sprite() it works, but if I create a new UIComponent() I
get this same error.

Thoughts?


On 10/9/06, shuell2000 <[EMAIL PROTECTED]> wrote:
>
>   I have something that was working and now is throwing an index out of
> range error. I have a simple canvas with multiple components
> (DisplayObjects) in it. I am looping through them and applying a move
> effect to roll them off stage one at a time so that they all start at
> different intervals, after the last one on the screen moves off, I set
> the ones below the screen automatically instead of moving them then
> call the addeventlistener on the move object. What Im trying to
> accomplish is to nicely scroll the objects out of sight then kick off
> a process that brings in a new set of objects. Here is the code snippet:
>
> var moveOut:Move = null;
> var scroller:ThumbnailScroller;
> var notified:Boolean = false;
>
> for(var i:Number = 0; i < this.numChildren; i++){
> scroller = ThumbnailScroller(this.getChildAt(i));
> if(scroller.y < this.height && scroller.visible){
> moveOut = new Move(scroller);
> moveOut.startDelay = i * 500;
> moveOut.xTo = (scroller.width+10)*-1;
> moveOut.duration = 2000;
> moveOut.play();
> }else if(scroller.y > this.height){
> if(!notified){
> moveOut.addEventListener(EffectEvent.EFFECT_END,
> notifyCleanUpComplete);
> notified = true;
> }
> }
> }
>
> I am getting the following error:
>
> RangeError: Error #2006: The supplied index is out of bounds.
> at flash.display::DisplayObjectContainer/getChildAt()
> at mx.core::Container/getChildAt()
> at mx.containers.utilityClasses::CanvasLayout/updateDisplayList()
> at mx.containers::Canvas/mx.containers:Canvas::updateDisplayList()
> at mx.core::UIComponent/validateDisplayList()
> at mx.core::Container/validateDisplayList()
> at mx.managers::LayoutManager/::validateDisplayList()
> at mx.managers::LayoutManager/::doPhasedInstantiation()
> at Function/http://adobe.com/AS3/2006/builtin::apply ()
> at mx.core::UIComponent/::callLaterDispatcher2()
>
> I am at a complete loss as to why this is happening, it was at one
> time working as designed but I must have changed something (what, I
> cannot tell) that has brought this about. Can anyone see any issues,
> especially race-conditions in this setup? I am unschooled in the ways
> of effect instances and the documentation on them is sketchy at best.
> Can anyone shed some light on this issue or tell me a better more
> solid way of accomplishing this? Thanks for listening
>
> John Shuell
>
>


--
[  JPG  ]




--
Teoti Graphix
http://www.teotigraphix.com

Blog - Flex2Components
http://www.flex2components.com

You can find more by solving the problem then by 'asking the question'.

Reply via email to