FLEX中无法直接addChild()

private function initVol():void
   {
    vol = new Sprite();
    vol.buttonMode = true;
    vol.addChild(new pointClass());
    vol.x = 90;
    vol.y = 15;
    vol.addEventListener(MouseEvent.MOUSE_DOWN,down);
    addChild(vol);
   }

上面无法显示添加的内容

解决方法:添加(stage)

private function initVol():void
   {
    vol = new Sprite();
    vol.buttonMode = true;
    vol.addChild(new pointClass());
    vol.x = 90;
    vol.y = 15;
    vol.addEventListener(MouseEvent.MOUSE_DOWN,down);
    stage.addChild(vol);
   }

原文地址:https://www.cnblogs.com/94cool/p/1718655.html