View Full Version : Flash to parse info to xml file
Frank
09-04-2006, 04:19 AM
I hope someone can help.
I created a swf file that loads data from an xml file. It works good, the problem is that I would like to enter info into the xml file from flash. I know that I need a server-side script to do this.
Link to flash (http://www3.sympatico.ca/fthoms/flash/triplet/TripleT.htm)
However, this is something that I have done for a friend so it will be on his personal computer only. Since I have no experience with servers I'm not sure what would be the best way to go about this. From what I have read on this site I think php might be best.
What I'm interested to know is what is involved and how much of an impact will this have on my friends personal computer; since I will need to download server software and it will most likely need to run all the time.
Any help or ideas would be appreciated.
_Aerospace_Eng_
09-04-2006, 04:41 AM
What info is going into the xml file?
Frank
09-04-2006, 03:19 PM
The information is pretty basic, images and text describing the image.
The file name for the image is between the tags <img1>, <img2>, etc.
The tags <date>,<name> and <location> describe when and where the building was constructed.
sample
<page regionalname = "Leeds" regionaltype="County">
<job jobname="Canadian Tire" >
<date>March 2003</date>
<name>Canadian Tire</name>
<location>Hwy 25 and the 401</location>
<images>
<img1>gananoque0101</img1>
<img2>gananoque0102</img2>
<img3>gananoque0103</img3>
</images>
</job>
</page>
_Aerospace_Eng_
09-04-2006, 07:32 PM
This tutorial might help. http://www.informit.com/articles/article.asp?p=170506&seqNum=1&rl=1
It uses JSFL (flash javascript) to write files locally. I haven't dwelled into this too much but I tried it a bit the other day. I was only able to run it from withing flash itself not from an swf. Good luck.
Frank
09-04-2006, 10:38 PM
Thanks,
I think that would work great except I am running flash MX and the article is for MX 2004. So it references features that my version doesn't have.
_Aerospace_Eng_
09-04-2006, 10:46 PM
Last time I checked flash mx is flash mx 2004. To find out if you have this feature go to file > new and look for flash javascript in the preset documents, middle part of screen. If its there then the info I gave you will work.
Frank
09-05-2006, 12:09 AM
No sorry they are not.
I don't have options under File > New,
I do have templates under File > New from Template but there are no Flash Javascript presets.
_Aerospace_Eng_
09-05-2006, 12:55 AM
Then I guess you are out of luck because local file creation came with Flash MX 2004 and up. You could download a trial of Flash 8 just for this application or perhaps maybe use a different language.
dragonfly
09-05-2006, 12:33 PM
I think that you might find these opensource tools useful ..laszlosystems (http://www.laszlosystems.com) .. and openlaszlo (http://www.openlaszlo.com).
These are opensource alternatives to Flash MX IDE.
There is built in XML data binding (to local XML datasets .. and backend PHP/MySQL if required).
A bit of a learning curve, though. Read the docs and tutorials.
tribalmaniac
09-07-2006, 03:03 PM
Last time I checked flash mx is flash mx 2004. To find out if you have this feature go to file > new and look for flash javascript in the preset documents, middle part of screen. If its there then the info I gave you will work.
unfortunatel MX is alot different to MX 2004, MX 2004 being the second newest flash program with many more features :)
As for the problem, what you need to do is send the variables back to php and create a script which will then parse to an xml file (both these things have tutorials on google), he will need to run a server on his machine - try www.apache.org :)
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.