mxml

Importing a SWC for a Flex Project in Flash Develop

Hi Everyone, I just started using flashdevelop for flex apps (I had been using it for pure as3 projects previously). I can't figure out how to import files and such. I have included them to the library as usually. In this case I have included flexlib.swc and flexmdi.swc. Both are in my lib folder and both have been right clicked and Adde...

Set Flex component width to 100% at runtime?

If I am creating say a input field through MXML, I can set the width to 100%. But I cannot seem to do this at runtime through ActionScript. This works: <mx:TextInput ... width="100%" /> This wont compile, says width is a number, not a string: var textinp:TextInput = new TextInput(); someContainer.addChild(textinp); textinp.width = "...

size the height of a flex component to fill the space available on stage

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; <mx:Module xmlns:...

In Flex, is there something like a 'this' reference for an MXML component?

I could code what I want to achieve like this: <mx:Button id="someButton" click="doRememberButton(someButton)" ... /> but would find it very helpful (I am putting together a rather large UI) if I could write: <mx:Button click="doRememberButton(this)" ... /> Now, the obvious problem is that 'this' does not point to the Button, but t...

Degrafa drawing tools - do they exist?

I'm trying to find an easy way to use degrafa with MXML. I'm no artist and creating graphics using code just seems very wrong when you can't visualise what is needed to make the required art work. What I'm after is a tool that can take an SVG graphic and convert to suitable MXML tags so that I can copy/paste them into a MXML file. There...

Define possible values for a property in Flex

In Flex, is it possible to include some kind of MetaData to a property, to be able to list all possible values that a property can use? I want to be able to list the values when calling the property from MXML, as in the case of for example the property enabled or visible, where the user gets a list of "true/false". ...

How to access mxml (Flex) DOM elements?

Is there a way to access the DOM-Elements of a mxml file in a way that you can in JS (e.g. using Prototype or jQuery)? I need to know if a top-level element has a child (sub-sub-...-childs) with a certain id. In JS (using prototype) it would be something like: $('tabs').select('[id="something"]'); Any ideas? ...

Why check boxes do not stayed checked as you scroll using flex ?

I've had problems using check boxes in data grids that are populated using dynamic data. The check boxes do not stayed checked as you scroll. How can i solve it ? ...

Sizing Flex DataGridColumns(Dynamic number)

I have a DataGrid that has between 4-10 columns. I want the columns to be of width '50'. I have already set the width attribute in MXML. I am using "colName.hide = true" to hide various columns depending on whether I have data. I find that my columns expand when I have less columns. Is there a way to set the max width of a column or forc...

Is there a way to choose an MXML component at UI construction time based on the value of a field?

I have a flex MXML UI that is building a set of radio buttons using the Repeater component: <mx:Repeater id="radios" dataProvider="{_lists.(@id == _question.single.@response_list).group.listItem}"> <mx:RadioButton groupName="responses" label="{radios.currentItem.@text}" data="{rad...

Custom component with combobox-like behaviour

I am trying to create a custom component in flex that consists of a Button, and a TileList directly below that button. On button click event the TileList should open/close. The component works fine, but when I add it to my main flex app, inside a VBox, it simply opens and closes within the VBox. Because the height of the VBox is much sma...

Click-outside event on custom components in flex

Is there a way to write a custom event that gets triggered when the user clicks outside of that custom component instance? Basically anywhere else in the main flex app. Thanks. ...

Move Button into grid space of a TabNavigator's tabs in Flex Builder.

I have a layout question for Tab Navigators in Adobe Flex 3. Is it possible to insert a button that invades the grid space of the tabs? I have a tab navigator component and I am dynamically adding sub components to tab navigator and I want squeeze a button inside the tab space. I don't want the button to be another tab. And I don't w...

Flex builder resource management bug

I have discovered a very strange bug with the Flex resource manager in my 3.3 Flex SDK. I have created an example with view source enabled here: http://pixelbox.net/demos/buttonBug/ As you can see I am not doing anything strange, other than settings a maxWidth and then giving the button some text that causes it to truncate. The proble...

Auto-sizing the height of a TileList

Is there a way to have the TileList component to auto-size to its contents? I have tried setting it 100%, but it seems that won't help. I don't want to hard-code the height because the content will be vary, and I don't want scrollbars to show up. Please help. ...

Adding flex components using xml

I have a dozen different custom components in my flex app. I want to use an external xml config file to load the components at run-tine. Can someone tell me whats the best way to architect this? I want to load these components and add dataProviders and event liseners to them at runtime. A brief example will greatly help. ...

Create instances of flex custom component by passing in type

In my flex app there are a few custom components. I want to create instance of these components at runtime and assign them properties by reading in a config file. I know how to read xml and instantiate components, however my question is about being able to get the type of the component from the xml attribute and then creating an instanc...

Flex: Getting a variable from your regular component to an inline item renderer

I am trying to turn labels red when they can no longer be added to a list because of size requirements. The renderer works but Flex creates a separate component. I can't think of any good way to get that value to the new component. Any ideas? <mx:List... > <mx:itemRenderer> <mx:Component> <comp:SetSizeLabel nu...

pass parameters to HTTPService and use them inside the URL

Flex3 + Cairngorm. I have my service in Servicis.mxml: <mx:HTTPService id="docIndex" url="{URL_PREFIX}/jobs/{???}/docs" resultFormat="e4x"/> And I call it from my generic restful delegate like this: public function index(params:Object):void { var call:AsyncToken = services.getHTTPService(resourceName+"Index").send(params); call....

Changing view states on application resize

I want to change the view states in my flex app when it resizes in the browser window. I have the swf embedded at 100% x 100%. So when the user resizes the window below a certain width, I want to switch to a different state. I tried adding an event listener like this, but it only fires the event when I resize the swf outside the browser,...