Solved

Problem Loading XML into Flash

Posted on 2004-10-17
5
188 Views
Last Modified: 2010-04-06
I am using the beautiful Gallery Component developed on www.mr10.net.

I am using this version http://www.mr10.nl/components/gallery/combobox/

You can find the source files here http://www.mr10.nl/components/gallery/.
Make sure to click on the info link and scroll a bit and you will see the link.

My problem:
When I test the original gallery movie it works great and I can see the comments area at the bottom. However when I import the .swf into another flash file it loses the comments text.  The thumbnail description and drop down box is still populated so I know the .xml file is being read but ...no comments.

I admittedly am not well versed in xml or actionscripting so I may be doing something wrong.  Can anyone help!!!
0
Comment
Question by:rachelcjanssen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 26

Expert Comment

by:rdcpro
ID: 12353336
Hi Rachel,

You may have to post the relevant parts of the actionscript--the more the merrier.

Regards,
Mike Sharp
0
 
LVL 8

Expert Comment

by:sigmacon
ID: 12376475
I think you downloaded the wrong file. The file you described is just the flash component of the gallery itself. If you want to download the gallery demo with the combo box, you have to click on the link on the bottom of the demo at http://www.mr10.nl/components/gallery/combobox/ and download the file galleryComboboxDemo.zip.
0
 

Author Comment

by:rachelcjanssen
ID: 12376924
Maarten van de Voorde himself answered my question.

Here it is:
//parse code from xml file
function parse(success){
    if(!success)
        break;

    var root = this.firstChild;
    var n = root.childNodes.length;
   
    var m = this._tl.menu_cb;
   
    for (var i = 0; i < n; i++){
        m.addItem(root.childNodes[i].attributes.title,root.childNodes[i].firstChild);
    }
    m.setChangeHandler('cb_handler', this._tl)

// --::[ 4. attach the gallery ]::-- //
    g1 = this._tl.attachMovie("FGallerySymbol","myGallery",10,{_x:0, _y:0});
    g1.setTnStageSide('left');
    g1.setColumns(3);
    g1.setTnSize(84, 84);
    g1.setSize(616,300);
    g1.setTnTitleStyle('title');   // can be 'name' or 'title'
   
    //-------------------------------------------------//
    // --::[creating a commentfield ]::-- //
   
    var imageText = g1.imageText;
    g1.watch(
        'imageText',
        function(pr_op, o_txt, n_txt){
            this._parent.comment_txt.text = n_txt;
        },
        this
    );
   
    //select first item from combo/listbox
    m.setSelectedIndex(0);
}

The best part...it worked!
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 12624014
PAQed with points refunded (500)

modulo
Community Support Moderator
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
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 …

726 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