Flex :: Fill Parent In Adobe / MXML - Implementing Layout?
Dec 6, 2011
I am attempting to implement a layout in Adobe Flex 4.5 / MXML where I have multiple controls in an HBox that - in total - consume all available horizontal screen estate. Some use a relative with (percentage), some an absolute width (pixels) and one is supposed to consume whatever space is still left, such as:
+----------------------+-----------------------+------+
| 35% | fill parent | 10px |
+----------------------+-----------------------+------+
How would I achieve this in Flex (is there something comparable to Android's
layout_width="fillparent")?
Due to the fact that there are elements that have an absolute width I cannot easily calculate the width of the filler as a percentage a priori (as it varies with the screen width). Setting the filler's width to 100% also does not work as this will shrink the 35% area below 35%. Applying the updateDisplayList suggestion from www.Flextras.com's answer below yields the error "Call to a possibly undefined method updateDisplayList" at the line marked in the source excerpt below:
<?xml version="1.0"?>
<mx:HBox xmlns:fx="[URL]"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
creationPolicy="auto"
[Code] .....
View 1 Replies
Similar Posts:
Jun 26, 2009
Im trying to create a layout in flex using mxml, the layout contains a Canvas component and a Box. The layout should always be such that the Box sits at the bottom edge of the application and has a fixed height, whereas the Canvas fills the remaining stage area and does not overlap with the Box. My MXML is as follows;
[Code]...
View 3 Replies
Mar 10, 2010
I am Using Flex 3 and apache with PHP 5.2. I am searching for simple as possible way to fill my mx:List with data using POST URLRequest.
In Flex builder I am using the next code
public var variables_se:URLVariables = new URLVariables();
public var varSend_se:URLRequest = new URLRequest("DataProvider.php");
public var varLoader_se:URLLoader = new URLLoader;
[Code]...
View 2 Replies
Mar 9, 2012
This is a project I'm working on for a simple demo tutorial application in Flex. I am using mxml pages. You can see to the left that I will have my main application and then other mxml files (In the Examples Package) as the examples that will be loaded into the main application mxml. How can I dynamically pull the value from the object in the list to load the child mxml file into the container that I have further down in the application?
View 1 Replies
Aug 15, 2011
how do I get a value from another mxml.I have a vaule in the child mxml that i would like to parse to the parent mxml.Then use the vaule to create a search method.
View 1 Replies
Jun 21, 2009
I'm making a level editor for a game, but this question doesn't have to be game related so I decided to post it here. I'm using Actionscript 2.0 (Flash 8) I'm trying to implement the flood fill algorithm so that I can paint tiles just like the paint bucket in mspaint. The level consist of a BitmapData object which is 2880px in width and 2176px in height.
[Code]....
View 1 Replies
May 17, 2010
I am writing a custom item renderer to render a column series in my application.
Its a stacked chart and i want to use the same item renderer for both the column series. The color for each series in the stack is different and am setting that in the 'fill' property of the two series. My doubt is how can i get the color specified in the fill property of the column series from the item renderer. if this works then i can very well use the same renderer for both series.
View 2 Replies
Sep 27, 2009
Flex newbie question: can MXML be generated on the fly, like HTML is generated by a server? If yes, is it ok to do so or am I missing an important Flex architectural principle.
View 4 Replies
Aug 4, 2010
My flex application gets some parameters from URL when the application opens for the first time(ex: layout=<1,2,3,4> ). Based on layout(1,2,3,4) value I have to change the layout. However the problem is the application is already drawn(Layout is initialized) by the time the control reaches the point where it reads the values from the URL. I was wondering how can I redraw once I read the values from URL. Some thing like refresh.
View 1 Replies
Nov 14, 2011
I am trying to implement some MVC-style UI components in Flex 4. I want to further separate the visual setup (and later runtime modification) of each element. Primarily, I want to keep the overall layout of the data like such in the MXML file that will USE the skin[code]...
View 1 Replies
Feb 11, 2010
Is there an easy way to make a parent container (eg Group) resize when it's children resize?
Below is a little example app. When I put the 200x200 'food' in the 'stomach' the stomach & it's containing 100x100 'body' should resize to contain the food.
[URL]
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
[Code]....
View 2 Replies
Jul 16, 2010
i allready searched abit around here and found the solution to call a fx:script function defined in a mxml from a AS class.
[Code]...
View 7 Replies
Jan 29, 2010
I have simple mxml code
<mx:DataGrid id="DGG"
editable="true">
<mx:dataProvider>
[Code]....
I want to add rows to my table datagrid how to do such thing?
How to add Column to Adobe flex mx:DataGrid in mxml and/or actionsctpt?
(You can put this code in Flash or AIR app - it will compile with no errors, but will not add any columns=( )
View 3 Replies
Dec 15, 2011
I am trying to override the text setter in the Label component but it behaves weirdly sometime super.text works and sometimes not! and the traces show that there's no error with my code.
here's my code:
import spark.components.Label;
public class LabelXX extends Label
{
private var _initialText:String;
[Code]....
View 1 Replies
May 7, 2011
I am using progressive streaming with VideoDisplay, the HTTP URL provided gets buffered completely even if I have configured it to start playing the video when the buffering reaches 20%, the trace message shows that the playing started(using mozilla /Flashbug+Firebug), but it doesnot show the video till the buffercounter reaches 100% How can I get the video stream to play at the 20% of stream.Code Segment where the check takes place
var loadedPct:uint = Math.round(100 * (event.bytesLoaded / event.bytesTotal));
trace('waiting...');
mainVideoCanvas.addChild(LoadingImage);
VidLoadingLabel2.text = loadedPct.toString();
[code].....
View 1 Replies
Dec 18, 2010
I want to use actionscript 3 to create mxml(flex 4) controls dynamically and automatically taking care of layout. For example, if I want to put 6 buttons and a s:label in a layout container by just specifying the positioning of the container and not the locations of individual controls.
View 1 Replies
Sep 24, 2009
Does MXML get compiled down to as3 and then converted to flash bytecode? Also, is there a significant performance penalty to compiling mxml vs compiling as3?
View 3 Replies
Jun 4, 2011
I am working on a custom Flex 4 component which is an aggregation of two existing flex components. I would like to be able to specify my own custom properties for the component as well as access the existing public subcomponent properties via MXML. For instance I might want to adjust the font color or style for the label and text input. toy component which aggregates both a label and a text input:
<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
[code]....
View 1 Replies
Nov 19, 2010
I'm trying to draw a gradient in Flash using beginGradientFill and drawRect, but when the rect being drawn is partially outside the bounds of the parent, the gradient isn't drawn at all.
For example, consider the code below:
function testGradient():void {
var g:Graphics = container.graphics;
var width:Number = container.width;
var height:Number = container.height;
[Code] .....
When the rectangle being drawn lies within the bounds of container, everything works: However, if the rectangle lies outside of the bounds of the container, the gradient isn't drawn at all. For example, if the code is changed to:
...
var x:Number = 10;
var y:Number = 10;
...
Then the gradient disappears: Short of doing the math required to draw the box inside the bounds of the parent (and fixing up the gradient so it looks correct), is there any way to deal with this?
View 1 Replies
May 28, 2011
I am trying to override a Button class, i have a few properties which i wish directly initialise with the mxml description of the component, like :[code]which function is triggered ( in order to override it ) when all properties with mxml description is fully initialised with their values ?
View 1 Replies
Feb 27, 2012
I have an AS3 class on my Flex project[code]...
View 2 Replies
Feb 3, 2011
What I'd like to do: create an MXML component with some children, then extend it via MXML to create a new component with more children, without losing the original set.In other words
create a component bc.mxml
<?xml version="1.0" encoding="utf-8"?>
<s:BorderContainer xmlns:fx="http://ns.adobe.com/mxml/2009"
[code].....
View 1 Replies
Sep 27, 2011
i have defined some functions in a component mxml file let us say addbutton() now i want to call this function in main mxml file.
View 2 Replies
Dec 12, 2011
I need to close the popup(adobe flex), non modal window if I click on the parent page of the popup. I have to do the out of focus check and then do some validation before close the popup. So what I was thinking that is there any inbuilt focus check event or do we need to create custom event for that?
View 1 Replies
Apr 23, 2010
main.mxml
[Bindable]
private var _dp:ArrayCollection = new ArrayCollection([
[code].....
View 1 Replies
Jul 24, 2010
I am trying to save the information for a layout of movie clips on my stage. I am using the sqlite functionality in order to be able to save the layout to the local database. Each layout consists of several movie clips. My plan was to store pertinent information regarding these movie clips (such as x and y position) in order to be able to reload some new clips in the exact same place.
My problem here is that I want to create just one row in my database for each layout, but I want one column in that row to store the information for each of those clips (in a single row). Is there some kind of nested table functionality in sqlite?6564
View 2 Replies
Aug 12, 2009
A Flex components values are initlized by init methord. In an application flow, How to refresh a mxml component data value ; as init is callled at the start up it self only.
eg. of mxml componet may be as simple as button label or text as complex as repeater whose data provider is a web service ( means a fresh quesy should be made to pull the data and refresh the dataprovider of repeater )
View 3 Replies
Jul 7, 2010
suppose i have 3 buttons(for example say, productin, marketing, sales ) on my main.mxml..once i click on one button it should take me to abc.mxml page with production data, once again if i click on second button it should take me to the same abc.mxml but with marketing data. same as for 3rd button also, how can i achieve this ?
View 2 Replies
May 18, 2011
I've been trying to create a custom mxml component that extends another custom mxml component (i.e.MyMXMLComponent -> BaseMXMLComponent -> Group). I've been reading that trying to add visual children to MyMXMLComponent caused error with Flex 3 but that's no longer the case with Flex 4.
What I want to know is whether this is a supported/fixed/documented feature of Flex 4? or just some undefined behavior in Flex 4 that may get changed with future updates?
if this is supported and documented feature, does anyone have link pointing to adobe document stating it as such?
View 1 Replies
Apr 24, 2010
I'm trying to work out how to use states in my Flex app.I've created two states, State1 and Stage 2. Both are based off the base state. I've created a few visual elements for State1, and given each of them includeIn="State1".But when I'm in design mode and click on State2, these elements are still visible?If I try to delete them while State2 is selected, all that happens is RemoveChild is added to the State2 tag.
View 1 Replies