Solved

Confused about load vs parseXML

Posted on 2006-06-28
4
148 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
  • 2
4 Comments
 
LVL 37

Accepted Solution

by:
CyanBlue earned 500 total points
Comment Utility
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
Comment Utility
Have you try that???  :)

CyanBlue
0
 

Author Comment

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

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to how to record live broadcast.

744 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