[ic] flash xml
Lawrence Tartol
lawrence at davidweatherford.com
Mon Sep 13 14:22:00 EDT 2004
Jon wrote:
> > Would anyone like to give a pointer to a working example of a flash site
> > parsing xml. Sounds intriguing especially now that apparently google
can
Here's mine
http://antiquecat.davidweatherford.com/cgi-bin/antiquecat/services2.html
I don't have it all worked out yet. I need to work on a pre loader.
Here's the jist my xml doc:
<gallery>
<image title="Dining Room"
main="https://antiquecat.davidweatherford.com/antiquecat/images/greens/image
s/dining_room.jpg"
thmb="https://antiquecat.davidweatherford.com/antiquecat/images/greens/thumb
nails/dining_room.jpg"/>
<image title="Bedroom"
main="https://antiquecat.davidweatherford.com/antiquecat/images/greens/image
s/bedroom.jpg"
thmb="https://antiquecat.davidweatherford.com/antiquecat/images/greens/thumb
nails/bedroom.jpg"/>
</gallery>
Here's part of the flash script:
myPhoto = new XML();
myPhoto.ignoreWhite = true;
myPhoto.onLoad = function(success) {
//portfolioTag = this.firstChild;
numimages = this.firstChild.childNodes.length;
spacing = 110;
for (i=0; i<numimages; i++) {
picHolder = this.firstChild.childNodes[i];
thumbHolder = thumbnails.createEmptyMovieClip("thumbnail"+i, i);
thumbHolder._x = i*spacing;
thumbLoader = thumbholder.createEmptyMovieClip("thumbnail_image", 0);
thumbLoader.loadMovie(picHolder.attributes.thmb);
thumbHolder.title = picHolder.attributes.title;
thumbHolder.main = picHolder.attributes.main;
thumbHolder.onRelease = function() {
loader.loadMovie(this.main);
title_txt.text = this.title;
};
}
};
myPhoto.load("http://antiquecat.davidweatherford.com/antiquecat/images/green
s/xmlphoto.xml");
More information about the interchange-users
mailing list