It is possible that the size of the button is being set to 0,0. You could insert a trace to find this out, but it would be just as fast to add the line:
tmp.setActualSize(100,100); Another thing to do is to make sure you can actually see mainStage. If you can't see the parent, you won't be able to see the child. - Dan On 11/17/06, genius_gen2k <[EMAIL PROTECTED]> wrote:
I have been trying to add existing components like Button, TextArea, etc. during the runtime via an external .as file. The code gives me no compile time error nor any runtime error but the component attached during runtime does not get displayed, when I run the project. I even tried the ways mentioned in various documents for doing this but i cant see the component when I run the project. Following is the code I had written: var tmp:Button = new Button(); tmp.label = "sd afjhfjks"; mainStage.addChild(tmp); Here "mainStage" is an intance of MovieClip. I even tried attaching to a UIComponent instance but no result. Can someone give me a solution for this. Amol.
