Flex 3相当于'< fx:声明>'? [英] Flex 3 equivalent of '<fx:Declarations>'?
问题描述
我试图将Flex 4项目向后迁移到Flex 3,并且需要将其映射到MXML中的< fx:Declarations>
块中。 Flex 3是否有类似的东西? Flex 3中已经有一段时间了。
在Flex 3中没有等价的东西。你的其他组件。 Flex 4中的差异将视觉和非视觉项目(包括效果,验证器,格式化器,数据声明和RPC类)更清晰。
例如,在Flex 4中,您可以这样做:
<?xml version =1.0encoding =utf-8?>
xmlns:fx =http://ns.adobe.com/mxml/2009
xmlns:s =library://ns.adobe.com / flex / spark
xmlns:mx =library://ns.adobe.com/flex/mx>
< fx:声明>
< fx:String> Hello,world!< / fx:String>
< / fx:声明>
<! - 组件定义 - >
< / s:Application>
但是在Flex 3中,您可以这样做:
<?xml version =1.0encoding =utf-8?>
xmlns:mx =http://www.adobe.com/2006/mxml>
< mx:String> blah< / mx:String>
<! - 组件定义 - >
< / mx:应用程序>
然而,你可以定义你的变量和任何其他的声明(视觉与否)在Flex 3和4中分别为c $ c>< mx:Script> 或< fx:Script>
标记。 b
$ b
如果您遇到其他更改,请在Adobe网站上搜索从flex 3迁移到flex 4 ,查看您可能需要做的其他更改。
I'm trying to migrate a Flex 4 project backwards to Flex 3, and I need to move stuff mapped in a <fx:Declarations>
block in MXML. Does Flex 3 have something similar to this? It's been a while since I've done Flex 3.
There is no equivalent in Flex 3. You can declare things alongside your other components. The difference in Flex 4 makes the separation between visual and non-visual items (including things like effects, validators, formatters, data declarations, and RPC classes) clearer.
For example, in Flex 4 you would do this:
<?xml version="1.0" encoding="utf-8"?>
<s:Application
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<fx:Declarations>
<fx:String>Hello, world!</fx:String>
</fx:Declarations>
<!-- Component defintions -->
</s:Application>
but in Flex 3, you would do this:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:String>blah</mx:String>
<!-- Component defintions -->
</mx:Application>
You can, however, define your variables and whatever other declarations (visual or not) within the <mx:Script>
or <fx:Script>
tag in Flex 3 and 4 respectively.
If you're stuck on other changes, search Adobe's website about migrating from flex 3 to flex 4 to see what other changes you may have to make.
这篇关于Flex 3相当于'< fx:声明>'?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!