-
xml based image gallery
Hello Guru's,
I'm needing some help with getting a hyperlink working from flash that has a XML text load. I tried the standard A Href in the xml, with my flash text field set to render as HTML... to no avail.
The xml looks like this:
<?xml version="2.0" encoding="ISO-8859-1" standalone="no"?>
<images>
<pic>
<image>images/imagename.jpg</image>
<caption>image title</caption>
</pic>
</images>
I tried this:
<?xml version="2.0" encoding="ISO-8859-1" standalone="no"?>
<images>
<pic>
<image>images/imagename.jpg</image>
<caption><a href="website";>image title</a></caption>
</pic>
</images>
And it caused the xml beyond that point to be not accessible.
Any thoughts would be greatly appreciated!
b.
-
Post your .fla so whoever helps can see where you are pushing the captions TOO in your movie since it will affect how they code it.
-
<a href="website";>
remove the semicolon ... its likely that will cause such a problem... if not upload your fla as Chris suggested.. so we can get a better idea
-
1 Attachment(s)
here are the source files... Let me know what you think!
Thanks again!
b.
-
Ok...as delivered I changed three things:
1. set the textfield to be html enabled (the one in the zip wasn't)
2. Changed the functions (next,prev) to the correct syntax to populate an html enabled field instead of a standard textfield:
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[p], 1);
//desc_txt.text = description[p];//old way
desc_txt.htmlText = description[p];
picture_num();
}
}
}
function prevImage() {
if (p>0) {
p--;
picture._alpha = 0;
picture.loadMovie(image[p], 1);
//desc_txt.text = description[p];//old way
desc_txt.htmlText = description[p];
picture_num();
}
}
3. Wrapped the node you are using for html formatted text in a CDATA tag:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<images>
<pic>
<image>images/image-1.jpg</image>
<caption>Image Title 1</caption>
</pic>
<pic>
<image>images/image-2.jpg</image>
<caption>Image Title 2</caption>
</pic>
<pic>
<image>images/image-3.jpg</image>
<caption><![CDATA[ <a href="www.flashkit.com">Image Title 3</a>]]></caption>
</pic>
</images>
:thumbsup: :thumbsup:
-
that seems to make sense... even to a novice like me. I'll plug this in and let you know!
Thanks for all your help!
b.
-
okay... I loaded the changes you suggested and it's working. Thanks for the assist!
ps: What do you know about the ComboBox component? after the user chooses a selection from the dropdown, a "ghost" highlight remains behind...
-
Artifact? Throw up an example...lets see that :)
-
1 Attachment(s)
I removed all the graphics to lighten the file size...
I'm calling the videoBox.swf into the main swf file. That's where the green highlight lingers.... the stand alone videoBox.swf doesn't show it.
I would show you the live site, but it's a personal site and I don't really want to broadcast my family pics and video. I'll send it to you privately though so you can see what the deal is.
b.
-
Target blank url
Hello there,
I am trying to get the url to open in a new window using the code above, but have been unsuccessful. I figured I'd put the target="_blank" code within the a href, but still no luck. Can someone please help? The code is below:
<pic>
<image>images/5.jpg</image>
<caption><![CDATA[Text here <ahref="http://www.johnstonanddaniel.com/listings/details.aspx?ListingId=2000570" target="_blank">More Details ></a>]]></caption>
<link>http://www.yahoo.com</link>
</pic>
Thanks in advance...