Skip to main content
July 24, 2007
Question

XML and AS2.0

  • July 24, 2007
  • 21 replies
  • 1270 views
OK I have been going down one road for this and have taken a few wrong turns.

A few things about what we are looking at:
I am using Flash CS3 but I am using Action Script 1.0/2.0 for compatability purposes.

What I have been able to do so far is create random instances of a movie clip to appear over a set amount of time but I need to go a bit further. The web application needs to be updated regularly and the best way I can think of doing that is with keeping all the variables in an XML. The problem is I am not sure how to format the XML properly to get Flash to read it and load the variables.

I am creating an online version of a vision screening tool we use. The test is graphically simple just a collection of a few primitives on a dark background. There are basically two objects a fixation point and a stimulus. What I need to be able to do is this.

Display either movieclip at (x,y) for (z)ms where x,y,& z are all variables loaded from an xml. I have asked questions along this line before but this is a different scope in case anyone wants to claim I double posted, this is quite different than they way I was doing it before.

Any help with the XML or even any actionscript suggestions would be greatly appreciated.

Thanks
This topic has been closed for replies.

21 replies

kglad
Community Expert
Community Expert
July 24, 2007
you only need to 3 variable/value pairs to load into flash? if so, the following is all your need. just remember to convert each variable's value to a number for use in flash.

July 24, 2007
What if I had several variables for each such as I had 4 different movieclips, each had to display for only 200ms, and there were 10 possible x and 10 possible y coordinates for each would I format it like this?

Then in my actionscript just have it load the next variable from the list? I think this is where I am stuck.