Knowledge Base |
Important! All new questions are usually answered within the next business day.
Accordion Panel V3
(views: 5302)
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.
Accordion Panel communicates with a loader
(2008-07-14 - views: 394)
Q: How can the AccordioPanel communicate a loader to load a new image when a new panel is expanded ?
A: You need to add a new attribute to each of the items in the xml file, representing the path to the corresponding image. Next, listen for the "onExpand" event to know when an item has expanded and check the attribute containing the path to the image for the loader component. Finally, associate that path to the loader.
You'll need to have an AS3 accordion panel component on the stage, with an instance name of "accPanel" and a LoaderProV3AS3 component, with the instance name of "ldr". Here is the code to do it:
import com.jumpeye.Events.AccordionPanelEvents;
// We need to listen for the "onExpand" event, so when one of the items
// is selected, the corresponding image loads into the loader object.
accPanel.addEventListener(AccordionPanelEvents.EXPAND, expandHandler);
function expandHandler(evtObj:AccordionPanelEvents):void {
// evtObj.item - is the item that has just been expanded
// the "largeImage" attribute from the xml file is added as property on the item
ldr.source = evtObj.item.largeImage;
}
You'll need to have an AS3 accordion panel component on the stage, with an instance name of "accPanel" and a LoaderProV3AS3 component, with the instance name of "ldr". Here is the code to do it:
import com.jumpeye.Events.AccordionPanelEvents;
// We need to listen for the "onExpand" event, so when one of the items
// is selected, the corresponding image loads into the loader object.
accPanel.addEventListener(AccordionPanelEvents.EXPAND, expandHandler);
function expandHandler(evtObj:AccordionPanelEvents):void {
// evtObj.item - is the item that has just been expanded
// the "largeImage" attribute from the xml file is added as property on the item
ldr.source = evtObj.item.largeImage;
}
Login to post your comment
Other questions in this item:
Installing the Accordion Panel V3 the title isn't showing in the horizontal mode Open the accordion panels automatically Use HandCursor on Accordion Panel's items Use the Accordion Panel without external XML file Vertical title for horizontal accordion panel Open the Accordion Panel upwards Load different kind of data into AccordionPanelV3 Stopping video content when changing the panel Auto open a panel on startup Rotate the direction of the text on horizontal Accordion Accordion Panel communicates with a loader Dimensions TEXTU appears in my file HyperLinking panels Access header title and panel content Panel opens only after content is loaded, when loadExpandedItemsOnly is true Panel opens only after content is loaded, when loadExpandedItemsOnly is true Acces accordion panel from content Access header title and panel content Access accordion panel loaded with loadMovie inside container clip Load new content without XML Non Latin characters Flv playback inside accordion Getting accurate accordion height Acces accordion panel from content Graphics below the accordion panel Non Latin characters Get the size of panel's content Open panels from bottom to top and left to right Open URL from panel content, not from panel header Open panels upward for vertical accoirdion and to the left for horizontal accordion Open URL from panel content, not from panel headerMenu |
|
|
