Hi Forum,

I've been scratching my head now for 3 days trying to work this out, as you can probably guess, another newbie question so sorry in advance.

Using Flash 8 & AS2, I have a video gallery that loads from a scrolling menu, all I want is to be able to put a link somewhere - probably on the video title is easiest! so that viewers can click and download the video they are watching - sounds simple ..... not to me!

Question is, where or what do I put in to make a URL load from XML to the Flash?


The code I am using is below:

XML:
<?xml version="1.0" encoding="utf-8"?>
<item>

<list name="Me Driving my car " videotitle="My Car" link="video/154_t3.flv" >
<thumb>thumb/154_t3.jpg</thumb>
</list>
</item>
The Flash code:
stop();
System.useCodepage = true;
var space = 4;
var path = "2005.xml";//xml path
contentMain4.createEmptyMovieClip("back_mc", this.getNextHighestDepth());
contentMain4.setMask(maskedView);
var myxml = new XML();
myxml.ignoreWhite = true;
myxml.onLoad = function(success) {
var item = this.firstChild.childNodes;
trace(this.firstChild.firstChild.attributes.videot itle+linky);
if (success) {

for (var i:Number = 0; i<item.length; i++) {
var temp_mc = contentMain4.attachMovie("item", "item"+i, i);
temp_mc._y += i*(temp_mc._height+space);
contentMain4.back_mc._height = i*(temp_mc._height+space);
temp_mc.tname = item[i].attributes.name;
temp_mc.tlink = item[i].attributes.link;
temp_mc.videotitle = item[i].attributes.videotitle;
temp_mc.thumb = item[i].firstChild.firstChild.nodeValue;
temp_mc.item_txt.text = temp_mc.tname;
temp_mc.item_thumb.loadMovie(temp_mc.thumb);
contentHolder_mc.contentinfo.htmlText = item[0].childNodes[1].firstChild.nodeValue;
temp_mc.onRelease = function() {
vtitle_txt.text = this.videotitle;
playBut.onRelease();
videoDisplay.setMedia(this.tlink,"FLV");

};
}

vtitle_txt.text = this.firstChild.firstChild.attributes.videotitle;
videoDisplay.setMedia(this.firstChild.firstChild.a ttributes.link,"FLV");
scrolling(easing, auto, mouseWheel, mouseCoord, barVisual);

} else {
trace("error");
}
};

myxml.load(path);
function scrolling(easing, auto, mouse) {
//you can modify scroll speed.
var moveSpeed = 1;
//you can modify easing speed.
var easingSpeed = 10;
var scrollHeight = scrollbg4._height;
//you donnot need modify the fellowing code.if you are a AS coder you can do .
var scrollable = contentMain4._height-maskedView._height+2;
var top_scroll = contentMain4._y;
var left = scrollbg4._x-2;
var top = scrollbg4._y;
var right = scrollbg4._x-2;
var bottom = scrollbg4._y+scrollbg4._height-dragger4._height;
if (scrollable<0) {
dragger4._visible = false;
btnup4._alpha = 0;
btndown4._alpha = 0;
scrollbg4._alpha = 0;
btnup4.enabled = false;
btndown4.enabled = false;
return;
}
}
Thanks for looking anyway

Tigger7