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

main.mxml

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FxApplicationname="TextGraphic_textAlpha_test"
  3. xmlns="http://ns.adobe.com/mxml/2009">
  4. <layout>
  5. <BasicLayout/>
  6. </layout>
  7. <Style>
  8. @font-face {
  9. src: url("assets/ARIAL.TTF");
  10. fontFamily: "ArialEmbedded";
  11. cff: true;
  12. }
  13. TextGraphic {
  14. fontSize: 24;
  15. }
  16. </Style>
  17. <HGroupleft="10" top="10">
  18. <Labeltext="textAlpha:" />
  19. <FxHSliderid="slider"
  20. minimum="0.0"
  21. maximum="1.0"
  22. value="1.0"
  23. stepSize="0.1"
  24. valueInterval="0.1"
  25. liveDragging="true"/>
  26. </HGroup>
  27. <Formid="form"
  28. horizontalCenter="0"
  29. verticalCenter="0">
  30. <FormItemlabel="device:">
  31. <Graphic>
  32. <TextGraphicid="deviceTextGraphic"
  33. textAlpha="{slider.value}"
  34. fontFamily="Arial"
  35. fontLookup="device"
  36. width="300">
  37. <text>The quick brown fox jumped over the lazy dog.</text>
  38. </TextGraphic>
  39. </Graphic>
  40. </FormItem>
  41. <FormItemlabel="embeddedCFF:">
  42. <Graphic>
  43. <TextGraphicid="embeddedTextGraphic"
  44. textAlpha="{slider.value}"
  45. fontFamily="ArialEmbedded"
  46. fontLookup="embeddedCFF"
  47. width="300">
  48. <text>The quick brown fox jumped over the lazy dog.</text>
  49. </TextGraphic>
  50. </Graphic>
  51. </FormItem>
  52. </Form>
  53. </FxApplication>

你可能感兴趣的:(xml,Flex,Adobe)