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;
}
}