Rich Media & Video |
|||
| Components > Universal Expander | |||
This component combines multiple SWF files (up to the maximum 15 movies from the links and descriptions layer) and controls the transitions between the banner and expand phases automatically. The most common implementation takes two files and dynamically adds an invisible expansion and click through button to track the users actions. Optionally you can add a close button and keyline around the creative and control the expansion settings from the components inspector panel.
(By default the component is set-up as a left expanding e.g.160x600 – 500x600)
Explore the banner phase settings
| Settings |
Descriptions |
|---|---|
Banner X position |
The X coordinate of the banner phase in pixels. |
Banner Y position |
The Y coordinate of the banner phase in pixels. |
Banner width |
The width of the banner phase in pixels. |
Banner height |
The height of the banner phase in pixels. |
| Banner start playback frame | This is the frame that the banner SWF file plays from when the creative contracts. |
| Banner stop playback frame | This is the frame that the banner SWF file stops on when the creative expands. |
| Banner movie number | This is the index number of the SWF file (movie #) you would like to use for the banner panel from the links and descriptions layer. |
Explore the expand phase settings
| Settings |
Descriptions |
|---|---|
| Expand X | The X coordinate of the expanded phase in pixels. |
| Expand Y | The Y coordinate of the expanded phase in pixels. |
| Expand width | The width of the expanded phase in pixels. |
| Expand height | The height of the expanded phase in pixels. |
| Expand start playback frame | This is the frame that the expand SWF file plays from when the creative expands. (It is best practice to place a blank key frame with a stop(); command on the first frame and to start any animation from frame two); |
| Expand stop playback frame | This is the frame that the expand SWF file stops on when the creative contracts. |
| Expand movie number | This is the index number of the SWF file (movie #) you would like to use for the expand panel from the links and descriptions layer. |
Explore the creative control settings
| Settings |
Descriptions |
|---|---|
| Disable the default expansion button | This removes the default expansion button and allows the user to control the expansion from inside the banner SWF file. (Selecting this option will disable the Expand on rollover/click checkbox.) |
| Disable the default click through button | This removes the default click through button and allows the mouse to access the expand SWF file allowing more advanced user interactions to be coded e.g. video controls, multiple click throughs and custom events. |
| Collapse on roll-off | By checking this box the creative will automatically collapse when the mouse rolls off the ad. |
| Expand on rollover/click | This controls the action used to expand the creative. Checked = Rollover to expand / Unchecked = Click to expand; |
| Use a single child file for both phases | Selecting this option will use the same child file for both the banner and expand phases, please note you are required to register both movie1 and movie2 with the same file name. |
| Add a keyline | This determines if a keyline is added around the creative. |
| Keyline colour | Enter the HEX value to set the colour of the keyline eg:0x000000 for black, 0xFFFFFF for white. |
| Add a close button | This adds a close button from the library (arm_close_btn) to the creative. |
| Close button alignment | Aligns the close button to the selected position. (Auto, TL, TR, BL, BR) |
Explore the advanced expansion settings 
| Settings |
Descriptions |
|---|---|
| Motion Tween type | Select the motion tween type for the expansion. (Regular, Strong, Bounce, Elastic, Back) |
| Easing type | Select the easing type for the expansion. (easeIn, easeOut, easeInOut) |
Automatic expansion |
This controls whether the creative will automatically expand. If the Auto expansion delay value is 0 then the creative will pre-expand. |
| Auto expansion delay (seconds) | The amount of time in seconds the creative to wait before automatically expanding. This requires the Automatic expansion to be selected. |
| Expansion speed (seconds) | This is the time in seconds that it takes for the creative to expand or collapse. (minimum 0.1 seconds) |
| Test in browser | Displays the creative in a browser and allows you to check the mouseRolledOff functionality. (PC only) |
Explore the Universal Expander API and broadcast eventsYou can access the methods of the component through it's instance name. By default it is set to UniversalExpander. e.g. _level0.UniversalExpander.expand();
| Methods |
Descriptions |
|---|---|
changeBannerMovieNumber (index:Number):Void |
Selects a new movie from the links and descriptions layer to use as the banner panel. (This can be called in either phase but will only swap when the creative is in the banner phase) |
changeExpandMovieNumber (index:Number, isExpanding:Boolean):Void |
Selects a new movie from the links and descriptions layer to use as the expand panel. The second optional parameter is a boolean. When set to true this will automatically expand the creative as soon as the new SWF file has fully loaded. |
|
Assigns the frame which the banner panel will play from when the creative collapses. |
|
Assigns the frame which the banner panel will stop at when the creative expands. |
|
Assigns the frame which the expand panel will play from when the creative expands. |
changeExpandStopFrame (index:Number):Void |
Assigns the frame which the expand panel will stop at when the creative has collapsed. |
expand():Void |
Expands the creative. |
collapse ():Void |
Collapses the creative. |
hideBanner |
Boolean variable. If set to false the banner movie will stay on the stage. |
The Universal Expander broadcasts the following events which can be listened for either by adding a listener object or via a _root level function called MRM_component_events.
| Event Type |
Descriptions |
|---|---|
onExpandReady |
Fires when both child (banner, and expander) files have been fully loaded. |
onExpandStart |
Fires when the expansion begins. |
onExpandComplete |
Fires when the expansion completes |
|
Fires when the creative begins to collapse. |
|
Fires when the cretive has fully collapsed. |
|
Fires when the user clicks the default click through button. |
onChangePanel |
Fires when the changeBannerMovieNumber method is called. |
To setup the timeline function you can use the action hints panel and select the Universal Expander Events and then the MRM_component_events

//-----------------------------------------------------------------------------------------------------
// MRM_component_events | Universal Expander. e.g.evtObj.type == "onExpandStart"
//-----------------------------------------------------------------------------------------------------
// evtObj.type The broadcast event.
// evtObj.target The component which broadcasts the event
// evtObj.bannerMovieIndex The currently selected movie for the banner panel
// evtObj.expandMovieIndex The currently selected movie for the expand panel
//-----------------------------------------------------------------------------------------------------
// Universal Expander event types
//-----------------------------------------------------------------------------------------------------
// onExpandReady Fires when both child (banner, and expander) files have been fully loaded.
// onExpandStart Fires when the expansion begins.
// onExpandComplete Fires when the expansion completes.
// onCollapseStart Fires when the creative begins to collapse.
// onCollapseComplete Fires when the creative has fully collapsed.
// onClick Fires when the user clicks the default click through button.
// onChangePanel Fires when the changeBannerMovieNumber method is called.
// onChangePanel Fires when the changeExpandMovieNumber methods is called.
//-----------------------------------------------------------------------------------------------------
function MRM_component_events(evtObj:Object)
{
if(evtObj.type == "onExpandStart")
{
trace("onExpandStart");
}
if(evtObj.type == "onCollapseComplete")
{
trace("onCollapseComplete");
}
if(evtObj.type == "onChangePanel")
{
trace ("Panel Changed :: Banner Movie "+evtObj.bannerMovieIndex+" | Expand Movie "+evtObj.expandMovieIndex);
}
}
Help Files
The component help files are available offline if no internet connection is available.
Video Tutorials
When there is a video tutorial available for the component an extra button is revealed which will load the demo into the components inspector panel. (Please note - This will not appear when working offline.)
To enhance the transition between the two phases an optional frame label can be used. rollOutAnimation should be added to the expand panel at the begining of the transition animation and the component will then play from this frame when the user collapses the creative.
Note: When using the Universal Expander you must ensure the flash stage dimensions are equal to the fully expanded state.
See also |
|||