Solved

Confused about load vs parseXML

Posted on 2006-06-28
4
152 Views
Last Modified: 2010-04-03
Greetings

I am fooling with a gallery, which I need to draw from dynamically created XML. The gallery, however, has the following hard-coded;

if(_root.xmlFile==undefined){
      _root.xmlFile="gallery.xml"
}
imageXML.load(_root.xmlFile);

My first solution was to change this to;

if(_root.xmlFile==undefined){
      _root.xmlFile=(_root.MYVARS)
}
imageXML.load(_root.xmlFile);

Where MYVARS was specified in the URL string:

<param name="movie" value="new1.swf?MYVARS=gallery.xml">

That way I can have the same flash file access many different galleries. However, what I REALLY need is to load the vars right in the embed/object tags, like so;

<param name="movie" value="new1.swf?MYVARS=<gallery>more xml stuff</gallery>">
or
<param name="movie" value="new1.swf"> <PARAM NAME="FlashVars" VALUE="&?MYVARS=<gallery>more xml stuff</gallery>">

However, I have tried to change the gallery actionscript to the following;

if(_root.xmlFile==undefined){
      _root.xmlFile=(_root.MYVARS)
}
imageXML.parseXML(_root.xmlFile);

And this doesn't work. Am I missing something? Help! I'm under the gun to get this working, after a solid day of messing about.
0
Comment
Question by:seanostephens
[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
  • 2
4 Comments
 
LVL 37

Accepted Solution

by:
CyanBlue earned 500 total points
ID: 17003673
Howdy...

You could try this...

MYVARS="<gallery>more xml stuff</gallery>"
_xml = new XML(MYVARS);
trace(_xml.firstChild.childNodes);

CyanBlue
0
 
LVL 37

Expert Comment

by:CyanBlue
ID: 17058943
Have you try that???  :)

CyanBlue
0
 

Author Comment

by:seanostephens
ID: 17625098
This didn't work (I gave up) - but CyanBlue should get some credit, as his concept was where I had gone...
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

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