         } else {
             mask = new Shape();
             // the mask must be added to the display list (which is wacky)
-            rawChildren.addChild(mask);
+            addChild(mask);
             _media.mask = mask;
         }
 

                }
                loader.unload();

                rawChildren.removeChild(loader);

            } else if (_media is VideoDisplay) {
                var vid :VideoDisplay = (_media as VideoDisplay);
                // remove any listeners
                vid.removeEventListener(ProgressEvent.PROGRESS,
                    loadVideoProgress);
                vid.removeEventListener(VideoEvent.READY, loadVideoReady);
                vid.removeEventListener(VideoEvent.REWIND, videoDidRewind);

                // dispose of media
                vid.pause();
                try {
                    vid.close();
                } catch (ioe :IOError) {
                    // ignore
                }
                vid.stop();

                // remove from hierarchy
                removeChild(vid);

            } else if (_media != null) {
                if (_media is UIComponent) {
                    removeChild(_media);
                } else {
                    rawChildren.removeChild(_media);
                }
            }
        } catch (ioe :IOError) {
            log.warning("Error shutting down media: " + ioe);


import flash.net.URLRequest;

import com.threerings.util.StringUtil;

import com.threerings.media.image.ImageUtil;
