Hi, there
I'd like to skin the radiobuton using the symbol I created in the 
swf of Flash MX 2004. The following steps are what I've done:
1. Create a movie
2. Create 4 movie clip symbols for radio button
3. Export swf file into the folder where mxml file is located. 
4. Add Script into mxml file. 
5. Add initialize() in the RadioButton control. 

However, the symbol doesn't appear. 

Thanks in advance for your help

Cheers
David

Attached code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml";>
        <mx:Script>
        <![CDATA[
                [Embed(source="Skins.swf",symbol="trueUpSkin")]
                var trueUpSkin:String;
                [Embed(source="Skins.swf",symbol="trueDownSkin")]
                var trueDownSkin:String;
        
                        function SkinRadio(){
                                crm.trueUpIcon = "trueDownSkin";
                                crm.trueUpIcon = "trueDownSkin";
                                crm.trueDownIcon 
= "trueDownSkin";
                                crm.falseUpIcon = "trueUpSkin1";
                                
                        }
                        
                function fadePanel(){
                        var e1 = new mx.effects.Fade(myPanel);
                        e1.alphaTo = 0;

                        var e2 = new mx.effects.Fade(myText);
                        e2.alphaTo = 0;

                        var e3 = new mx.effects.Fade(myButton);
                        e3.alphaTo = 0;
                        
                        var e4 = new mx.effects.Parallel();
            e4.addChild(e1);
            e4.addChild(e2);
            e4.addChild(e3);                    
            e4.duration=1000;
            e4.playEffect();    
                        }
        ]]>
        </mx:Script>

        <mx:Panel id="myPanel" fontSize="12" title="Skin the radio 
button" width="100%" horizontalAlign="center" vScrollPolicy="on" 
marginBottom="10">

                <mx:RadioButton label="test" id="crm" 
initialize="SkinRadio()"  />

        </mx:Panel>
</mx:Application>






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to