ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Flash file needs to read xml file in same directory

January 11, 2009 8:00pm

Subscribe [4]
  • #1 / Jan 11, 2009 8:00pm

    Andy Morris

    30 posts

    I have a nice little flash slide show that fits my needs perfectly. It is simple. It has a CSS file and an XML file that reside in the same directory as the flash file.

    I would like to generate the xml file with EE. I don’t want to have to edit the XML file by hand and I don’t have enough flash experience to edit the flash to look elsewhere for the XML file.

    Any suggestions on how to export the XML to a file to the directory where the flash file exists? I’ll take any suggestions at all… or if someone is willing to help out and edit a flash file I can provide the location of the xml template. I don’t have a license for flash or a clue where to begin.

  • #2 / Jan 12, 2009 2:34pm

    e-man

    1816 posts

    Probably the easiest way is to save your EE templates as a text file.
    This text file can be in any directory on your server so you could set this up to be in the same directory as your flash files.

  • #3 / Jan 12, 2009 8:58pm

    Andy Morris

    30 posts

    does it save the template or the output of the template? I’m looking for the generated content.

  • #4 / Jan 12, 2009 9:25pm

    e-man

    1816 posts

    Good catch, yeah, it saves the template. 😊
    Is there no way you can edit the path to the xml file in flash?

  • #5 / Jan 12, 2009 9:34pm

    Andy Morris

    30 posts

    I’m working on that. I think I may have found a friend with a copy of flash and the know-how. I have neither currently. Just thought I would check and see if it could be exported rendered. I didn’t think so.

  • #6 / Jan 17, 2009 11:58pm

    jejuna

    105 posts

    I have a nice little flash slide show that fits my needs perfectly. It is simple. It has a CSS file and an XML file that reside in the same directory as the flash file.

    I would like to generate the xml file with EE. I don’t want to have to edit the XML file by hand and I don’t have enough flash experience to edit the flash to look elsewhere for the XML file.

    Any suggestions on how to export the XML to a file to the directory where the flash file exists? I’ll take any suggestions at all… or if someone is willing to help out and edit a flash file I can provide the location of the xml template. I don’t have a license for flash or a clue where to begin.

    Andy, you can generate the XML file via EE. Just make a template for it, and set its type to xml.

    You can generate the list of images from weblog or gallery entries by using the standard EE tags.

    Or, here’s an example of a template that uses PHP to read a specific directory that has images in it: (set PHP to output), and this was made to work with SlideShowPro:

    <?xml version="1.0" encoding="UTF-8"?>
    <gallery>
        <album id="" title="" description="" lgPath="/your_directory/" tnPath="" tn="">
    <?php
    $files = array();
    $dir = opendir('/your_server_path/your_directory/');
    while(($file = readdir($dir)) !== false)
    {
      if($file !== '.' && $file !== '..' && !is_dir($file))
      {
        $files[] = $file;
      }
    }
    closedir($dir);
    sort($files);
    
    for($i=0; $i<count($files); $i++)
    {
      echo ''.$files[$i].';
    }
    ?> 
    </album>
    </gallery>

    it outputs:

    <gallery>
    <album id="" title="" description="" lgPath="/your_directory/" tnPath="" tn="">
    1.jpg
    12.jpg
    2.jpg
    3.jpg
    6.jpg
    8.jpg
    9.jpg
    </album>
    </gallery>

    If you call it “images_xml”, you simply point to that within your Flash file, or wherever it is you stick it in your particular application.

  • #7 / Jan 18, 2009 2:41pm

    Andy Morris

    30 posts

    Right. I know how to do that. The problem is in the flash application pointing to the xml file I create from EE. It currently looks for a file with a specific name in a the same directory as the flash file. Thanks for the post. I am going to find a different slide show to use.

    This thread can be closed…I’m done trying to make this slideshow work and will move on to others that are out there.

  • #8 / Feb 01, 2009 5:40am

    Macrike

    137 posts

    Right. I know how to do that. The problem is in the flash application pointing to the xml file I create from EE. It currently looks for a file with a specific name in a the same directory as the flash file. Thanks for the post. I am going to find a different slide show to use.

    This thread can be closed…I’m done trying to make this slideshow work and will move on to others that are out there.

    I’ve been looking for the same thing. A way to generate an actual .XML file so it can be read from a Flash file. I tried changing the path of the XML in the Flash file, but it’s not taking it. It needs to be a file with a .xml extension.

    Isn’t there any way to do this? PHP?

  • #9 / Feb 25, 2009 9:57am

    srosenow

    15 posts

    I am also trying to do the same thing. Saving the xml to a text file gives it a .php extension, and I don’t think Flash will accept non-xml filetypes. Has anyone actually made this work?

  • #10 / Feb 25, 2009 10:25am

    srosenow

    15 posts

    Please disregard my previous post. I found the information I was looking for here: http://ellislab.com/forums/viewthread/99291/#502651

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases