mxml

ActionScript MXML <mx:> vs <s:>

蹲街弑〆低调 提交于 2019-12-01 21:37:06
Looks like I can use components for both <mx:> or <s:> . So, which has more advantages? As other posters have mentioned, the spark (s:) namespace refers to the new components introduced with Flex 4, while the halo/mx (mx:) namespace refers to the older components. They can be used together, which is necessary since there are not spark equivalents for all of the mx components (notable omissions are DataGrid, Tree, DividedBox, among others.) Some of the motivations for the new spark components include: Separation of form from function, which means the spark components are very much skin driven.

Extending MXML custom components via MXML

眉间皱痕 提交于 2019-11-30 23:11:46
问题 What I'd like to do: create an MXML component with some children, then extend it via MXML to create a new component with more children, without losing the original set. In other words create a component bc.mxml <?xml version="1.0" encoding="utf-8"?> <s:BorderContainer xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" width="400" height="300"> <s:Button id="b1" label="button1"/> </s:BorderContainer> and then extend it

Whats the itemChangeEffect equivalent in Spark List?

安稳与你 提交于 2019-11-30 21:04:11
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, but this doesn't allow complete control over the effect, since removal is done as soon as the event has been dispatched, allowing no time for the effect. Does anyone know how to accomplish the same on a spark list? Lance Pollard Check out this answer on Stack Overflow: Animating Child Elements in Flex 4 . Flex 3 Lists had the itemChangeEffect

Whats the itemChangeEffect equivalent in Spark List?

扶醉桌前 提交于 2019-11-30 17:11:13
问题 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, but this doesn't allow complete control over the effect, since removal is done as soon as the event has been dispatched, allowing no time for the effect. Does anyone know how to accomplish the same on a spark list? 回答1: Check out this answer on Stack

Can I bind a Flex component property to a function?

主宰稳场 提交于 2019-11-30 13:55:26
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 (userName == 'Bill') return false; } <mx:Button label="Create PO" id="createPOButton" enabled="<I want to call isUserAllowed ('Bill') or isUserAllowed ('Tom') here>" click="createPOButton_Click()" /> <mx:Button enabled = "{this.myFunction(this.myVariable)}" > or inline: <mx:Button enabled = "{(function(arg:Object):Boolean{ ... })(this.myVariable)}" > According

Flex: What's the difference between an MXML “Component” and an MXML “Module”?

心不动则不痛 提交于 2019-11-30 11:35:06
As the title suggests, what's the difference between a "Component" (New –> MXML Component) and a "Module" (New –> MXML Module)? Thanks, David Modules are compiled into SWFs and loaded at runtime with ModuleLoader, whereas MXML components are compiled into an application. From the Flex docs: Modules are SWF files that can be loaded and unloaded by an application. They cannot be run independently of an application, but any number of applications can share the modules. Modules let you split your application into several pieces, or modules. The main application, or shell, can dynamically load

Flex: What's the difference between an MXML “Component” and an MXML “Module”?

六月ゝ 毕业季﹏ 提交于 2019-11-29 17:17:29
问题 As the title suggests, what's the difference between a "Component" (New –> MXML Component) and a "Module" (New –> MXML Module)? Thanks, David 回答1: Modules are compiled into SWFs and loaded at runtime with ModuleLoader, whereas MXML components are compiled into an application. From the Flex docs: Modules are SWF files that can be loaded and unloaded by an application. They cannot be run independently of an application, but any number of applications can share the modules. Modules let you split

Compiling mxml files with ant and flex sdk

孤街浪徒 提交于 2019-11-28 10:16:54
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. The Flex SDK ships with a set of ant tasks. More info at: http://livedocs.adobe.com/flex/3/html/help.html?content=anttasks_1.html Here is an example of compiling Flex SWCs with ant: http://www.mikechambers.com/blog/2006/05/19/example-using-ant-with-compc-to-compile-swcs/ mike chambers I would definitely go with the ant tasks that are included with Flex, they make your build script so much cleaner. Here is a sample build script that

Possible to use Flex Framework/Components without using MXML?

主宰稳场 提交于 2019-11-28 05:26:47
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 how to do it with the Flex SDK is ok too) and uses the Flex Framework? For example, just showing a Flex button that pops open an Alert would be perfect. If it's not possible, can someone provide a minimal MXML file which will bootstrap a custom AS class which

How to solve “call to undefined function domxml_new_doc()…”

我只是一个虾纸丫 提交于 2019-11-27 03:42:09
问题 I am trying to output xml by using domxml_new_doc. However, I just got the call to undefined function domxml_new_doc() error. I tried google it but still not luck. Do I have to install any extension or library? Thanks for the help. $doc=domxml_new_doc("1.0"); //error on this line.... $node=$doc->create_element("marker"); $parnode=$doc->append_child($node); 回答1: you can see the requirements here. Quote: This extension makes use of the » GNOME XML library. Download and install this library. You