PDA

View Full Version : help with xml photogallery



flashing
June 27th, 2007, 04:04 AM
Hi!
Thanks guys for all your generous tutorials here.
I have one question in your tutorial in photogallery using xml and flash;

1st question:
can i use it?

2nd question:
I need more than one caption i.e.

Name - which is bold and bigger font
description - smaller and normal font

please tell me how can we do that.

one in flash,

flashing

lambros
June 27th, 2007, 05:11 AM
i have a question too about xml galleries !!! how can i code some components in AS3 so that they retrieve data from xml file to show my images.....let's say i have a loader whyere the images will be shown, and some dynamic text boxes where the title and a description will be added. how do i make them to retrieve the information from an xml file and how do i write that xml ?

jopiruizen
June 27th, 2007, 05:38 AM
1st question:
can i use it?

try using, URLLoader and URLRequest to load the xml files that you want to load then use Loader Class to load the images.

2nd question:

You can create 2 Text Field for Name and for description


sample :



var xmlloader:URLLoader = new URLLoader();
var request:URLRequest = new URLRequest("sampleurl.xml");

/*
extra settings for your URLLoader and URLRequest
*/
//THIS FUNCTION WILL BE CALLED WHENT THE XML WAS COMPLETELY LOADED


function xmlLoaded ( event:Event ) {
/* event.data contains the text that you load just parse it using XMLDocument , XMLList , XMLNode

*/
}

xmlloader.addEventListener("complete", xmlLoaded );
xmlloader.load(request);






visit the following for more info :
http://livedocs.macromedia.com/flex/2/langref/class-summary.html

flashing
June 27th, 2007, 11:28 AM
thanks for your prompt reply. I'm totally new, can you show me also how would my xml should look like.

do you have a tutorial for this type? thanks!

one in flash,

flashing

kkarlowicz
July 5th, 2007, 07:06 PM
I'm building a modified horizontal scrollable thumbnail gallery so that when you click on the thumbnails instead of bringing up a larger image of the thumbnail it directs you to a url which opens in a blank page. I've tried adding ahref tags to the thumbnail image and target="blank" but these do nothing, if someone could please offer some assistance I would appreciate it, thank you. The tutorial I based this off of is as follows:

http://www.kirupa.com/developer/mx2004/thumbnails.htm

-Kevin