After updating to Starling 2 we noticed strange behavior while using remove() function to remove delay call from Juggler.
Sometimes we get range error #1125.
After some investigation we noticed that while using removeDelayedCalls(), id of that delayed call is not being removed from _objectIDs, therefore later after using remove() with the same delay call we get an error.
We believe instead of
delete _objectIDs[tween];
there should be
delete _objectIDs[delayedCall];
in function originally copied below:
/** Removes all delayed and repeated calls with a certain callback. */
public function removeDelayedCalls(callback:Function):void
{
if (callback == null) return;
for (var i:int=_objects.length-1; i>=0; --i)
{
var delayedCall:DelayedCall = _objects[i] as DelayedCall;
if (delayedCall && delayedCall.callback == callback)
{
delayedCall.removeEventListener(Event.REMOVE_FROM_JUGGLER, onRemove);
_objects[i] = null;
delete _objectIDs[tween];
}
}
}
Hello Daniel.
After updating to Starling 2 we noticed strange behavior while using remove() function to remove delay call from Juggler. Sometimes we get range error #1125.
After some investigation we noticed that while using removeDelayedCalls(), id of that delayed call is not being removed from _objectIDs, therefore later after using remove() with the same delay call we get an error.
We believe instead of delete _objectIDs[tween]; there should be delete _objectIDs[delayedCall];
in function originally copied below:
With Best Regards.
NN Team.