Questions tagged [mxml]

MXML is an XML-based declarative language similar to CFML

MXML is an XML-based () declarative language created as part of the Adobe Flex framework.

MXML tags represent components written in ActionScript () under the hood. When you compile a Flex () application, the MXML is compiled using Adobe's mxmlc compiler into ActionScript which is then compiled with the application's actionscript code into a SWF () file.

Because of this, anything done in MXML could also be written in Actionscript. The language exists in order to simplify and accelerate application development for the Adobe Flash platform.

1126 questions
7
votes
2 answers

Why doesn't mxml support component constructors?

Why doesn't the Flex framework's mxml language support a constructor for components or accept constructor arguments for components? It's as far as I know not possible to declare an ActionScript object in mxml if it takes constructor arguments. I'm…
Gunnar Karlsson
  • 28,350
  • 10
  • 68
  • 71
7
votes
4 answers

Can I bind a Flex component property to a function?

I want to set the enabled property on a button based on the return value of a function that has one or more parameters. How can I do this? private function isUserAllowed (userName:Boolean):Boolean { if (userName == 'Tom') return true; if…
SkunkSpinner
  • 11,429
  • 7
  • 40
  • 53
7
votes
1 answer

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:
Eric
  • 11,392
  • 13
  • 57
  • 100
6
votes
5 answers

does actionscript addChild require a display object first

Solution: if you have the same problem, addElement() instead of addChild() is what did it I'm trying to move away from mxml to actionsctipt. I have a that I've created and set its properties, but having trouble adding it. var aRect:Rect =…
touB
  • 163
  • 1
  • 9
6
votes
3 answers

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…
Parappa
  • 7,566
  • 3
  • 34
  • 38
6
votes
2 answers

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:
Naftuli Kay
  • 87,710
  • 93
  • 269
  • 411
6
votes
1 answer

communication between two flex apps

I have 2 flex apps on the same page. I want them to be able to call each other's public functions. I am thinking of using either externalInterface calls or FaBridge to do so. Is there a better way to do it?
CodeQrius
  • 429
  • 1
  • 7
  • 23
5
votes
2 answers

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 =…
5
votes
3 answers

Flex conditional compilation of MXML?

In Flex it is now possible to use the -define compiler option to do all sorts of cool stuff. In my program, I am using the option such that some of my code is excluded by blocks like this: CONFIG::FACEBOOK{ //Some code } And this is working…
5
votes
4 answers

How would I include an MXML file inline another MXML file?

I would like to include an MXML file in my MXML file in the same way you can include an external file in AS3 using the include directive. Using the include directive brings the code from the external file into the original file at compile time…
1.21 gigawatts
  • 16,517
  • 32
  • 123
  • 231
5
votes
1 answer

How to set the name property of spark State declaratively to a string variable value

I have spark States declared in mxml. I also have a class with string constants. I want my states names to match the string constants. Is it possible to do that directly in mxml and how? I don't want to use the same string, I want to set the name…
Branislav Abadjimarinov
  • 5,101
  • 3
  • 35
  • 44
5
votes
2 answers

How to put MXML child nodes within a custom Flex 4 component?

Here is an example of a custom component. It is just a box with a title label and a close image (X): (INSTANCE MXML)
W3Coder
  • 620
  • 8
  • 20
5
votes
4 answers

How to set TextArea height to its content height

I have an mx:TextArea and I want its height to be the same as its content height. There is nothing fancy - just a text area and text that is not editable. I need a simple and reliable way to make the control fit and show all the text without…
Branislav Abadjimarinov
  • 5,101
  • 3
  • 35
  • 44
5
votes
4 answers

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…
Samuel Crank
5
votes
1 answer

Whats the itemChangeEffect equivalent in Spark List?

In flex 3, with List component, you could add an effect to the itemChangeEffect property, allowing you to animate the addition/removal of the items in the list control. The equiv in the spark list appears to be the rendererAdd and Removed events,…
Method
  • 353
  • 3
  • 10
1
2
3
75 76