FORUMS: list search recent posts

Accordion Component Layout Issue

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Adam Ferestad
Accordion Component Layout Issue
on Dec 18, 2009 at 5:36:27 pm

hello,
i am working on making a web application that is using accordion components and AS2.0 to give the user their options. I am running into some problems with skinning it though. I'm pretty sure that it is a limitation of flash, but I cannot seem to figure out a way to skin each bar individually. I have figured out how to get each level of the accordion to have a different styleColor, but I cannot figure out how to adjust each bar of the component. There is one way I think might work to do it, but my coding skills are lacking for making it work. I have figured out that I can make a movieclip object for the skin on the accordion with several frames on it. So all I have to figure out is how to make the movieclip change to a specific frame on a specific bar and I'm golden (on this problem at least). This is the code I am trying to use to see if I can make it trace each load (the randNum variable is part of the attempt to make it change frame numbers after I get it working to trace out the loads):
_root.layout_acc.AccordionHeaderSkin.col.onLoad = function() {
trace(randNum)
}


This code is in the root of the application. I'm sure that's the wrong place though. The only other place that it makes sense to have is in the AccordionHeaderSkin object. Also, how would I make an active/inactive skin. Even if I cannot make each bar have it's own unique skin, i would like to know how to make unique active/inactive skins and if I could make different skins for each accordion on the application, it would be great.


Return to posts index

Marcus Geduld
Re: Accordion Component Layout Issue
on Dec 18, 2009 at 5:55:35 pm

This might help:

http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=Part4_AS2_C...

Author "After Effects Expressions"
Co-author "After Effects For Flash, Flash For After Effects"
Artistic Director, Folding Chair Classical Theatre, Inc
Senior Flash Developer, Zeitbyte.com


Return to posts index

Adam Ferestad
Re: Accordion Component Layout Issue
on Dec 18, 2009 at 7:35:13 pm

Ok, I went all the way through the Accordion help on there, and it helped me solve one problem I was having. That being the problem of loading a separate movie clip for each state of the accordion. unfortunately I cannot figure out the code for setting just one child to have it's own set of movie clips.

This is the code that works to change the children to one set of movie clips:
onClipEvent(initialize) {
falseUpSkin = "BlackAccordionHeaderSkin";
falseDownSkin = "GrayAccordionHeaderSkin";
falseOverSkin = "BlackAccordionHeaderSkin";
falseDisabled = "BlackAccordionHeaderSkin";
trueUpSkin = "GrayAccordionHeaderSkin";
trueDownSkin = "GrayAccordionHeaderSkin";
trueOverSkin = "GrayAccordionHeaderSkin";
trueDisabledSkin = "GrayAccordionHeaderSkin";
}


This is the code I tried to make it change just one:
onClipEvent (initialize) {
var firstChild_obj:Object = this.getChildAt(0)
function(firstChild_obj) {
falseUpSkin = "BlackAccordionHeaderSkin";
falseDownSkin = "GrayAccordionHeaderSkin";
falseOverSkin = "BlackAccordionHeaderSkin";
falseDisabled = "BlackAccordionHeaderSkin";
trueUpSkin = "GrayAccordionHeaderSkin";
trueDownSkin = "GrayAccordionHeaderSkin";
trueOverSkin = "GrayAccordionHeaderSkin";
trueDisabledSkin = "GrayAccordionHeaderSkin";
}
}


These codes are placed on their respective accordions. The first code work perfectly for loading all of the children with the same set of movie clips, but the second is not working for loading just the first one with the movie clips and not the others. So where did I go wrong?


Return to posts index


Marcus Geduld
Re: Accordion Component Layout Issue
on Dec 24, 2009 at 6:22:31 pm

Whoa! onClipEvent? That's AS 1.0. I'd assumed you were working with AS 2.0 or 3.0. The help I send you to was for 3.0.

Author "After Effects Expressions"
Co-author "After Effects For Flash, Flash For After Effects"
Artistic Director, Folding Chair Classical Theatre, Inc
Senior Flash Developer, Zeitbyte.com


Return to posts index

Adam Ferestad
Re: Accordion Component Layout Issue
on Dec 24, 2009 at 10:07:12 pm

Well I am actually using 2.0, but I'm not much of a coder so it's more like blindfolding myself and throwing darts at a board of possibilities. I am digging through tutorials online and such to try to get this looking the way I want. Luckily the client has changed the design so that the second level of accordions aren't needed and I won't need to change individual child level bars, but I would still like to know how. Also, I have been searching for weeks and have not found a single reference of what Adobe used to replace the accordion component in AS3.0. I have never worked with 3.0 either, so all of my limited training is in 2.0/1.0. If you could point me to a good beginner's resource for AS3.0 I would be very grateful. Thank you for the response.


Return to posts index

Marcus Geduld
Re: Accordion Component Layout Issue
on Dec 28, 2009 at 3:44:56 pm

For a beginning AS 3 tutorial, I recommend this book:

http://www.friendsofed.com/book.html?isbn=9781430219187

Author "After Effects Expressions"
Co-author "After Effects For Flash, Flash For After Effects"
Artistic Director, Folding Chair Classical Theatre, Inc
Senior Flash Developer, Zeitbyte.com


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]