关闭

flex_状态组使用浅析;

600人阅读 评论(2) 收藏 举报

效果图:

orange状态:black状态:

green状态:blue状态:

<?xml version="1.0" encoding="utf-8"?>

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/mx"
               minWidth="1024" minHeight="768" pageTitle="TheStudioOfCenyebao">
    
    <!-- Demo_状态组 -->
    
    <s:states>
        <s:State name="orange" stateGroups="box" />
        <s:State name="black" stateGroups="box" />
        
        <s:State name="green" stateGroups="circle" />
        <s:State name="blue" stateGroups="circle" />
    </s:states>
   
    <!--view-->
    <s:VGroup verticalCenter="0" horizontalCenter="0">
        <s:HGroup>
            <s:Button label.orange="Black" label.black="Green" label.green="Blue" label.blue="Orange"
                      click.orange="currentState = 'black'" click.black="currentState='green'"
                      click.green="currentState='blue'" click.blue="currentState='orange'"/>
        </s:HGroup>
        <s:Rect width="200" height="100" visible="false" includeInLayout="false"
                visible.box="true" includeInLayout.box="true">
            <s:fill>
                <s:SolidColor color.black="#000000" color.orange="#de7800"/>
            </s:fill>
        </s:Rect>
        
        <s:Ellipse width="200" height="100" visible="false" includeInLayout="false"
                   visible.circle="true" includeInLayout.circle="true">
            <s:fill>
                <s:SolidColor color.green="green" color.blue="blue"/>
            </s:fill>
        </s:Ellipse>
    </s:VGroup>
</s:Application>
0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:244823次
    • 积分:3703
    • 等级:
    • 排名:第8773名
    • 原创:127篇
    • 转载:13篇
    • 译文:0篇
    • 评论:52条
    最新评论