상세 컨텐츠

본문 제목

[flex4] Effect StyleCSS

FLEX

by 코드공작소 2011. 4. 25. 19:36

본문

반응형

<?xml version="1.0"?>
<!-- behaviors\MxmlTypeSel.mxml-->
<s:Application
    xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:mx="library://ns.adobe.com/flex/mx"
    xmlns:s="library://ns.adobe.com/flex/spark">
    <s:layout>
        <s:VerticalLayout/>
    </s:layout>

    <fx:Style>
        @namespace mx "library://ns.adobe.com/flex/mx";
        mx|TextArea {mouseDownEffect: slowWipe;}
    </fx:Style>

    <fx:Declarations>
        <mx:WipeLeft id="slowWipe" duration="5000"/>
    </fx:Declarations>

    <mx:TextArea id="myTA"
        text="This TextArea slowly wipes in on mouseDown."/>

    <mx:TextArea id="myTA2"
        text="This TextArea control has no effect."
        mouseDownEffect="none"/>
</s:Application>


----------------------------------------------------------------------------------


<?xml version="1.0"?>
<!-- behaviors\ButtonWLClassSel.mxml -->
<s:Application
    xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:mx="library://ns.adobe.com/flex/mx"
    xmlns:s="library://ns.adobe.com/flex/spark">

    <!-- Define a class selector for a TextArea control -->
    <fx:Style>
        .textAreaStyle { mouseDownEffect: WipeLeft; }
    </fx:Style>

    <fx:Declarations>
        <mx:WipeLeft id="slowWipe" duration="5000"/>
    </fx:Declarations>

    <mx:TextArea id="myTA"
        styleName="textAreaStyle"
        text="This TextArea control quickly wipes in."/>
</s:Application>
반응형

관련글 더보기