[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Confused about load vs parseXML

Posted on 2006-06-28
4
Medium Priority
?
158 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
3 Comments
 
LVL 37

Accepted Solution

by:
CyanBlue earned 2000 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
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 set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
Suggested Courses

872 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