Setting a creation complete effect on an Accordion container in Flex

by Peter deHaan on June 22, 2008

in Accordion

The following example shows how you can set a creation complete effect on a Flex Accordion container by setting the creationCompleteEffect style.

Full code after the jump.

<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2008/06/22/setting-a-creation-complete-effect-on-an-accordion-container-in-flex/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white">

    <mx:String id="str" source="lorem.txt" />

    <mx:Accordion id="accordion"
            creationCompleteEffect="Dissolve"
            width="400"
            height="300">
        <mx:VBox id="vBox1"
                label="Red (WipeUp)"
                icon="@Embed('assets/bullet_red.png')"
                backgroundColor="red"
                creationCompleteEffect="WipeUp"
                width="100%"
                height="100%">
            <mx:Text text="{str}" width="100%" height="100%" />
        </mx:VBox>
        <mx:VBox id="vBox2"
                label="Orange (WipeDown)"
                icon="@Embed('assets/bullet_orange.png')"
                backgroundColor="haloOrange"
                creationCompleteEffect="WipeDown"
                width="100%"
                height="100%">
            <mx:Text text="{str}" width="100%" height="100%" />
        </mx:VBox>
        <mx:VBox id="vBox3"
                label="Yellow (WipeLeft)"
                icon="@Embed('assets/bullet_yellow.png')"
                backgroundColor="yellow"
                creationCompleteEffect="WipeLeft"
                width="100%"
                height="100%">
            <mx:Text text="{str}" width="100%" height="100%" />
        </mx:VBox>
        <mx:VBox id="vBox4"
                label="Green (WipeRight)"
                icon="@Embed('assets/bullet_green.png')"
                backgroundColor="haloGreen"
                creationCompleteEffect="WipeRight"
                width="100%"
                height="100%">
            <mx:Text text="{str}" width="100%" height="100%" />
        </mx:VBox>
        <mx:VBox id="vBox5"
                label="Blue (Iris)"
                icon="@Embed('assets/bullet_blue.png')"
                backgroundColor="haloBlue"
                creationCompleteEffect="Iris"
                width="100%"
                height="100%">
            <mx:Text text="{str}" width="100%" height="100%" />
        </mx:VBox>
    </mx:Accordion>

</mx:Application>

{ 2 comments… read them below or add one }

1 minidxer June 23, 2008 at 8:38 am

hi, peterd

can u share the images so i can build it successfuly?

thanks
minidxer

Reply

2 peterd June 23, 2008 at 8:49 am

minidxer,

Icons are from the famfamfam.com “Silk” collection: http://www.famfamfam.com/lab/icons/silk/.

Peter

Reply

Leave a Comment

Sorry, this blog is terrible at eating HTML comments.
If you're pasting any HTML/XML/MXML code, you need to convert your < characters to &lt; and your > characters to &gt; .

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Anti-Spam Protection by WP-SpamFree

Previous post:

Next post: