Knowledge Base |
Important! All new questions are usually answered within the next business day.
Accordion Panel V3
(views: 4789)
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: 1381)
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
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
text instead of pics
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.
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.
Login to post your comment
Other questions in this item:
Installing the Accordion Panel V3 Open the accordion panels automatically the title isn't showing in the horizontal mode Use HandCursor on Accordion Panel's items Open the Accordion Panel upwards Vertical title for horizontal accordion panel Stopping video content when changing the panel Load different kind of data into AccordionPanelV3 Auto open a panel on startup Rotate the direction of the text on horizontal Accordion Dimensions TEXTU appears in my file Accordion Panel communicates with a loader HyperLinking panels Access header title and panel content Panel opens only after content is loaded, when loadExpandedItemsOnly is true Access header title and panel content Acces accordion panel from content Panel opens only after content is loaded, when loadExpandedItemsOnly is true Load new content without XML Access accordion panel loaded with loadMovie inside container clip Non Latin characters Acces accordion panel from content Getting accurate accordion height Graphics below the accordion panel Non Latin characters Flv playback inside accordion Get the size of panel's content Open panels from bottom to top and left to right Accordion Panel communicates with a loader Open panels upward for vertical accoirdion and to the left for horizontal accordion Open URL from panel content, not from panel header Open URL from panel content, not from panel headerMenu |
|
|


can we add text instead of pics, and if yes then how?