?

Log in

No account? Create an account

Previous Entry | Next Entry

I'm trying to save myself time and trouble at work with a new Flash/XML driven photo gallery. So, if any of you know actionscript and linking to xml pages, can you help me out with the following...

I had a Flash file that calls the path of an XML page.

This means that I have to change the XML page path for each instance I want to use the photo gallery and save a new copy of the swf file.

Instead, I would like to have one instance of the swf file and be able to define the path to the XML page via the code where I display the swf file.

Does anyone on my F-List have an idea? The Flash file in question is already using Actionscript 2.0.

ETA: *does the happy dance*

Google is my friend. I found this link and it had what I needed in item number seven.

7. Can I use FlashVars to specify a different XML configuration filename URL?

Yes edit the HTML source file and go to the <object> tag where your SWF resides and ad the following code to the object tag:

Code:
<param name="FlashVars" value="xmlFile=myXMLFile.xml" />

or you can specify an absolute URL path:

Code:
<param name="FlashVars" value="xmlFile=http://www.mysite.com/myfolder/myXMLFile.xml" />

Make sure to add the FlashVars="xmlFile=myXMLFile.xml" or FlashVars="xmlFile=http://www.mysite.com/myfolder/myXMLFile.xml" also to the <embed> tag.

If you're using the AC_FL_RunContent() function to insert the .swf objects inside the .html page add the 'FlashVars' and the 'xmlFile=myXMLFile.xml' in the function call parameter list similar to other parameters / values pairs specific to the Flash object.

Latest Month

May 2015
S M T W T F S
     12
3456789
10111213141516
17181920212223
24252627282930
31      

Tags

Powered by LiveJournal.com
Designed by Tiffany Chow