Flex主题
Flex支持的样式设置方式
1.直接使用CSS文件,系统默认使用default.css
<mx:Style source=“style.css”/>
2.使用<mx:Style>标签
3.使用style设计器(->MXML)
4.使用对象的getStyle( )和setStyle( )
5.使用StyleManager类
主题是一套配置完成的样式风格
Flex提供的几种主题,文件类型.swc
建议使用.swc文件来封装主题
给编译指令添加
-theme xxx.css //注意路径
在Flex-config.xml中通过修改<theme>标签配置主题
创建自己的主题
1.通过修改以后的主题文件创建自己的主题内容
2.使用compc编译主题,生成swc文件(见帮助)
-include-file name path
-o output.swc
-include-classes
3.通过配置文件编译主题
compc -load-config myconfig.xml
添加主题具体操作(在Flex-config.xml中配置:frameworks中<theme><filename>路径</filename></themt>)
1、 先写好.css文件
2、compo -include-file css文件名 文件路径(绝对路径) -include-file 可以有多个
-o 要放置的路径(绝对路径)
3、一个xml配置文件
<?xml version="1.0" ?>
<flex-config xmlns = http://www.adoobe.com/2006/flex-config>
<out-put>MyTheme.swc</out-put>
<include-file>
<name>名字</name>
<path>绝对路径</path>
</include-file>
<include-class>
&n
相关文档:
首先注意一下.
这里说的是在"FLEX"生成的"SWF"直接运行时,使用"stage.displayState"启用全屏时所遇到的问题...
注意上面""号所提到的关健词..
现在我们先看看代码,下面的代码装在creationComplete事件中调用init()来启动全屏.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www ......
<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2007/08/07/creating-full-screen-flex-applications/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" applicationComplete="init(event)" viewSourceURL="srcview/index.html">
& ......
发现了一个Flex中TextInput的一个比较有用的属性restrict(约束,限定),先看下例子:
1,<mx:TextInput id="test_ti" width="160" maxChars="20" restrict="0-9" text="0"/>
这样,这个输入框最多只能输入20个字符,只能输入0到9之间的数字了,你如果输入别的是输入不进去的
2,<mx:TextInput id="test_ti" width="1 ......
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="horizontal">
<mx:Panel width="458" height="313" layout="absolute">
<mx:Label id="lbl" x="19" y="10" text="" width="171" height="20"/>
<mx:DataGrid id="dg" x="19" y="58" dataProvider="{arr}" editable="true" ......
<?xml version="1.0" encoding="utf-8"?>
<mx:Application fontSize="12" xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()">
<mx:Script>
<![CDATA[
public var treeXml: XML = <nodes name="所有">
&n ......