[Windows XP, CS3] I stopped it at a point where everything is rendered
on the screen.  I can see it all fine, then I go back to the debug
console, and click step into, and then I alt+tab back to the swf window,
and everything has vanished from the stage.  Does this situation sound
familiar?  At the end of renderQuatrants() is where I stop it.

- MM 


private function keyListener(k:KeyboardEvent):void {
        q = new Quadrants(2880, 864);
        addChild(q);
        stage.addEventListener(KeyboardEvent.KEY_UP, q.renderQuadrants);
}

public function renderQuadrants(k:KeyboardEvent):void {
        if (k.keyCode == 32) {
                k.target.stage.removeEventListener(KeyboardEvent.KEY_UP,
renderQuadrants);
                getDataFirst();
                // focus is setable after it's all been added to the
stage display list.
                k.target.stage.focus = fields[0]; <-----DEBUG STOP HERE
        } 
}

private function getDataFirst():void {
        dataInputs = new Sprite();
        fields = [];
        var locs:Array = [new Point(900,300), new Point(1500,300), new
Point(50,200), new Point(200,200)];
        //set up quadrant data inputs
        var i_debate:TextField = new TextField();
        fields.push(i_debate);
        var i_lead:TextField = new TextField();
        fields.push(i_lead);
        var i_listen:TextField = new TextField();
        fields.push(i_listen);
        var i_support:TextField = new TextField();
        fields.push(i_support);
        for (var i:uint = 0; i<fields.length; i++) {
                fields[i].tabEnabled = true;
                fields[i].type = TextFieldType.INPUT;
                fields[i].x = locs[i].x;
                fields[i].y = locs[i].y;
                fields[i].width = 100;
                fields[i].height = 40;
                fields[i].restrict = "1234567890";
                fields[i].embedFonts = true;
                fields[i].defaultTextFormat = tf;
                fields[i].maxChars = 3;
                fields[i].border = true;
                fields[i].borderColor = 0x00FF00;
                fields[i].background = true;
                fields[i].backgroundColor = 0x000000;
                dataInputs.addChild(fields[i]);
                //fields[i].addEventListener(Event.CHANGE,
displayInput);
        }
        goButton = new QuadrantGoButton();
        goButton.x = 500;
        goButton.y = 500;
        goButton.addEventListener(MouseEvent.MOUSE_UP, displayData);
        dataInputs.addChild(goButton);
        addChild(dataInputs);
}

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to