main.mxml
- <?xml version="1.0" encoding="utf-8"?>
- <FxApplicationname="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>
- <HGroupleft="10" top="10">
- <Labeltext="textAlpha:" />
- <FxHSliderid="slider"
- minimum="0.0"
- maximum="1.0"
- value="1.0"
- stepSize="0.1"
- valueInterval="0.1"
- liveDragging="true"/>
- </HGroup>
- <Formid="form"
- horizontalCenter="0"
- verticalCenter="0">
- <FormItemlabel="device:">
- <Graphic>
- <TextGraphicid="deviceTextGraphic"
- textAlpha="{slider.value}"
- fontFamily="Arial"
- fontLookup="device"
- width="300">
- <text>The quick brown fox jumped over the lazy dog.</text>
- </TextGraphic>
- </Graphic>
- </FormItem>
- <FormItemlabel="embeddedCFF:">
- <Graphic>
- <TextGraphicid="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实现的示例程序,该程序通过滑块实时调整两个文本框的透明度,演示了如何在设备字体和嵌入式字体中应用这一特性。这有助于开发者了解文本透明度设置的方法及其对不同字体类型的影响。
8730

被折叠的 条评论
为什么被折叠?



