FB4正式版 菜鸟教程------------三种着色方法:
来源:互联网 发布:学编程买什么笔记本 编辑:程序博客网 时间:2024/06/02 01:17
CSS方法:
<?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" minWidth="400" minHeight="300">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<!-- 为所有的TextInput定义相同的背景contentbackGroundColor -->
<fx:Style>
@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";
s|TextInput {
contentBackgroundColor: red;}
</fx:Style>
<s:TextInput id="textInput"
text="The quick brown fox jumps over the lazy dog."
horizontalCenter="0"
verticalCenter="-8" width="256"/>
<s:TextInput id="ok"
text="just a joke !"
horizontalCenter="1"
verticalCenter="46" />
</s:Application>
MXML 着色方法:
<?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" minWidth="955" minHeight="600">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<mx:ColorPicker x="147" y="98" id="colorSettor" selectedColor="#FFFFFF" />
<s:TextInput x="121" y="215" text="funck you bad guy !"
fontSize="21" fontWeight="bold" fontStyle="italic"
contentBackgroundColor="{colorSettor.selectedColor}"
/>
</s:Application>
AS着色方法:
<?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" minWidth="955" minHeight="600">
<fx:Script>
<![CDATA[
import mx.events.ColorPickerEvent;
protected function colorpicker1_changeHandler(event:ColorPickerEvent):void
{
// TODO Auto-generated method stub
myText.setStyle("contentBackgroundColor",event.color);
}
]]>
</fx:Script>
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<mx:ColorPicker x="127" y="108" change="colorpicker1_changeHandler(event)" selectedColor="#FFFFFF"/>
<s:TextInput x="76" y="196" text="fuck you bas guy !"
fontFamily="Courier New" fontSize="19"
fontWeight="bold" id="myText"
/>
</s:Application>
- FB4正式版 菜鸟教程------------三种着色方法:
- FB4正式版 菜鸟教程-----------Input控件实现滚动条功能
- Ardunio菜鸟教程(三)
- SQL Server2016正式版安装配置方法图文教程
- 三着色问题 递归和迭代方法 打印着色方案
- 着色器【unity3d教程】
- 菜鸟教程
- 菜鸟教程
- 从菜鸟到高手的linux教程(三)
- 菜鸟也能飞:SQL数据库实战专业教程(三)
- 控制系统与MATLAB的菜鸟教程(三)…
- 【OpenGL ES系列教程三】着色语言 Shading Language(一)
- Unity3D 5 官方教程:标准着色器之材质参数(三)
- 【OpenGL ES系列教程三】着色语言 Shading Language(一)
- 编写Unity3D着色器的三种方式
- 小菜鸟一步一步安装Lion正式版
- Unity3D的着色器介绍(三)——编写Unity3D着色器的三种方式
- Visual Studio 2008正式版序列号及把90天试用版改为正式版的二种方法
- USACO :The Castle解题报告
- ELFhash字符串散列函数——HDU1004
- SVN
- java新闻抓取程序代码
- 模拟面试大赛群面有感!
- FB4正式版 菜鸟教程------------三种着色方法:
- 学习C#操纵Visio之三:移动Shape位置
- 硬盘安装Red hat Linux 5
- 也谈编码问题
- apache源码分析入门(一)
- android内核编译方法 转载
- iPad 进展一
- 关于射频资料的论坛和网站
- java 获取网页内容