SexRenderer.mxml 684 B

12345678910111213141516171819202122232425262728293031
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"
  3. horizontalAlign="center">
  4. <mx:Script>
  5. <![CDATA[
  6. [Embed(source="images/patient/sign_woman.png")]
  7. [Bindable]
  8. public var woman : Class;
  9. [Embed(source="images/patient/sign_man.png")]
  10. [Bindable]
  11. public var man : Class;
  12. override public function set data(value:Object):void
  13. {
  14. super.data = value;
  15. if( data.sex == "F" )
  16. {
  17. image.source = woman;
  18. } else {
  19. image.source = man;
  20. }
  21. }
  22. ]]>
  23. </mx:Script>
  24. <mx:Image id="image" />
  25. </mx:VBox>