Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 08-13-2007, 06:01 PM   #1
Registered User
Join Date: Jan 2007
Posts: 85
Default I cannot add VBox in UIComponent?


Whenver I add VBox container to UIComponent it never occurs on the screen, but when I added it to Application.application.addChild(vbox) then it become visible?

Can I only add Vbox to the application and not to a uicomponent? or what?

Someone please explain and thanks for your help.

HW2002 is offline   Reply With Quote
Old 08-13-2007, 06:20 PM   #2
Assertnfailure's Avatar
Join Date: Dec 2005
Location: LA, California
Posts: 837

Maybe the UIComponent you're adding it to isn't in the display list yet?

You guys need to stop putting these threads in the AS 3.0 forum. There's a Flex forum dedicated to this.
Assertnfailure is offline   Reply With Quote
Old 08-13-2007, 06:32 PM   #3
dr_zeus's Avatar
Join Date: Mar 2005
Location: Silicon Valley
Posts: 1,999

If you're adding a child to a plain UIComponent, you need to remember to explicitly set the size of it's children or they won't be visible. Flex containers will do it automatically, but you have more control in UIComponents.

ActionScript Code:
var w:Number = myVBox.getExplicitOrMeasuredWidth(); var h:Number = myVBox.getExplicitOrMeasuredHeight(); myVBox.setActualSize(w, h);
Josh Tynjala | Feathers
dr_zeus is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PayPal Add To Cart Button mikenificent ActionScript 2.0 7 09-02-2008 10:35 PM
Adding ADD To Cart Button cl&hcl Flash 8 General Questions 0 05-28-2007 04:25 PM
How to dynamically add button to a TextField Innova ActionScript 2.0 6 04-25-2007 07:11 PM
How To add New Level nomiqw ActionScript 2.0 0 04-20-2007 10:43 PM
Help Me Troubleshoot My Site??? mark_pouncey ActionScript 2.0 0 02-02-2007 01:51 AM

All times are GMT. The time now is 11:46 PM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.