Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 04-16-2005, 07:30 AM   #1
firdosh
Registered User
 
Join Date: Dec 2004
Posts: 146
Default Skinning the Accordoin component

The macromedia help files shows this way to skin the accordion headers
onClipEvent(initialize){
falseUpSkin = "fbsAccordionHeaderSkinFalseUp";
trueUpSkin = "fbsAccordionHeaderSkinTrueUp";
..........
}
How do I go about this if I am dynamically attaching the component.
I tried
mycom.addEventListener("initialize",myMethod); but this doesnt work

thanks
cheers
firdosh
firdosh is offline   Reply With Quote
Old 04-26-2005, 09:36 AM   #2
SrinivasSM
Registered User
 
SrinivasSM's Avatar
 
Join Date: Mar 2005
Posts: 65
Send a message via MSN to SrinivasSM Send a message via Yahoo to SrinivasSM
Default

Hi,

I hope "fbsAccordionHeaderSkinFalseUp" and "fbsAccordionHeaderSkinTrueUp" are two movie clips.If yes then instead of the present Linkage indentifier name use "falseUpSkin"
and "trueUpSkin" for the respective clips.
SrinivasSM is offline   Reply With Quote
Old 05-04-2005, 11:18 PM   #3
firdosh
Registered User
 
Join Date: Dec 2004
Posts: 146
Default

Hey Srinivas ,
I tried what you suggested bu that did not work either.

cheers
firdosh
firdosh is offline   Reply With Quote
Old 05-06-2005, 06:19 AM   #4
skyymap
Registered User
 
Join Date: Aug 2004
Posts: 2
Default Skinning the Accordion Component

Hey guys.

I am not sure if you have gotten your question answered. If you have, please ignore this tutorial. If not, let's get started.

Skinning the Accordion component by Skyymap, Inc. 05/05/2005

A skin is nothing more than a movie clip that is associated or "linked" with the internal component's movie clip. When you publish the flash movie, the component first draws the component without the new skin. Then it re-draws itself with the new skin by calling the "linked" movie clip from the library. Of course you do not see these draws and re-draws, but as a rule of thumb it is always a good idea to have at least 2 frames on your time line to allow the component to initialize properly. In this example, we will be using our standard of 10 frames.


// **** SETUP THE STAGE **** //
1. Create a new flash document
2. Select frame 10 on your timeline and insert a new keyframe.
3. name the layer "actions"
4. Insert a new layer and call the layer "component"
5. With the "component" layer selected, drag an accordion from the component panel onto the stage
6. Name the component "example_acc"

// **** MOVIE CLIP CREATION **** //
1. Create an image for the accordion header.
2. make the new image a movie clip [F8] called "trueSkin_mc" and delete it from the stage. [not to worry - its in the library].
3. Open your library [F11] and right click on the newly created movie clip.
4. Select "Linkage" and check "export for actionscript" + "export in first frame"
5. The text area "Identifier" should have automatically pre-filled with the name of your movie clip. If it has not - make sure the text in the identifier is exactly the same as your movie clip!
6. Click on the "OK" button on the "linkage" dialogue box.
7. double click on the movie clip(trueSkin_mc) and make sure the new image's x+ y are set to 0.0
8. return to the main timeline.

// **** CODE **** //
1. on frame 1 of the "actions" layer add:
this.example_acc.falseOverSkin = "trueSkin_mc";
2. on frame 10 of the "actions" layer add:
stop();
3. Publish the movie

// **** REAL WORLD EXAMPLE **** //
http://www.theperpetual.com
- click on "Free Reports" + "our process"

here is the code used:
path = _root.pfgFreeReportsACC_mc.pfgFreeReports_acc
path.drawFocus="";
path.setStyle("openDuration", 500);
path.setStyle("openEasing", mx.transitions.easing.Bounce.easeOut);
path.selectedIndex = _root.pfgFreeReportsACC_mc.pfgFreeReports_acc.numC hildren - 6;
path.setStyle("color" , "0x003366");
path.setStyle("borderStyle" , "none");
path.setStyle("verticalGap" , 1);
path.depthChild0._alpha = 0;
path.falseOverSkin = "pfgFreeReportsAccordianTrueSkin_mc";
path.trueOverSkin = "pfgFreeReportsAccordianTrueSkin_mc";
path.falseUpSkin = "pfgFreeReportsAccordianFalseSkin_mc";
path.falseDownSkin = "pfgFreeReportsAccordianTrueSkin_mc";
path.trueUpSkin = "pfgFreeReportsAccordianTrueSkin_mc";
path.trueDownSkin = "pfgFreeReportsAccordianTrueSkin_mc";
// end all

Last edited by skyymap; 05-06-2005 at 06:24 AM.
skyymap is offline   Reply With Quote
Old 05-06-2005, 02:18 PM   #5
firdosh
Registered User
 
Join Date: Dec 2004
Posts: 146
Default

Hey skymap,
it works when you have the component on stage but it dosent work when u dynamically add it using createClassObject.

cheers
firdosh
firdosh is offline   Reply With Quote
Old 05-07-2005, 03:07 AM   #6
skyymap
Registered User
 
Join Date: Aug 2004
Posts: 2
Default

firdosh -

Post the code so we can looks at this.

- the Skyymap team
skyymap is offline   Reply With Quote
Old 05-07-2005, 03:11 AM   #7
cxn926
no
 
cxn926's Avatar
 
Join Date: Mar 2005
Posts: 719
Default

I Will Post This Again Like I DID IN OTHER THREADS!!!!!

PLEASE PUT YOUR CODE IS THE AS TAGS!!!!!!!!!!!!!!!
cxn926 is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:17 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.