Kayla Shay (kaylashay) wrote,
Kayla Shay

Any Flash Actionscript 2.0 / XML Experts on My F-Lists?

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:

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

or you can specify an absolute URL path:

<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.
Tags: help: flash actionscript, life: work

  • The Book Meme

    sinfulslasher tagged me, so here it is: Rules: In a text post, list ten books that have stayed with you in some way. Don’t take but a…

  • Meme: Fic Recognition

    Stolen from elrhiarhodan because I'm not sure I can do it and I need a challenge. From my Yearly Story Roundups, find a fic and choose…

  • The Movie Meme

    Everyone should post their ten most CRUCIAL CRUCIAL CRUCIAL-ASS movies, like the movies that explain everything about yourselves in your current…

  • Post a new comment


    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.