mxml

Flex: Binding to an MXML-esque "binding string" in action script?

Is it possible to specify MXML-esque "binding strings" in ActionScript? For example, I want to be able to do something like: MXMLBinding(this, "first_item", this, "{myArrayCollection.getItemAt(0)"); MXMLBinding(this, ["nameLbl", "text"], this, "Name: {somePerson.first} {somePerson.last}"); Edit: thanks for the...

static/private child component in mxml?

Are there any way to declare a child component in mxml which is private/protected or even static? Sure we can do this inside a script tag, but are there any other way? ...

Flex 4: Build a Group with a background

I'm trying to build a simple component extending spark.components.Group to have a background color, more specifically a spark.primitives.Rect component stretched to fill the background. This is what I've come up with thus far: <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="libra...

Problem using flex to read XML in e4x format from SOAP webservice

UPDATE: The problem was not to do with namespaces or flex at all. My webservice was returning the wrapped xml. I was blaming the language I had least experience with before questioning the java... I have a basic soap webservice that I am having trouble reading the result from in flex. I'm a solid java programmer and just tryi...

Thumbnails for mxml components in Flex

Hi! Is it possible to make some kind of 'dynamic' thumbnails for mxml components which I'm using in my application? By 'dynamic' I mean if I change some layout in mxml component, my thumbnail refreshes according to new layout without any screen capturing, photoshoping or similar =) Thanks! ...

Flex BitmapData or ImageSnapshot for uninitialized components

Hi! I would like to make some kind of thumbnail with capturing BitmapData or ImageSnapshot of some UNINITIALIZED components in my Flex application. Is it possible? Thanks in advance! m. ...

Compiling MXML files into multiple SWF files using mxmlc compiler

Hi, I have a few mxml files that I want compiled into their respective SWF files using a configuration file. At the moment I can get 1 mxml file compiled into it's respective SWF file by using the file-spec attribute in the configuration file but how would I go about compiling multiple mxml files at once? Do I have a separate configurat...

mx:MediaPlayback Flex tag

I'm trying to compile gui/flex/songs.mxml in the fourth edition of Bruce Eckel's Thinking in Java book and am getting a compilation error with Flex 3.4. Here is a simplified version of the example that gives the same error: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundCo...

Flex TileList start offset and click handler

Hello! I have some images I would like to display in TileList in Flex. My TileList dimensions are 2 columns by n rows. What I want to do is to display the first item (row 1, column 1) empty and not clickable, and to start displaying my items from row 1, column 2. Is that possible? I also wonder when I create click event for the same Til...

Program doesn't respond when I add canvas on enterFrame function

Hello all! I have been making a simple aplication and i have a problem i cannot find the solution (neither why it is happening) The thing i want to do is to dynamically add a canvas containing a button to the application and then i want the canvas to be moved from the left side of screen to the right. So i have made the following code...

Greyed out buttons in MXML file even though it says enabled="true"

In the main Canvas of a ViewStack I have a few combobox and a two buttons. Each is coded appropriately. In one of my canvases the buttons and comboboxes are enabled. But, on the main canvas all are greyed-out and disabled. I have put enabled="true" on each of the elements. I am new to Flex and have been trying to troubleshoot this fo...

AIR application design

Hello! I would like to make some AIR application which would be used for tracking jobs inside a company. The idea is to create some database which will handle all the data and, when other users form other computers modify data, it is always saved on that same 'server'. So, more than one user can edit same database, and it would be great ...

Flex: Components bound to empty ArrayCollection at load time don't render as expected when the ArrayCollection is updated

Hi, I'm new to Flex and am using TileList bound to an ArrayCollection. The array collection is empty at load time, and then updates with the results from am HTTPService call. The problem is that the item renderers aren't being rendered as expected, I'm guessing because there was no data when they were first rendered at load time. Here's...

Is this the correct way to call a component method inside mxml

Hi, I'm hacking my way through learning Flex and have found some strange behaviour. When I try to compile my code, I'm thrown this error - Error: Call to a possibly undefined method updateStory. I've used method calls in this way before, and can't spot what's going wrong in this case. Here's the code for the component: <?xml version="1...

flex mxml multiple layers

Hi, is it possible to have multiple layers in a flex mxml document? What I actualy want is a panel with a form in it, but with a movieclip as a background. What is the best way to implement this? Using Flex 3.4 ...

Binding custom components values

I have built a custom component using some containers and a TileList. Now when I instantiate that component in my main Flex app, I want to get the value of the selected item in the tileList that the user clicks on. In other words, everytime the user clicks an item in the tileList, I want it to assign that selected value to a global appli...

Flex error 1120 (Access of undefined property XXX) when using constants in MXML

Hey folks Again pulling my hair out due to some Flex/AS3 weirdness. The following code does not compile due to error 1120 - Access of undefined property AbstractWizardModel <mx:HBox id="cntr_buttons" width="100%" horizontalAlign="right"> <mx:Button label="{model.getButtonLabel(AbstractWizardModel.GO_BACK)}" /> </mx:HBox> The const...

Handling TextInput width and styles in Flex

Hello! I made a Form container with few TextInput fields in Flex and I would like to change a style of clicked TextInput element. I managed to do it with MouseEvent.CLICK event listener but it is not what I expected. I would like to change style of TextInput when user try to edit that field. However, I want to change back to 'default' st...

Dynamic Image resizing

In my flex app there's an item renderer for a TileList that I am using. I load the image into the Item Renderer at runtime. I am using the following code to resize the image width and height. But it doesn't seem to be working. I debugged the flex app and find that the actual width and height values are getting assigned. But the image n...

Flex RemoteObject + Zend AMF Server problem

Hello! I am working with php, Flex and zend's AMF Server using this guide. I successfully managed to connect php with Flex but after 'reconstruction' of my MySQL query I get a little bit different objects - some of their values are NULL. That confuses Flex and I get an error from my RemoteObject: Was expecting mx.messaging.messages.Ackno...