Hi,

use;


box:VBox = new VBox();

box.width = 100;
box.height = 100;

 

 if(!Vboxid.contains(box)){
      

       Vboxid.addChild ( box );
   }

  box.x = Vboxid.mouseX ;
  box.y = Vboxid.mouseY;

You could use the name property of the box and do a more complicated check.'

The above will only work if 'box' is not a local variable. It needs to be an instance of a class.

Peace, Mike


On 10/16/06, learner <[EMAIL PROTECTED]> wrote:

Hello all ,

Is there any way by which i can decide if the any component contains a particular component or not.

something like this :

 

box: : VBox = new VBox();

box.width = 100;
box.height = 100;

 

 if(Vboxid[box]== undefined){
      

       Vboxid.addChild ( box );
   }

       box.x = Vboxid.mouseX;
        box.y = Vboxid.mouseY;

 

 

I get run time error at if condition ,The simplest way I thought was to keep one Boolean and toggle it ..But I think there should be some other way 

Please tell me what is correct way to do it?
 

Regards

Ps

 




--
What goes up, does come down. __._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to