dynamic xml from php

Posted on 2009-12-24
Last Modified: 2012-05-08
Hello EE

i have a problem.
I use slideshowpro component for flash and have create a dinamyc gallery.
i use a file php to generate a xml file , and its work fine.

My problem is that my file php works only if i pass it a variable:

now slideshow work with a xml file into file fla.
How i can link xml file external fla file?

Question by:denny3d
    LVL 11

    Expert Comment

    Can you not use a URL with parameters in flash?
    LVL 107

    Expert Comment

    by:Ray Paseur
    Any chance you could post a link to the pages and the code you're using?  It is hard to guess what is wrong without that.

    Author Comment

    ok, but now i dont use a code for flash file
    i use only a file php like this:
    require_once "./settings/config.php";

    $large_folder = 'large';
    $medium_folder = 'medium';
    $thumb_folder = 'thumb';

          // Set up paths
          define('DS', DIRECTORY_SEPARATOR);
          $dir = dirname(__FILE__);
          $server = 'http://' . $_SERVER['HTTP_HOST'];
          $rel_path = "admin/foto/";
          $path = $server . $rel_path;
          $iptc = is_callable('iptcparse');

          // Start writing XML
          $o = '<?xml version="1.0" encoding="utf-8"?>' . "\n<gallery>\n";

                      // Album tag
                      //$o .= "\t" . '<album title="' . $title . '" description="" lgPath="' . $rel_path . $medium_folder . '>' . "\n";
                      $o .= "\t" . '<album lgpath="' . $rel_path . $medium_folder . DS . '" tnpath="' . $rel_path . $thumb_folder . DS . '">' . "\n";
                      // SELECT FOTO DA ID VEICOLO
                      $sel_foto = "SELECT * FROM tbl_foto WHERE id_veicolo = '{$_GET['id']}'";
                      $ris_foto = @mysql_query($sel_foto);
                      //$r_foto = @mysql_fetch_object($ris_foto);
                      while($r_foto = @mysql_fetch_object($ris_foto)){
                            $o .= "\t\t" . '<img src="' . $r_foto->foto . '" caption="' . $caption . '" link="' . $link . '" />' . "\n";
                      // Close the album tag
                      $o .= "\t</album>\n";

          // Close gallery tag, set header and output XML
          $o .= "</gallery>";
          header('Content-type: text/xml');

    but the problem is in file fla or in file that load a swf file

    Accepted Solution

    i attach html file and the code that i have insert into file fla:

    var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;
    for (var param in paramObj) {
       if (param == "xmlfile") {
          my_ssp.xmlFilePath = paramObj[param];
       if (param == "xmlfiletype") {
          my_ssp.xmlFileType = paramObj[param];

    Featured Post

    Easy Project Management (No User Manual Required)

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
    Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
    Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now