开发者

Adding components to stage at runtime

开发者 https://www.devze.com 2023-02-20 08:07 出处:网络
I am trying to ape the MS Paint application in Flash. I have a small point that I want to get cleared. I want to set the thickness of the line that I am drawing.

I am trying to ape the MS Paint application in Flash. I have a small point that I want to get cleared. I want to set the thickness of the line that I am drawing.

I want to add a numeric stepper to stage dynamically. Only when I click on option to draw line the numeric stepper must appear on stage. It must be removed when I select another component.

How can I add it at runtime. I got tutorials and references in which the stepper is always there on the stage. But I want it only when I want to dra开发者_开发知识库w the line.

Thanks and Regards

Bobby


You would use the addChild and removeChild methods of the DisplayObjectContainer class.

If you're using Flex then you might want to look at PopUpManager instead.


Use the property .visible available on any DisplayObject...

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号