all groups > flash actionscript > may 2004 >
You're in the

flash actionscript

group:

problem creating nested button in component


problem creating nested button in component higgo
5/26/2004 8:58:34 PM
flash actionscript: Hi, I'm using MX Pro and have created a component (TextBox) that has a button
(mcButton) in its Library. In the actionscript for the component, I use
CreateObject to create an instance of the button on the stage.

this.createObject("mcButton", "mcButton", getNextHighestDepth());

This all works fine - when I test the component, the button is placed on the
stage and does all the button stuff its supposed to.

The problem is when I call my component from another Actionscript file (again,
using createObject). I can see all the elements of the Component except the
button.

If the button is created when I unit test my component, how come it isn't
created when I create the object programmatically?

.as files are attached - please note the TextBox.as file is modified from a
tutorial posted on UltraShock

thanks,
Mike


Re: problem creating nested button in component higgo
5/27/2004 3:05:02 AM
AddThis Social Bookmark Button