import mx.containers.accordionclasses
.AccordionHeader
class MyCustomHeader extends AccordionHeader
{
[Embed("accordion-b.swf")]
var accoridonDownSkin:String;
[Embed("accordion-a.swf")]
var accordionOverSkin:String;
private function init()
{
this.falseUpSkin = accordionOverSkin;
this.falseOverSkin = accordionOverSkin;
this.falseDownSkin = accoridonDownSkin;
this.trueUpSkin = accoridonDownSkin;
this.trueOverSkin = accoridonDownSkin;
this.trueDownSkin = accoridonDownSkin;
super.init();
}
}
class MyCustomHeader extends AccordionHeader
{
[Embed("accordion-b.swf")]
var accoridonDownSkin:String;
[Embed("accordion-a.swf")]
var accordionOverSkin:String;
private function init()
{
this.falseUpSkin = accordionOverSkin;
this.falseOverSkin = accordionOverSkin;
this.falseDownSkin = accoridonDownSkin;
this.trueUpSkin = accoridonDownSkin;
this.trueOverSkin = accoridonDownSkin;
this.trueDownSkin = accoridonDownSkin;
super.init();
}
}
On 7/5/05, Clint Modien <[EMAIL PROTECTED]> wrote:
well @ first glance your code never calls changeMe() ?
In any case... a better approach would be to create a custom header like this...
import mx.containers.accordionclasses.AccordionHeader
class MyCustomHeader extends AccordionHeader
{
[Embed("accordion-b.swf")]
var accoridonDownSkin:String;
[Embed("accordion-a.swf")]
var accordionOverSkin:String;
private function init()
{
this.falseUpSkin = "accordionOverSkin";
this.falseOverSkin = "accordionOverSkin";
this.falseDownSkin = "accoridonDownSkin";
this.trueUpSkin = "accoridonDownSkin";
this.trueOverSkin = "accoridonDownSkin";
this.trueDownSkin = "accoridonDownSkin";
super.init();
}
}
then when you declare your Accordion set it's headerClass property to your new custom header.
<mx:Accordion id="myAcc" width="200" height="150" backgroundAlpha="0" borderThickness="0"
headerClass="MyCustomHeader">
<mx:VBox label="Tab 1">
<mx:Label text="Skinning" fontSize="15"/>
</mx:VBox>
<mx:VBox label="Tab 2">
<mx:Label text="Accordion" fontSize="15"/>
</mx:VBox>
<mx:VBox label="Tab 3">
<mx:Label text="Control" fontSize="15"/>
</mx:VBox>
</mx:Accordion></mx:Application>
On 7/5/05, Nithya R < [EMAIL PROTECTED]> wrote:hai,sorry in my previous mail I forgot to attach the code.I am using the following code for skinning the accodrion header..But it isnt displaying the swf that i am using.. pls tell me if there is anything wrong with the code. I dont get any error either..<?xml version="1.0" encoding="utf-8"?><mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" backgroundColor="#FFFFFF">
<mx:Script>
<![CDATA[
[Embed("accordion-b.swf")]
var accoridonDownSkin:String;
[Embed("accordion-a.swf")]
var accordionOverSkin:String;
function changeMe(event) {
//Loop through all the headers of Accordion control and set the skins
for(var i=0;i<myAcc.numChildren;i++) {
event.target.getHeaderAt(i).falseUpSkin = "accordionOverSkin";
event.target.getHeaderAt(i).falseOverSkin = "accordionOverSkin";
event.target.getHeaderAt(i).falseDownSkin = "accoridonDownSkin";
event.target.getHeaderAt(i).trueUpSkin = "accoridonDownSkin";
event.target.getHeaderAt(i).trueOverSkin = "accoridonDownSkin";
event.target.getHeaderAt(i).trueDownSkin = "accoridonDownSkin";
}
}
]]>
</mx:Script>
<mx:Accordion id="myAcc" width="200" height="150" backgroundAlpha="0" borderThickness="0" >
<mx:VBox label="Tab 1">
<mx:Label text="Skinning" fontSize="15"/>
</mx:VBox>
<mx:VBox label="Tab 2">
<mx:Label text="Accordion" fontSize="15"/>
</mx:VBox>
<mx:VBox label="Tab 3">
<mx:Label text="Control" fontSize="15"/>
</mx:VBox>
</mx:Accordion></mx:Application>thanks,nithyaSend instant messages to your online friends http://uk.messenger.yahoo.com
--
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
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
---- LSpots keywords ?> ---- HM ADS ?>
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.