Adobe FLEX 2 - CREATING AND EXTENDING COMPONENTS Manual page 234

Creating and extending flex 2 components
Hide thumbs Also See for FLEX 2 - CREATING AND EXTENDING COMPONENTS:
Table of Contents

Advertisement

To use your custom effect class in an MXML file, you insert a tag with the same name as the
factory class in the MXML file. You reference the custom effect the same way that you
reference a standard effect.
The following example shows an application that uses the MySound effect:
<?xml version="1.0"?>
<!-- effects/MainSoundEffect.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:MyComp="myEffects.*">
<MyComp:MySound id="mySoundEffect" />
<!-- Use the SoundEffect effect with a mouseOver trigger. -->
<mx:Label text="play MP3" rollOverEffect="{mySoundEffect}" />
</mx:Application>
234
Creating Effects

Advertisement

Table of Contents
loading

Table of Contents