开发者

Flex 4 Remove dynamically created component from the canvas

I am dynamically adding items to a stage. How ever I am having a hard time addressing the objects to remove them from the stage.

I wrote some code to do the remove but it only works with non dynamically created items.

http://pastebin.com/3cKvdVsC <= code sample here (yes I know its messy, I was experimenting with a framework I have never seen before in a very trial and error fashion).

I use "AddItemToCanvas()" to create items and "removeSelected()" to remove selected items from the stage.

In thoery there must be a way to address dynamically created items by name and remove them...

Please and thank you to anyone开发者_StackOverflow社区 who can shed some light for me.


The answer was found here.

http://www.billdwhite.com/wordpress/?p=296

An invaluable article for anyone moving to Flex 4 from flex 3.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜