View Full Version : Caption in xml
4gotten
December 17th, 2007, 10:09 PM
hello guys! just wanna ask for you help. do you know how to make caption in XML gallery just look something like this. http://www.fourseasons.com/losangeles/photo_gallery/
thegrrraue
December 17th, 2007, 10:55 PM
Create a dynamic text box. Don't put any text in it, but make sure it's long enough to hold all your text. Give it an instance name. Put the following code onto the frame (not the text box).
loadText = new LoadVars();
loadText.load("filename.txt");
loadText.onLoad = function(success) {
if (success) {
// trace(success);
instancename.html = true;
instancename.htmlText = this.text;
}
};
The italicized content is the stuff you'll have to manipulate. Make a text file that contains the following: "text=insert text here." but without the quotes, obviously.
That will dynamically load your text! To change what it says, simply edit the text file, you won't have to touch the flash. Feel free to make the text whatever size, font, color, etc that you want in flash, it will apply itself!
4gotten
December 18th, 2007, 01:21 AM
confused a bit. but i will try that.
hey, what if i want to create a caption, that follows the image size. like Four Seasons Hotel Los Angeles at Beverly Hills - Photo gallery
(http://www.fourseasons.com/losangeles/photo_gallery/)
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.