mxml

Flex 3: Top align Image and Label

Hi there, In Adobe Flex 3, I have an HBox containing an Image and a Label: <mx:HBox width="240" verticalAlign="top" horizontalGap="8"> <mx:Image width="46" source="@Embed(source='/assets/blah.swf')"/> <mx:Label text="Blah."/> </mx:HBox> My Goal is to align the top edge of the Image and the top edge of the Label (the top of ca...

Can you recommend a couple of really good AS3 and MXML editors for Mac?

I've just switched from Windows to Mac and need to find a few tools to replace those that were Windows-only. I'm most familiar with FlashDevelop, which I've used for years, but it is Windows only. SEPY seems to have been abandoned, FlashIDE's editor seems weak, and I don't want to purchase FDT or FlexBuilder right now. I would like an...

How do I stop a datagrid's first-row itemRenderer from instantiating/adding/initializing/etc twice?

In a Flex DataGrid's first row, the itemRenderer will initialize twice. Tracing the results reveals that the flex framework is possibly creating two instances of the first row's itemRenderer. In a more complex application, where the itemRenderer contains a data-bound ColorPicker, we're seeing an infinite loop occur because of this prob...

FlashDevelop cannot see the MXML Component File I made

Following a Video tutorial on Flex, but I am inside the FlashDevelop IDE as opposed to Flex Builder. Now, in the video they create a custom MXML Component which is simply a derived Horizontal Box. The markup of the video tutorial to mine is the same and I have the MXML file in the same folder as the Main.MXML. I get the following ...

for loop in Flex 3

i want to create a loop withing my mxml code to create a variable number of input fields based on an integer value , this value is the result of a call which gets the number of columns in a database table. i have tried to use the repeater component however it needs an array, and my call is an int. Is there something in flex mxml whcih ...

Complete / Progress events aren't firing for Image control with embedded content

I've got the following MXML tag: <mx:Image id="image" width="100%" height="100%" source="@Embed('../assets/Test.swf')" complete="completeHandler(event)" progress="progressHandler(event)"/> But for some reason my completeHandler / progressHandler functions aren't being called. The reason I n...

Is MXML valid XML?

I am just curious, in MXML many tags are capitalized(eg: < Label /> ). I know this is because the node name is in relation to the class name the node represents and by convention classes are capitalized. But one of the rules of XML is that all node names be lowercase. So does this mean MXML is invalid XML? ...

Creating multiple TextInput fields in for loop

HI, I need to loop through an array and for each element create a textfield. My problem is how to create a new identifier for each new TextInput this is my code; var count:Number = 0; for (var i:String in columnsData) { var myTI:TextInput = new TextInput(); myTI.width = 70; myTI.height = 25; myTI.text = columnsData[i]; myTI.name = "my...

Flex compiler metadata "DefaultProperty"

Hi, Given the following: <?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2009/mxml"&gt; <mx:Panel title="blah"> <mx:Button /> </mx:Panel> </mx:Application> Can you tell me where child elements (ex. mx:Button) are assigned in parent elements (ex. mx:Panel) by default by mxmlc. You can set the "Defaul...

How can make column widths bindable in two Flex AdvancedDataGrids?

Bear with me here. I have a strange setup to accomplish what I need. I basically have an AdvancedDataGrid that displays data returned by a WebService. The data is in XML format: <children label="parent 1" value="3100"> <children label="child 1" value="1100"> <children label="grandchild 1" value="200"> </children> ...

How can I best convert an AS1/AS2 application to an ActionScript3 application?

I have a program consisting of multiple SWF's. An AS2-SWF loads a bunch of AS1-SWFs. It's a crappy program. I'd like to specify the GUI in MXML and perhaps refactor some code to AS3. However, converting all of the 300+ symbols to AS3 or whatever is undoable. What are my options in converting to AS3/Flex/MXML? The app is very simple, o...

Dynamically load CSS in Actionscript/Flex

Problem Definition: To be able to dynamically load a CSS at runtime to skin a Flex Application. More Information: I've found that loading and applying a CSS is as simple as using "mx:style source="../assets/default.css"". But what I would like to do is something more like (pseudocode): If (condition == 1)<br /> mx:style source="../as...

confused about HttpService's useProxy (Flex 3)

I have a flex app, where the user can provide a link to a resource. I want to perform a simple validation and check if the url is actually valid (not just structure, but actually test the link to ensure I get a 200 OK). I figured I would just use HttpService and use the HEAD method, but it seems that this is only available when you set ...

How do I read from a config file in Flex?

Hey, I'm working on a project for school right now and we're trying to get it set up so that it is easily deployable. The webapp portion of it is written entirely in Adobe flex. However, we need links to certain files / url's within the code which are different on different machines. For instance, my server might use 8180 as the port ...

Compiling flex modules into swf with other mxml files in ant

I have a huge project with many mxml and as files and am trying to compile them all into one working swf file using ant. However, I'm having trouble compiling main.swf correctly in ant. It doesn't seem to be pulling in the necessary modules, all of which are located in separate folders within the main src folder. It will compile with...

How to embed a excel sheet inside the property sheet of a flex component?

I am trying to create a custom component in flex using mxml. I have created the property sheet for the custom component but it needs a button which onclick has to point to a cell in excel sheet from which data can be retrieved. How to go about this? ...

Flex Type Coercion, it's gone mental I think...

I have a class essentially: public class WindowEvent extends Event { public static const WARNEVENT:String = "warnEvent"; public static const TASKREQEVENT:String = "taskRequestEvent"; public static const TASKANNOUNCE:String = "taskAnnounce"; public static const WINDOWCHANGE:String = "windowChange"; public static const...

getting mx:CheckBox values from inside mx:Repeater

I have an an array of objects that I use as the datasource for my repeater. <mx:Repeater id="categoryRepeater" dataProvider="{this.allCategories}"> <mx:HBox> <mx:Spacer width="20"/> <mx:CheckBox id="categoryCheckBox" label="{categoryRepeater.currentItem.question}"/> </mx:HBox> </mx:Repeater> I would like to be able to tell which of th...

Binding effect properties inside effect tags not working?

We're trying to do this: <rollOverEffect> <AnimateProperty property="scaleX" toValue="{originalWidth + scaleFactor}" /> </rollOverEffect> However, it seems as though the effects toValue is always NaN. If I set the value to a constant the effect works. Isn't it possible to use databinding for effects like this? Addendum: Both or...

Flex: Accessing MXML from class

I have a class that I instantiate at creation complete: public var catalog : AppCollection = new AppCollection (catalogStrip); CatalogStrip is an HBox. In this class, I create a VBox and add it as a child to catalogStrip. Here is the constructor for said class: public function AppCollection (_container : HBox) { this.container =...