Skip to Content »

FlashApe » Scrolling Accordion Segments

 Scrolling Accordion Segments

  • September 29th, 2006
  • 5:08 pm

There's probably a better (or more correct) way to do this, but here's how I got scrolling segments in the v2 Accordion component:

Actionscript:
  1. function buildSegments(){
  2. for (var i=0; i<7; i++){
  3. var pane = my_acc.createSegment("ScrollPane", "s"+i, "Segment "+i);
  4. pane.contentPath = "mcLinkageID"; //the content to scroll
  5. }
  6.  
  7. resizeScrollers();
  8. }
  9.  
  10. function resizeScrollers(){
  11. for (var i=0; i<7; i++){
  12. var pane = my_acc.getChildAt(i);
  13. pane.setSize(pane._parent.width, my_acc.calcContentHeight())
  14.  
  15. }
  16. }

i had to break it up into two separate loops, since the results from my_acc.calcContentHeight() would return a different value after each new segment was added.

1 Person had this to say...

Gravatar
  • srinath
  • October 19th, 2007
  • 3:44 am

Pls share your source

Want your say?

* Required fields. Your e-mail address will not be published on this site


You can use the following XHTML tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>