Flex Gumbo中如何通过textAlpha样式,设置TextGraphic透明度
2009-06-09 01:38
651 查看
main.mxml
<?xml version="1.0" encoding="utf-8"?>
<FxApplication name="TextGraphic_textAlpha_test"
xmlns="http://ns.adobe.com/mxml/2009">
<layout>
<BasicLayout />
</layout>
<Style>
@font-face {
src: url("assets/ARIAL.TTF");
fontFamily: "ArialEmbedded";
cff: true;
}
TextGraphic {
fontSize: 24;
}
</Style>
<HGroup left="10" top="10">
<Label text="textAlpha:" />
<FxHSlider id="slider"
minimum="0.0"
maximum="1.0"
value="1.0"
stepSize="0.1"
valueInterval="0.1"
liveDragging="true" />
</HGroup>
<Form id="form"
horizontalCenter="0"
verticalCenter="0">
<FormItem label="device:">
<Graphic>
<TextGraphic id="deviceTextGraphic"
textAlpha="{slider.value}"
fontFamily="Arial"
fontLookup="device"
width="300">
<text>The quick brown fox jumped over the lazy dog.</text>
</TextGraphic>
</Graphic>
</FormItem>
<FormItem label="embeddedCFF:">
<Graphic>
<TextGraphic id="embeddedTextGraphic"
textAlpha="{slider.value}"
fontFamily="ArialEmbedded"
fontLookup="embeddedCFF"
width="300">
<text>The quick brown fox jumped over the lazy dog.</text>
</TextGraphic>
</Graphic>
</FormItem>
</Form>
</FxApplication>
<?xml version="1.0" encoding="utf-8"?>
<FxApplication name="TextGraphic_textAlpha_test"
xmlns="http://ns.adobe.com/mxml/2009">
<layout>
<BasicLayout />
</layout>
<Style>
@font-face {
src: url("assets/ARIAL.TTF");
fontFamily: "ArialEmbedded";
cff: true;
}
TextGraphic {
fontSize: 24;
}
</Style>
<HGroup left="10" top="10">
<Label text="textAlpha:" />
<FxHSlider id="slider"
minimum="0.0"
maximum="1.0"
value="1.0"
stepSize="0.1"
valueInterval="0.1"
liveDragging="true" />
</HGroup>
<Form id="form"
horizontalCenter="0"
verticalCenter="0">
<FormItem label="device:">
<Graphic>
<TextGraphic id="deviceTextGraphic"
textAlpha="{slider.value}"
fontFamily="Arial"
fontLookup="device"
width="300">
<text>The quick brown fox jumped over the lazy dog.</text>
</TextGraphic>
</Graphic>
</FormItem>
<FormItem label="embeddedCFF:">
<Graphic>
<TextGraphic id="embeddedTextGraphic"
textAlpha="{slider.value}"
fontFamily="ArialEmbedded"
fontLookup="embeddedCFF"
width="300">
<text>The quick brown fox jumped over the lazy dog.</text>
</TextGraphic>
</Graphic>
</FormItem>
</Form>
</FxApplication>
相关文章推荐
- Flex Gumbo中如何通过textRotation样式,设置TextGraphic文字旋转方向
- FLEX4中如何通过textFiledClass样式给Halo/MXlist设置CFF/DefineFont4字体的例子
- Flex的NumericStepper控件中如何通过textAlign样式设置文本对齐方式的例子
- Flex Gumbo中如何通过contentBackgroundColor样式,设置TextInput内文本背景颜色
- Flex中如何通过tabStyleName, tabWidth和textAlign样式,设置TabBar控件内文本对齐方式
- Flex Gumbo中如何通过baseColor样式,设置FxHScrollBar背景颜色
- Flex中如何通过设置textAlign样式设定DateField中选中日期对齐方式的例子
- Flex中如何通过leading样式在一个text控件中设置文本铅框(text leading)的例子
- Flex中如何通过titleStyleName和textIndent样式,设置Panel的标题
- Flex中如何通过selectedButtonTextStyleName样式,设置ToggleButtonBar选中按钮文本颜色
- Flex Gumbo中如何通过fontWeight样式,给TextBox设置粗体文字
- Flex中如何通过backgroundImage, backgroundColor和backgroundAlpha样式,设置VBox的背景图片和背景颜色以及改变透明度
- Flex中如何通过horizontalGap样式,设置TabBar控件各个Tab间空格间距
- Flex中如何通过getHeaderAt()函数以及selectedUpIcon,selectedOverIcon和selectedDownIcon样式给Accordion头部设置一个分割用图标的例子
- Flex中如何通过disabledColor样式设置NumericStepper控件无效时文本颜色的例子
- Flex中如何通过设置fontFamily样式在NumericStepper控件中使用嵌入字体的例子
- Flex中如何通过backgroundImage和backgroundSize样式,设置VBox容器的背景图片以及大小
- 通过Spannable对象设置textview的样式
- Flex中如何通过paddingTop样式设置TabNavigator控件内容与Tabs间距离的例子
- Flex 4中如何设置TextFlow内超链接样式的例子