Data display problem within flash

  • 13 years ago
    I have got a form within my Flash movie that contains a drop down box that lists options from a MySQL database. Once one of these options is selcted I want to display some data within a label, loader and text area (that also comes from the database). I have managed to get the movie to read the data from the database to create the array of options on the combo box but once an option is selected the data appears in the labels etc as 'undefined'.

    The way I am passing the data to Flash is by using php files to create an XML array which links to XML connectors in the movie. I am also using a data set that stores all the data to be displayed within the labels etc.

    I really am at a loss with this at the moment and would apprieciate some help.

    Below is the ActionScript that I am using in the movie.







    problem_xml.trigger();
    comboFunction = new Object();
    comboFunction.change = function(evt) {
       var nr:Number = evt.selectedIndex
       var st:String = evt.target.selectedItem
       _root.description_mc.products_xml.direction = "receive";
       _root.description_mc.products_xml.URL = "scripts/products.php?problem="+evt.target.selectedItem.label;
       _root.description_mc.products_xml.trigger();
       _root.description_mc.name_txt.text = _root.description_mc.problem_ds.itemsStorm [st].Name;
       _root.description_mc.details_txt.text = _root.description_mc.problem_ds.itemsStorm [st].Details;
       _root.description_mc.picture_img.load("images/"+_root.description_mc.problem_ds.itemsStorm [st].Image);
       this.updateData(0);
    };
    problem_cb.addEventListener("change", comboFunction);
    stop();















    Many thanks

    PS
    I am basically trying to recreate something similar to


    this but minus the datagrid section.

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“PHP is a minor evil perpetrated and created by incompetent amateurs, whereas Perl is a great and insidious evil perpetrated by skilled but perverted professionals.” - Jon Ribbens