mruncola
05-23-2008, 12:54 PM
I am seeing the grey box but I am not seeing my button control when it is created through this method?
I know the button object is created because the output window is showing:
ProductResultView Constructor: ProductResultView78
ProductResultView78.Button79
package prototype.display
{
import flash.display.LineScaleMode;
import mx.controls.Button;
import mx.core.UIComponent;
public class ProductResultView extends UIComponent
{
public function ProductResultView()
{
trace("ProductResultView Constructor: "+this);
graphics.lineStyle(1,0x999999,1,false,LineScaleMod e.NONE);
graphics.drawRect(50,50,50,50);
graphics.endFill();
var btn:Button = new Button();
btn.label = "Why?";
addChild(btn);
trace(btn);
}
}
}
I know the button object is created because the output window is showing:
ProductResultView Constructor: ProductResultView78
ProductResultView78.Button79
package prototype.display
{
import flash.display.LineScaleMode;
import mx.controls.Button;
import mx.core.UIComponent;
public class ProductResultView extends UIComponent
{
public function ProductResultView()
{
trace("ProductResultView Constructor: "+this);
graphics.lineStyle(1,0x999999,1,false,LineScaleMod e.NONE);
graphics.drawRect(50,50,50,50);
graphics.endFill();
var btn:Button = new Button();
btn.label = "Why?";
addChild(btn);
trace(btn);
}
}
}