Flex :: Make Width Of Child Components To Be 100%?

Apr 14, 2010

I usually write something like this:

<mx:VBox height="100%" width="155">
<mx:Button label="b1" width="100%"/>
<mx:Buttonlabel="b2" width="100%"/>

[code].....

View 1 Replies


Similar Posts:


Flex :: Layout - Vbox Child Elements To Take 100% Of Width Without Indicating Width="100%"

Sep 12, 2009

is it possible to make the child elements of a vbox to occupy 100% of the width without indicating width=100% for each element ?

View 3 Replies

Flex :: S:WindowedApplication Is Empty And Does Not Initialize / Show Child Components

Jul 5, 2011

I have quite some experience with Flex and I am just starting to write my first AIR application and would like to use as much Spark as possible here. So I started withe a simple Hello World application:

[Code].....

Unfortunately this simple example shows no child components and even none of the initialize handlers is triggered. However as soon as I change the root tag to mx:WindowedApplication everything behaves as expected: The label and the button are shown and the console shows the output of the two trace statements.

View 1 Replies

Actionscript :: Dynamically Adding Child Components To Canvas Vs Group In Flex?

Aug 4, 2011

I've a custom component where I do some graphics (e.g draw a line) and dynamically add a subcomponent (e.g a label) to it.

If I base the component off Group (which is recommended as per docs since its a spark component) then when I dynamically add a label the graphics part disappears.

However if I base it off Canvas this doesn't happen.

Why is that the case?

Here is the code.

MyComponent.as
public class MyComponent extends Group
{
public var x1:int;

[Code].....

View 2 Replies

Flex :: Mxml - UIMovieClip Modify The Width Of A Child DisplayObject

May 11, 2011

I have a collection of UIMovieClip components which reside in an s:HGroup tag. In ActionScript code I am modifying the width of a child clip in one of the UIMovieClips but these changes are not reflected by the s:HGroup.

<s:HGroup id="_buttonGroup">
<uiassets:NavigationTabButtonSWC id="_lobby" />
<uiassets:NavigationTabButtonSWC id="_achievements" />

[Code]....

View 1 Replies

Flex :: Limit The Size Of A Child Container With Percentage Width/height Of 100%?

Mar 11, 2011

How can I limit the size of a child container with percentage width/height of 100%?

Example:

<mx:HBox id="container" width="100%" height="100%">
<mx:HBox id="scrollContainer" width="100%" height="100%">
<!-- keep this content limited to the size of "container" -->

[Code]....

Apparently I can get the desired behavior if I change HBox to Canvas but I would still like to know how to accomplish this with a HBox and why it differs from Canvas.

View 3 Replies

Actionscript 3 :: Make Sure Flex Components Are Loaded At Beginning

Dec 29, 2009

How can I make sure all the components, even those that are not going to be visible at the beginning, load right away when I start my application?I have an application with a ViewStack whose visible child is set via a sidebar menu. Say the ViewStack has two children, A and B. A is initially visible, whereas B is not. How can I make sure they both load at the beginning, so that when I change to B I don't have to wait for it to load?

View 1 Replies

Flex :: Make A Set Of Flex Components A Unit?

Nov 8, 2009

I'd like to make a series of components into a solid, consistently repeatable object. For example, suppose I have a "notification" template that I want to add to a notifications area every time something new happens. This template includes an icon (Image), text (label), and some space between these two things.

I want to take a template like that and make it so I can invoke it with a function like add_notification("icon", "text"). How would I go about doing that?

View 1 Replies

Flex :: While Loading Data Make All The Components Disabled In Adobe

Sep 27, 2010

I have a vertical tab-bar with 4 items with different sub tabs. All the four items use data from a single xml file, which is a big file. When the user clicks on a tab, while the data is being loaded this error is shown. TypeError: Error #1009: Cannot access a property or method of a null object reference. I want to disable all the tabs while the xml file is being loaded.

View 3 Replies

ActionScript 3.0 :: Make A Global Varaible ArrayCollection That Can Call From Different Classes/components In Flex?

May 26, 2009

How can I make a global varaible ArrayCollection that I can call from differint classes/components in flex?

View 1 Replies

ActionScript 3.0 :: Parent.removeChild(child) Doesn't Update Parent Width / Height When Child Was Rotated

Jul 29, 2011

I got a Parent Sprite, let's name it SpriteP, which holds inside it two other Sprites. Sprite1 and Sprite2.[code]Sprite2 is a rectangle. When I rotate it, of course, the height of its parent, SpriteP, GROWS. But I would expect that height to go back to what it should be when I'm removing Sprite2!And it does! If I remove Sprite2 while NOT being rotated, the height of the parent drops back to normal, 200.

View 10 Replies

ActionScript 3.0 :: Parent.removeChild(child) Doesn't Update Parent Width/height When Child Was Rotated

Jul 29, 2011

I got a Parent Sprite, let's name it SpriteP, which holds inside it two other Sprites. Sprite1 and Sprite2.

When Sprite2 is NOT rotated:

Code:
trace(SpriteP.width + ' ' + SpriteP.height); //100 250.
SpriteP.removeChild(Sprite2)
trace(SpriteP.width + ' ' + SpriteP.height); //100 200. -> works, 200 is good.
When Sprite2 is rotated at 90:

[Code].....

And it does! If I remove Sprite2 while NOT being rotated, the height of the parent drops back to normal, 200. But if I rotate Sprite2, the Parent won't update its bounds.

View 1 Replies

ActionScript 3.0 :: Width And Components Acting Weird?

Feb 22, 2009

I have a parent Sprite A, that I add a Label component and aList component to. The Label is placed directly above the Listinside of Sprite A. No matter how I change the width of the Labeland the List, Sprite A always reports a width of 115. How can I fixthis so that it reports the actual width?

View 10 Replies

Android :: Make TextEdit Fill The Width In Flex 4.5

Oct 31, 2011

how do I create a component in Flex 4.5 (using it for android..) that has a textInput and to its right a button, such that the button has fixed size and the textInput expands to fill the remaining space of the parent of the component?

this is the component..

<s:HGroup>
<s:TextInput width="????"/>
<s:Button width="37" height="37" />
</s:HGroup>

of course I don't know what to put in the width.. should I also specify a width for the HGroup?

View 3 Replies

Flex :: Components - Components - Any Component With The Functionality Such As Horizontally Collapsible Window Or Panel

Aug 22, 2010

Do you know any flex component with the functionality such as horizontally collapsible window or panel I found arc90, but it folds vertically.

View 1 Replies

Flash :: Flex Dynamically Created Components Added To Custom Components

Sep 8, 2009

I am created a dynamically adding a VBox, that contains two images. Into a Custom Component that is derived from UIComponent. The problem is the Vbox that contains the two image is only a really tiny size. I would like the VBox stretch to the size of the two images. This is how I am creating the Vbox....

[Code]...

View 1 Replies

ActionScript 3.0 :: Increasing Width Of Scrollpane Components On Android?

Jan 4, 2012

We are working on an android application that works on web also. On android the scrollpane components are showing very small and difficult to catch with finger. We tried to increase the width of scrollpane component but this don't work.

View 1 Replies

Actionscript 2.0 :: Stage.width - Make A Minimum Width And Stop Resize?

May 27, 2009

is there a way to make a minimum width and stop resize? I have a menu I am building that is locked to the bottom of the browser and 3 buttons on the left and a movieClip on the right. When you resize the browser window - currently - you can make the button on the right sink under the three on the left.

[Code]..

View 6 Replies

ActionScript 3.0 :: Use Cs4 Make Loader Load Flex Swf Width/height?

Jul 28, 2009

i use cs4 make as3 loader from SharedObject.getLocal, load flex make swf file, so width/height is not Ok
 
load cs4 make swf file is Ok,
 
as3code:
 
// copy right china summer xiatian qq 11602011
package{
import flash.net.SharedObject;
import flash.utils.ByteArray;

[Code].....

View 2 Replies

Actionscript :: Flash - Function To Adjust Font Size To Make Text Field Width Smaller Than A Given Width?

Aug 31, 2011

Is there a function or property or better way to do what the following code do?

var width:int = 20
while (textField.defaultTextFormat.size > 1 && textField.width > width) {
textField.defaultTextFormat.size--
}

View 1 Replies

Is It Bad Design To Nest Components Inside Components Using Flex 4

Sep 15, 2010

Is it bad practice/design to nest components inside components using Flex 4? Should I simply be creating components and inserting them into my main application as below, or doesn't it matter?

<com:MyComp1>
<com:MyComp2>
<com:MyComp3>

[code]....

View 1 Replies

Flex :: Make FlexMDI Resize It's Child When Window Is Resized?

Oct 2, 2010

I use the addChild(myChild) on a window. but when this window resizes i want to make the myChild width and height to fit the window.

View 1 Replies

Actionscript 3 :: Bad Form For Child Components To Call Methods On Their Parent?

Feb 4, 2010

I have a parent class that instantiates a MenuClass and handles transitions between pages.[code]And here's the MenuClass which creates forward and backward buttons. Clicking each will tell the above ParentClass to transitionForward() or transitionBackward() respectively.[code]One one hand, I feel like the MenuClass is too tightly bound to its parent and is thus less reusable. On the other hand I feel like, in the interest of keeping everything self contained, it's not the ParentClass's responsibility to reach into the MenuClass instance and add event listeners there. This seems like there should be some kind of OOP rule-of-thumb to govern this kind of relationship.Is my MenuClass too tightly bound to its parent? And if so, do you have any suggestions that would loosen that coupling?

View 4 Replies

ActionScript 3.0 :: Specifying Child .swf Width In Parent?

Nov 15, 2010

Basically, I'm working on the ability to load my player swf into a parent swf, instead of simply embedding it on an HTML page (with swfObject, for example).Normally, the player's width and height are determined by the stage.stageWidth, which is set with Javascript during the embed:

Code:
swfobject.embedSWF("mySwf.swf", "flash-holder", "1000", "450", "9.0.0", "/swf/expressInstall.swf", flashvars, params, attributes);

How can I specify this when loading this mySwf.swf into a parent swf? Is the width and height treated in some sort of programatic way like the flashvars and attributes are?

View 3 Replies

Actionscript 3 :: Finding The Width Of TileList - Scrollbar Width Flex

Feb 3, 2010

I've got a TileList with verticalScrollPolicy="on".

Is there a property that returns the width of the tileList minus the width of the scrollbar?

View 1 Replies

Flex :: Setting Button Width To Text Width?

Mar 28, 2010

I am creating a nav in flex that pulls in buttons dynamically from xml. THe problem i am having is setting the button width to the text width. currently the buttons are all the same width and if the text is larger then it just cuts off. I've tried a few ways of doing this:Setting button width to 100%On creation of the button try to set the width of the button to the text programmatically. Something like evt.target.width = evt.target.textWidth;

View 1 Replies

Actionscript :: LoaderInfo.width != Stage.width In Flex 3.5?

Nov 21, 2011

Running into strange behaviour with flex 3.5. Here is a minimal code:build.xml target:

<target name="player">
<mxmlc
file="${APP_ROOT}/player.mxml"

[code].....

View 1 Replies

Actionscript 3 :: Scaling A Container Does Not Affect Width Of Child

May 26, 2011

I've got a container(sprite) with children(sprites) added to it. When I scale the container, I would like to get the new width of a child, but when I trace the children's width I always get the original dimensions, even though everything gets visually scaled as it should. How do I overwrite the children-width ?

Update: I just found out that the children.graphics-"dimensions" could have caused the problem. When I leave the graphics, everything seems ok. Is it possible to scale the graphics at same time as the child-sprite?

View 3 Replies

Flash :: Setting Width For Sprite's Child Image?

Aug 9, 2011

I've a slider class (SliderUI) and I'm passing slider and track images to that class as sprites.

What I'm trying to do is, passing one more image as sprite and changing its width for doing masking in slider. (It will expand or collapse as you move volume slider)

When I try to change width of sprite, it doesn't show up and I guess sprite is just container and resizing it makes it disappeared.

So how can I resize sprite with its child image (it's loaded by a Loader object by the way)?

View 1 Replies

ActionScript 3.0 :: Prevent A Child Swf From Referencing Its Parent Swf Stage Width/height?

Oct 11, 2010

I would like to know the way to prevent a child swf from referencing its parent swf stage width/height?

for example, i created a child swf that loads image and center it on it's stage. As a stand alone its fine but i loaded it with parent swf, it centers on the parent swf instead.

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved