Bookmark and Share

How to dynamically read XML file from FlashVars?

Print

The FlashVars property of Flash Player provides an efficient method of importing variables into Flash movie.

FlashVars must be assigned in both the OBJECT and EMBED tags in order to work on all browsers.

In HTML file, you can set FlashVars as:

<PARAM VALUE="xmlfile=images.xml">

<EMBED href="/slide.swf" FlashVars="xmlfile=images.xml" ... (other parameters)></EMBED>

For more details about how to configure FlashVars in HTML code, please refer to the Adobe Flash Help document.

In AS3.0, you can read parameter from FlashVars and configure the Slide3D component as following:

var filename:String = stage.loaderInfo.parameters["xmlfile"];

if (filename != null)
{
demoSlide.photoListXMLFile = filename;
}

The downloaded package of Slideshow Component includes a demo project: demo_as_xml_flashvars.

 

Newsletter





Payment Method


Flash Components Set


Warning: Parameter 1 to modMainMenuHelper::buildXML() expected to be a reference, value given in /usr/www/users/mtoolsft/mtoolcomponents/content/libraries/joomla/cache/handler/callback.php on line 99

Flash Slideshow


Warning: Parameter 1 to modMainMenuHelper::buildXML() expected to be a reference, value given in /usr/www/users/mtoolsft/mtoolcomponents/content/libraries/joomla/cache/handler/callback.php on line 99

Flash Animation Effects


Warning: Parameter 1 to modMainMenuHelper::buildXML() expected to be a reference, value given in /usr/www/users/mtoolsft/mtoolcomponents/content/libraries/joomla/cache/handler/callback.php on line 99

Flash Preloader Components


Warning: Parameter 1 to modMainMenuHelper::buildXML() expected to be a reference, value given in /usr/www/users/mtoolsft/mtoolcomponents/content/libraries/joomla/cache/handler/callback.php on line 99