Knowledge Base |
Important! All new questions are usually answered within the next business day.
Accordion Panel V3
(views: 4600)
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.
Rotate the direction of the text on horizontal Accordion
(2007-12-11 - views: 943)
Q: Is there a way to rotate the orientation of the item titles? For example my first title is "one". I need the "o" to be at the top of the page instead of the "e".
A: First of all, you need to include your font into your project's Library. This font is set in the xml file used to set up the component. Since the text field in the headers will be rotated, you also need to increase a little the height of the headers (in the same xml file). The component instance needs to have the embedFonts property set to "true".
To continue, you have to listen for the onDrawComplete event. In the handler function you can parse all the headers of the AccordionPanel instance and rotate their text fields. Here's the code that does all this:
// First we have to listen for an event that is dispatched after all
// the component items are drawn.
var listener:Object = Object();
// The reason we are waiting for the onDrawComplete event is because
// before this is evant is dispatched, there are no items in the
// panel to be referenced.
listener.onDrawComplete = function(evtObj:Object):Void {
if (myAccPanel.items) {
//We traverse the children list and for every item we set its header's useHandCursor property to true
for(var i in myAccPanel.items){
// The text field is moved up 5 pixels so it can fit
// better in the item header clip. The header's height
// has been set in the xml file.
myAccPanel.items[i]._header.accText._y -= 5;
// Rotate the text field.
myAccPanel.items[i]._header.accText._rotation = 10;
}
}
}
myAccPanel.addEventListener("onDrawComplete", listener);
You can also see the example file attached to this item:
Files: AccPanel_TextRotation.zip
To continue, you have to listen for the onDrawComplete event. In the handler function you can parse all the headers of the AccordionPanel instance and rotate their text fields. Here's the code that does all this:
// First we have to listen for an event that is dispatched after all
// the component items are drawn.
var listener:Object = Object();
// The reason we are waiting for the onDrawComplete event is because
// before this is evant is dispatched, there are no items in the
// panel to be referenced.
listener.onDrawComplete = function(evtObj:Object):Void {
if (myAccPanel.items) {
//We traverse the children list and for every item we set its header's useHandCursor property to true
for(var i in myAccPanel.items){
// The text field is moved up 5 pixels so it can fit
// better in the item header clip. The header's height
// has been set in the xml file.
myAccPanel.items[i]._header.accText._y -= 5;
// Rotate the text field.
myAccPanel.items[i]._header.accText._rotation = 10;
}
}
}
myAccPanel.addEventListener("onDrawComplete", listener);
You can also see the example file attached to this item:
Files: AccPanel_TextRotation.zip
User Comments
Changing Text Size
The size of the font used for the title can be set from the xml file used to set up the AccordionPanel. For more information on the xml file structure, please consult the corresponding help page: http://www.jumpeyecomponents.com/Flash-Components/User-Interface/Accordion-Panel-V3-40/xml.htm
posted by negush on 2008-03-17
The size of the font used for the title can be set from the xml file used to set up the AccordionPanel. For more information on the xml file structure, please consult the corresponding help page: http://www.jumpeyecomponents.com/Flash-Components/User-Interface/Accordion-Panel-V3-40/xml.htm
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 the Accordion Panel without external XML file 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 Dimensions TEXTU appears in my file HyperLinking panels Accordion Panel communicates with a loader 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 Graphics below the accordion panel Getting accurate accordion height 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 accordionMenu |
|
|


Can you change the size of the title text and correspondingly the size of the title text placeholder?