如何创建自定义主题
2008-03-27 23:00
375 查看
如何创建自定义主题
1. 先创建一个css文件,例如:myTest.css
myTest.css文件如下:
global{
fontSize:12;
fontfamily: "_sans", Arial;
}
Application{
backgroundGradientColors: #006699, #AEB4E6;
backgroundImage: Embed(source="Bg.jpg");
}
Panel{
borderColor: #AEB4E6;
borderAlpha: 1;
}
Button {
cornerRadius: 0;
fillColors: #ffffff, #aeb4e6, #ffffff, #eeeeee;
color: #555c91;
}
LinkBar {
borderStyle: none;
backgroundColor: #ffffff;
rollOverColor: #cdd0e9;
selectionColor: #a1a7d2;
color: #545da9;
textRollOverColor: #6168a1;
textSelectedColor: #6c719f;
}
2. 在环境变量:path中加入flex的编译环境
如:C:/Program Files/Adobe/Flex Builder 2/Flex SDK 2/bin
3. 进入命令提示符,切换到你所建工程目录下,
例如:cd E:/aaa
4.1 用flex的编译器编译:
Compc -include-file myTest.css myTest.css -include-file bj.jpg bj.jpg -o myStyle.swc
-include-file 有两个参数,名称和路径,
-o 表示生成的swc文件名
4.2 用flex的编译器编译XML文件,来达成目的
新建myTest.xml文件
<?xml version="1.0"?>
<flex-config xmlns="http://www.adobe.com/2006/flex-config">
<output>myTest.swc</output>
<include-file>
<name>myTest.css</name>
<path>myTest.css</path>
</include-file>
<include-file>
<name>Bg.jpg</name>
<path>Bg.jpg</path>
</include-file>
</flex-config>
Compc –load-config myTest.xml
5. 选择你所建的那个工程,右击选择propertise
弹出的窗口中,选择左侧的”Flex Compiler”项,设置flex编译器选项
在“Additional compiler arguments”项下的输入框中,加入
-locale en_US -theme myTest.swc
特别注意一点:
新创建的主题文件可以拷贝到任何程序中使用,主题文件和程序没有任何关联。
1. 先创建一个css文件,例如:myTest.css
myTest.css文件如下:
global{
fontSize:12;
fontfamily: "_sans", Arial;
}
Application{
backgroundGradientColors: #006699, #AEB4E6;
backgroundImage: Embed(source="Bg.jpg");
}
Panel{
borderColor: #AEB4E6;
borderAlpha: 1;
}
Button {
cornerRadius: 0;
fillColors: #ffffff, #aeb4e6, #ffffff, #eeeeee;
color: #555c91;
}
LinkBar {
borderStyle: none;
backgroundColor: #ffffff;
rollOverColor: #cdd0e9;
selectionColor: #a1a7d2;
color: #545da9;
textRollOverColor: #6168a1;
textSelectedColor: #6c719f;
}
2. 在环境变量:path中加入flex的编译环境
如:C:/Program Files/Adobe/Flex Builder 2/Flex SDK 2/bin
3. 进入命令提示符,切换到你所建工程目录下,
例如:cd E:/aaa
4.1 用flex的编译器编译:
Compc -include-file myTest.css myTest.css -include-file bj.jpg bj.jpg -o myStyle.swc
-include-file 有两个参数,名称和路径,
-o 表示生成的swc文件名
4.2 用flex的编译器编译XML文件,来达成目的
新建myTest.xml文件
<?xml version="1.0"?>
<flex-config xmlns="http://www.adobe.com/2006/flex-config">
<output>myTest.swc</output>
<include-file>
<name>myTest.css</name>
<path>myTest.css</path>
</include-file>
<include-file>
<name>Bg.jpg</name>
<path>Bg.jpg</path>
</include-file>
</flex-config>
Compc –load-config myTest.xml
5. 选择你所建的那个工程,右击选择propertise
弹出的窗口中,选择左侧的”Flex Compiler”项,设置flex编译器选项
在“Additional compiler arguments”项下的输入框中,加入
-locale en_US -theme myTest.swc
特别注意一点:
新创建的主题文件可以拷贝到任何程序中使用,主题文件和程序没有任何关联。
相关文章推荐
- 如何在cocos2dx中使用Lua创建自定义
- 如何通过XIB 创建自定义的UIViewTableCell
- 如何在JavaScript中创建自定义事件
- WCF后续之旅(2): 如何对Channel Layer进行扩展——创建自定义Channel
- 如何创建.Text Blog的自定义Skin[转贴]
- 如何创建OpenCart主题/模板
- java中如何创建自定义异常Create Custom Exception
- Flex中如何通过给ComboBox创建自定义的项提供源,使其下拉菜单显示复数项目。
- 自定义java.policy配置(如何让你的类禁止读写文件?禁止创建Socket对象?)
- 如何创建[圆角、边框色彩渐变、边框宽度自定义]窗体
- 如何自定义jupyter notebook的主题
- 如何在SAP Cloud for Customer自定义BO中创建访问控制
- 如何用zabbix创建自定义监控项
- 使用Spread Studio for .NET如何创建自定义复合形
- [ios]如何通过XIB 创建自定义的UIViewTableCell
- 【翻译】如何创建Ext JS暗黑主题之一
- 如何创建linux命令”快捷方式”或”自定义命令”
- 【VSTO】创建 Excel 2007 AddIn (1. CommandBar 以及如何自定义Icon)
- flex_如何创建自定义事件示例;
- 如何创建自定义的文件类型关联