Knowledge Base


Important! All new questions are usually answered within the next business day.

Accordion Panel V3

(views: 13027)

Accordion Panel V3 is a professional accordion component that loads movies and movieclips and supports both horizontal and vertical orientation, it supports customized tweens, states and visual styles. Here are all known issues for Accordion Panel V3. If you have any questions that you think we should discuss here please let us know.



Use the Accordion Panel without external XML file

(2007-11-27 - views: 4425)

Q: How can I add the xml file from Flash using actionscript. I don't want to have an external XML file on my server.
A: The Accordion Panel V3 needs the xml file to load the content of its panels. Also inside the XML file you define styles for the panel. If you want to insert the XML file inside your actionscript, you can use the setXML() method in order to add the xml file inside your actionscript.
See the code below:

var oXML:XML = new XML();
oXML.ignoreWhite = true;
oXML.parseXML("<?xml version='1.0' encoding='UTF-8'?>" +
                    "<component name='Accordion Panel V3'>" +   
                       "<data >" +
                            "<item contentSize='180' enabled='true' expanded='false' title='My First Panel' contentEvents='true' contentPath='images/img5.jpg' />" +
                            "<item contentSize='180' enabled='true' expanded='false' title='My Second Panel' contentEvents='true' contentPath='images/img6.jpg' headerSize='20'  />" +
                            "<item contentSize='180' enabled='true' expanded='false' title='My Third Panel' contentPath='images/img7.jpg' headerSize='20'  />" +
                            "<item contentSize='180' enabled='true' expanded='false' title='My Third Panel' contentPath='images/img8.jpg' headerSize='20'  />" +
                       "</data>" +
                    "</component>");
//accordionPanel is the instance name of your Accordion Panel component on stage.
accordionPanel.setXML(oXML);

You can also download the attached files in order to see a working example.

Files: AccPanel_XMLObject.zip 


User Comments

accordian panel v2
posted by freeroz on 2008-07-11

can we add text instead of pics, and if yes then how?
text instead of pics
posted by negush on 2008-07-14

Yes, you can display text instead of pictures. The solution for you would be to create movie clips that contain text fields with the text you want and place them in the Library (don't leave them on stage), giving them linkage ids (AS2) or class names (AS3). Then, you can specify those linkage ids or class names in the .xml file (or XML data created by code) as values of the contentPath (AS2) or source (AS3) attribute.
How to achieve text instead of pics
posted by epiraces on 2008-11-09

I guess I'm not so savy when it comes to AS2 and AS3. How to add the text from an xml file? I bought it but still can't manage to do it. Thanks!
How to achieve text instead of pics
posted by negush on 2008-11-10

The solution is not so simple. The Accordion Panel component does not display text (besides the header title). It has to load content (images or movie clips) in the panels.

You need to create a movie clip in the Library, containing only a text field. Then you would have to load the movie clip in all the panels you want to display text. After all the panels have been loaded and displayed (listen for the onDrawComplete (AS2) or AccordionPanelEvents.DRAW (AS3) event) and then assign the desired text all of the panel contents (access the text field inside the content). You have to write quite some code for that.
Use the Accordion Panel without external XML file
posted by lazerickl on 2009-08-06

How do you define styles for the panel using the XML within AS3?
Use the Accordion Panel without external XML file
posted by florodebat on 2009-08-11


The styles must be defined in the same way even if the xml is added inside the fla file by Action Script. Please click the link below in order to see an advanced xml example where a style is defined.

http://www.jumpeyecomponents.com/public/prod_pages/40/props.xml

http://www.jumpeyecomponents.com/Flash-Components/User-Interface/Accordion-Panel-V3-40/xml.htm


Login to post your comment login to post your comment

Other questions in this item:

Installing the Accordion Panel V3 Open the accordion panels automatically Vertical title for horizontal accordion panel Accordion Panel communicates with a loader Use HandCursor on Accordion Panel's items Auto open a panel on startup the title isn't showing in the horizontal mode Load different kind of data into AccordionPanelV3 Stopping video content when changing the panel Dimensions Open the Accordion Panel upwards Panel opens only after content is loaded, when loadExpandedItemsOnly is true Access header title and panel content Access accordion panel loaded with loadMovie inside container clip Non Latin characters Panel opens only after content is loaded, when loadExpandedItemsOnly is true Get the size of panel's content Rotate the direction of the text on horizontal Accordion TEXTU appears in my file HyperLinking panels Getting accurate accordion height Flv playback inside accordion Open URL from panel content, not from panel header Open URL from panel content, not from panel header Load new content without XML Graphics below the accordion panel Acces accordion panel from content Access header title and panel content Acces accordion panel from content Open panels from bottom to top and left to right Non Latin characters Accordion Panel slide show Accordion Panel communicates with a loader Open panels upward for vertical accoirdion and to the left for horizontal accordion Get selected panel and content Panels with different sizes Load new content without XML Open Accordion panels automatically (slide show)


Back

Knowledge Base Search

Enter keywords below:
Advanced Search
FlashEff 2.0
Create professional flash photo slideshows online

FREE Flash Stuff

Check out these free, fully functional AS3.0 Flash components by Jumpeye:

FlashEff 2.0 Free
(free for non-commercial use)

JC Panorama
(free for non-commercial use)

JC Play List
(fully free)

Basic Menu Pack V3
(free AS3 version)

MCTE V3
(free AS3 version)

JC Player
(free for non-commercial use)

JC Flash Map
(free for non-commercial use)

Flash Bookmarks
(fully free)

ActionScript Bridge AS2-AS3
(fully free)

JS Charts
(free for non-commercial use)

Free Trial Versions

The trial versions do have a major limitation. They will ONLY run into debugger flash player versions, such as the Flash IDE player and the activeX FP used by developers.

Switch from Free Trial version to Full version.

You can switch from Trial to Full versions in a blink of an eye.
See this tutorial in order to find out how.

We accept Google Checkout

Google Checkout Acceptance Mark

Secured by VeriSign