 
 package com.threerings.util {
 
-import flash.display.Sprite;
+import flash.events.TimerEvent;
 
-import flash.events.Event;
+import flash.utils.Timer;
 
 /**
  * A simple mechanism for queueing functions to be called on the next frame.

    public static function callLater (fn :Function, args :Array = null) :void
    {
        _methodQueue.push([fn, args]);
        if (!_d.hasEventListener(Event.ENTER_FRAME)) {
            _d.addEventListener(Event.ENTER_FRAME, handleEnterFrame);
        }
    }

    /**
     * Handle a frame event: call any queued functions.
     */
    protected static function handleEnterFrame (event :Event) :void
    {
        // swap out the working set
        var methods :Array = _methodQueue;

        }

        // If no new functions were added while we were calling the current set,
        // then stop firing
        if (_methodQueue.length == 0) {
            _t.stop();
        }
    }

    /** A timer that will fire as quickly as possible. */
    protected static var _t :Timer = new Timer(1);

    /** The currently queued functions. */
    protected static var _methodQueue :Array = [];

    // a bit of static initialization
    _t.addEventListener(TimerEvent.TIMER, handleTimer);
}
}
