xml boffins
- Started
- Last post
- 8 Responses
- its_only_me
to put it as simple as I can...
In flash I have,
two empty movie clips side by side on the stage. I want to load a seperate image in each one.Im having problems with the actionscript and the xml file which hold the image addresses.
Im doing the usual by finding tutorials and trying to chop them up to fit what I want...then it all turns shite. sorry if my explanation's rank.
cheers if you can help.
- flashbender0
here's a tutorial for a pretty simple XML slide show, maybe this helps.
http://www.kirupa.com/developer/…
- its_only_me0
yeah, I had a look at that one before but I noticed the actionscript was based on nextImage/prevImage rather that placing two different images in two seperate places.
- StratusGD0
still, all you need to the is understand how it's looking through the XML. then grab a URL in an XML file, and use loadMovie to bring in the JPG.
- its_only_me0
yeah, its the first time dealing with xml stuff. I think its the actionscript that a bit over my head more than anything else.
that kirupa tutorial was the original script I was chopping up.
- StratusGD0
Try this:
http://www.actionscript.org/reso…
If you start from the beginning, it walks you through creating XML documents and how to use Flash to process it (not for AS3 though).
- its_only_me0
I had a read at that too.
Ive spent days going through site by site but most the tutorials Ive been finding are based on scrolling image galleries and stuff.I'll have a read at that actionscript.org one again and If I cant get my head around it I'll try another way.
cheers to the both of you for your help.
- flashbender0
you can safely ignore the next/previous... what you want to concentrate on is how the XML is defining and loading the images.
Really all you need to do is define the Image location with something like this:
xmlNode.childNodes[i].childNodes...and then have that loaded in to holder1_mc or holder2_mc using something similar to:
holder1_mc.loadMovie(image[i], 1);That's the parts you need to play with... if this is your first XML project, then like Stratus said, maybe look at how XML and flash play together then try to apply that to loading images.
- its_only_me0
ahh ok cool. I shall give it a try.
thanks