mxml

Flex: does painless programmatic data binding exist?

I've only done a bit of Flex development thus far, but I've preferred the approach of creating controls programmatically over mxml files, because (and please, correct me if I'm wrong!) I've gathered that you can't have it both ways -- that is to say, have the class functionality in a separate ActionScript class file but have the containe...

Compiling mxml files with ant and flex sdk

I am just getting started with flex and am using the SDK (not Flex Builder). I was wondering what's the best way to compile a mxml file from an ant build script. ...

Duplicate complex MXML binding in ActionScript

MXML lets you do some really quite powerful data binding such as: <mx:Button id="myBtn" label="Buy an {itemName}" visible="{itemName!=null}"/> I've found that the BindingUtils class can bind values to simple properties, but neither of the bindings above do this. Is it possible to do the same in AS3 code, or is Flex silently generating...

Flex: Custom Item Renderer For Combobox controls truncates text

I've implemented a custom item renderer that I'm using with a combobox on a flex project I'm working on. It displays and icon and some text for each item. The only problem is that when the text is long the width of the menu is not being adjusted properly and the text is being truncated when displayed. I've tried tweaking all of the obvio...

Possible to use Flex Framework/Components without using MXML?

Is it possible to use the Flex Framework and Components, without using MXML? I know ActionScript pretty decently, and don't feel like messing around with some new XML language just to get some simple UI in there. Can anyone provide an example consisting of an .as file which can be compiled (ideally via FlashDevelop, though just telling h...

How to tell when an MXML component has totally finished creation?

An MXML component can be quite complex, containing many nested controls, including asynchronously loaded content such as Image/SWFLoader. Is there one event I can watch for on my component that will only be raised when every control and sub-component has loaded, including SWFs and Images? ...

How do I visually "break out" of a Container in Flex?

Here's my problem - I have some code like this: <mx:Canvas width="300" height="300"> <mx:Button x="800" /> </mx:Canvas> So the problem is that the Button inside the canvas has an x property way in excess of the Canvas's width - since it's a child of the Canvas, the Canvas masks it and creates some scrollbars for me to scroll over...

When should an oldschool flash developer use flex?

What are the key differences between Flash and Flex? I have over five years experience with flash and feel very comfortable developing with it and ActionScript3. I find myself more and more curious about Flex and want to know when it is best to use flash or flex. Also, is everything that can be done with MXML, able to be done with AS3...

Scrollable regions in ActionScript 3 Visualization

What is the best way to create several scrollable regions in an ActionScript 3 visualization that extends flash.display.Sprite and makes use of hierarchy of of low level DisplayObjects (Sprite'a, Shape's, TextField)? I have tried to use three mx.containers.Canvas objects added as children of the main Sprite and have also tried converti...

Flex: Accessing functions / components accross mxml pages

For simplicity lets say I have two flex mxml pages. form.mxml button.mxml If the form.mxml page had the following code, it should work fine: <custom:SelectView dSource="{_thedata}" id="form" visible="false"> </custom:SelectView> <mx:LinkButton label="Show" id="lbShow" click="form.visible=true;> <mx:LinkButton label="Show" id="lbHide...

Resolving Component libs with Flex SDK mxmlc

I'm new to Flex SDK and trying to implement a simple project using Doug Mccune's CoverFlow widget. Most of the documentation out there on how to do this assumes that one is using Adobe's FlexBuilder product, which is a $250 Eclipse plug-in that I'd rather avoid buying. The problem I'm having is simply getting Doug's swc file, which is ...

Flex - Laying out text within a Canvas

Here's a problem I keep running into: I have a lot of situations where I need to display some text with a styled container like so: <mx:Canvas> <mx:Text text="{text}" left="5" verticalCenter="0" right="5" /> </mx:Canvas> As you can see - the text in constrained by the left and right margins of the canvas and I have not speci...

Flash and Flex

Hi there, Just a few quick questions from me: What is the best way to inserting a Flash SWF file into a flex, that will enable me to have it start from frame 0 on reentry of that framework? Would this be States, Viewstack? Is there a way of using forward and back buttons to navigate through displaying a set of States rather than selec...

default namespace scope warning (1084) in Flex script file

I have an MXML file, which references an external script file for all its event handlers: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Script source="LoginExample.as" /> <mx:Button id="btnGoodLogin" click="btnGoodLogin_onClick()" label="Good Login" enabl...

Flex application to component?

I have an application built in Flex Builder 3. It has a fair amount of mxml and as3 code which uses some other custom compenents. I have looked at the documentation on building components which shows how to make a simple mxml or action script component that extends something like a combobox, but I'm lost as to how to take a whole exist...

Why should I use MXML?

If everything that can be accomplished in MXML can also be accomplished in ActionScript and many things are easier to accomplish in ActionScript (loops, conditionals, etc) why take the time to learn MXML? The best reasons I have at this point are that the structure of the MXML nicely matches the visual hierarchy of the UI components and...

What overhead is there of using an MXML file in Flex vs. a plain actionscript class?

I find it much easier to write MXML classes with embedded Script than trying to make an actionscript file. I was wondering however what kind of overhead there is of using an MXML file - in terms of file size. I'm not especially concerned about performance, but if that is relevant would be interested in any findings. Obviously I'm talki...

Flex custom item renderer for the displayed item in the combobox

I am using a custom item renderer in a combobox to display a custom drawing instead of the default text label. This works fine for the dropdown list but the displayed item ( when the list is closed) is still the textual representation of my object. Is there a way to have the displayed item rendered the same way as the one in the dropdo...

Where to begin learning Flex and Flash

I want to start developing Flash and Flex applications so that I can put all of the concepts floating around in my head into action. The problem is that I have never done any programming nor dealt with code...ever. I have worked in the graphic design industry and a lot of the storyboarding features in Flash are intuitive to me. Additiona...

Flex mxml to as3, small class did i miss something ?

Hi, I was using an mxml class but since i need to pass some properties at construction time, to make it easier i will convert it to as3 code. The class is RectangleShape and it just draws a rectangle. Original mxml working <?xml version="1.0" encoding="utf-8"?> <BaseShape name="rectangle" xmlns="org.edorado.edoboard.view.componen...