Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10
  1. #1
    Regular Coder
    Join Date
    Nov 2008
    Posts
    175
    Thanks
    4
    Thanked 6 Times in 6 Posts

    calling an xml file in html

    I bought a flash xml photo gallery, the problem is, it automatically loads gallery.xml, i want to make others so i can have more then one on my site.
    I've spoken to the owner of the file but he's been less then helpful.

    This is the code i've got from him and it just doesn't work it still points to gallery.xml

    Here's what i got, how would i go about making it load a file called travel.xml?

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    </head>
    
    <body>
    <div id="flexiGalleryContainer">
    		<script type="text/javascript">
       		var so = new SWFObject (swf, id, width, height, version, background-color);
       		so.addParam("BASE", "");
    		so.addVariable("settingsXML", "data/settings.xml");
       		so.addVariable ("galleryXML", "data/travel.XML");
       		so.write("flexiGalleryContainer");
    		</script>
    
    		
    		
            <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" 
    			codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" 
    			width="560" 
    			height="540" 
    			id="1" 
    			align="middle">
              <param name="allowScriptAccess" value="sameDomain" />
    
              <param name="movie" value="travel.swf" />
              <param name="quality" value="high" />
              <param name="bgcolor" value="#E6EAF2" />
              <param name="base" value="./" />
              <embed 
    			src="gallery.swf" 
    			quality="high" 
    			bgcolor="#E6EAF2" 
    			width="560" 
    			height="540" 
    			name="flash" 
    			align="middle" 
    			allowscriptaccess="sameDomain" 
    			type="application/x-shockwave-flash" 
    			base="./"
    			pluginspage="http://www.macromedia.com/go/getflashplayer" />        
    </object>
    </div>
    
    </body>
    </html>
    Thanks for the help

  • #2
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    Can you show us some Actionscript? That is where the magic actually happens.
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.

  • #3
    Regular Coder
    Join Date
    Nov 2008
    Posts
    175
    Thanks
    4
    Thanked 6 Times in 6 Posts
    There is no actionscript, you only get the .xml .swf and .js

    It comes with a tutorial that i can paste if that will help?

    But when i follow what it says it still points to gallery.xml


    Code:
    FlexiGallery: Embedding into HTML Page	
    
    For handy embedding of the FlexiGallery into HTML page we use SWFObject script 
    You may find required swfobject.js in the folder “FlexiGallery/js” of the distributive
    In order to use it you have to include swfobject.js into your page <head>
    Example:
    <head>
    <script type="text/javascript"  src="http://mysite.com/FlexiGallery/js/swfobject.js"></script>
    ………….
    	
    Then you need to add a small amount of code into your page <body>:
    1)	Create a container for FlexiGallery		
    <div id="flexiGalleryContainer">
      This text is replaced by FlexiGallery.
    </div>
    2)	Create FexiGallery flash movie and add it to the <div> container
    <script type="text/javascript">
       var so = new SWFObject (swf, id, width, height, version, background-color);
       so.addParam("BASE", "pathToFlexiGalleryFolder");
       so.addVariable("settingsXML", "pathToSettingsXML");
       so.addVariable ("galleryXML", "pathToGalleryXML");
       so.write("flexiGalleryContainer");
    </script>
    swf - The file path and name to gallery.swf file on your web site
    id - The ID of your object or embed tag
    width - The width of your gallery
    height - The height of your gallery.
    version - The required player version for your Flash content.  Have to be  "8"
    background-color - This is the hex value of the background color of your Flash movie.
    
    BASE: path to the FlexiGallery folder on your website. This parameter is mandatory.
    settingsXML [optional]: path to the settings.xml on your website.
     By default it uses path: BASE + "data/settings.xml"
    galleryXML [optional]: path to the gallery.xml on your website.
     By default it uses path: BASE + "data/ gallery.xml"
    
    Example:
    </script>
    var so=new SWFObject("http://mysite.com/FlexiGallery/gallery.swf","gallery","500","400","8","FFFFFF")
       so.addParam("BASE", " http://mysite.com/FlexiGallery/");
       so.addVariable("settingsXML", "data/settings.xml");
       so.addVariable ("galleryXML", "data/gallery.xml");
       so.write("flexiGalleryContainer");
    </script>
    
       Hint:  
    so.write("flexiGalleryContainer ") is adding FlexiGallery to the div with id="flexiGalleryContainer"

  • #4
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    Can you provide a link to the website or to a working swf? I really have no ideas besides changing those variables.
    Are you sure the link was correct? You have uppercase letters in the link from the first post, make sure that is 100% the same.
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.

  • #5
    Regular Coder
    Join Date
    Nov 2008
    Posts
    175
    Thanks
    4
    Thanked 6 Times in 6 Posts
    sorry where's the capitals?

    A working link is http://www.jasongold.org/testnew

  • #6
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    Capital Letters here

    Code:
    		<script type="text/javascript">
       		var so = new SWFObject (swf, id, width, height, version, background-color);
       		so.addParam("BASE", "");
    		so.addVariable("settingsXML", "data/settings.xml");
       		so.addVariable ("galleryXML", "data/travel.XML");
       		so.write("flexiGalleryContainer");
    		</script>
    Your site has travel.xml not travel.XML.
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.

  • #7
    Regular Coder
    Join Date
    Nov 2008
    Posts
    175
    Thanks
    4
    Thanked 6 Times in 6 Posts
    i changed it locally and it stilled didn't work, any other suggestions?

    If not could i send you the zipped file somehow so you can have a go with it yourself?

  • #8
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    Sure I'll take a look. Just tell me how!
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.

  • Users who have thanked gnomeontherun for this post:

    j05hr (12-15-2008)

  • #9
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    This code works for me, assuming there is a travel.xml document in the subfolder data.
    Code:
    <script type="text/javascript">
    	var flash = new SWFObject("gallery.swf", "flash", "560", "540", "8.0.0", "#E6EAF2", true)
    	flash.addParam("wmode", "window");
    	flash.addParam("base", "./");
    	flash.addParam("align", "middle");
    	flash.addParam("scale", "noscale");
    	flash.addVariable ("galleryXML", "data/travel.xml");
    	flash.write("flash")
    </script>
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.

  • #10
    Regular Coder
    Join Date
    Nov 2008
    Posts
    175
    Thanks
    4
    Thanked 6 Times in 6 Posts
    it seems to be working now, thank you so much!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •