Hello everyone thanks for looks at this. first, I want to know what i need do to have the smHolder_mc not show up in the newsItem_lg, so when it move up to display the text that u can’t rollover or see the smHolder_mc. Second what i need to have to go_btn to getUrl to load and to have it load in the same level.
import mx.transitions.Tween;
import mx.transitions.easing.*;
var transitionSpeed:Number = 1.5;
var lgItem_height:Number = 100;
var smItem_height:Number = 18;
var lgNewsEase:Function = Back.easeOut;
var linkItems:Array = new Array();
var curItem:Number = 0;
var maxItems:Number = 0;
var smItems_mc:MovieClip = newsArea_mc.smHolder_mc;
var lgItems_mc:MovieClip = newsArea_mc.lgHolder_mc;
var newsXml:XML = new XML();
newsXml.ignoreWhite = true;
newsXml.onLoad = function(good) {
if (good) {
var myNews:Array = this.firstChild.childNodes;
var len:Number = myNews.length;
for (var i = 0; i<len; i++) {
var ni_l:MovieClip = lgItems_mc.attachMovie("newsItem_lg", "ni_l"+i, lgItems_mc.getNextHighestDepth(), {_y:i*100});
var ni_s:MovieClip = smItems_mc.attachMovie("newsItem_sm", "ni_s"+i, smItems_mc.getNextHighestDepth(), {_y:(lgItems_mc._y)+i*18});
ni_l.id = ni_s.id=i;
maxItems = i;
// fill the text fields
ni_l.title.html = ni_s.title.html=ni_l.text.html=true;
ni_l.title.htmlText = ni_s.title.htmlText=myNews*.childNodes[0].firstChild.nodeValue;
ni_l.text.htmlText = myNews*.childNodes[1].firstChild.nodeValue;
linkItems.push(myNews*.childNodes[2].firstChild.nodeValue);
}
handleSmallItems();
} else {
trace("Couldn't load XML file: menu.xml");
}
};
newsXml.load("vars/news.xml");
newsArea_mc.go_btn.onRollOver = function() {
var tip:MovieClip = this._parent.attachMovie("tip", "t", 9999, {_x:this._parent._xmouse,_y:this._parent._ymouse});
tip.onMouseMove = function(){
this._x = this._parent._xmouse;
this._y = this._parent._ymouse;
updateAfterEvent();
}
}
newsArea_mc.go_btn.onRollOut = newsArea_mc.go_btn.onDragOut = function() {
this._parent.tabChildren.removeMovieClip();
}
newsArea_mc.go_btn.onRelease = function(){
getURL(myNews*, "_self")
}
btnDown.onRelease = function() {
if (curItem+1>maxItems) {
return;
}
curItem++;
handleLargeItems();
handleSmallItems();
};
btnUp.onRelease = function() {
if (curItem-1<0) {
return;
}
curItem--;
handleLargeItems();
handleSmallItems();
};
function handleLargeItems() {
for (i=0; i<=maxItems; i++) {
which = lgItems_mc["ni_l"+i];
new Tween(which, "_y", lgNewsEase, which._y, (which.id-curItem)*lgItem_height, transitionSpeed, true);
}
}
function handleSmallItems() {
for (i=0; i<curItem; i++) {
which = smItems_mc["ni_s"+i];
var topOfNewsArea:Number = (lgItems_mc._y-15)+((which.id-curItem)*smItem_height);
new Tween(which, "_y", lgNewsEase, which._y, topOfNewsArea, transitionSpeed, true);
}
which = smItems_mc["ni_s"+curItem];
new Tween(which, "_y", lgNewsEase, which._y, lgItems_mc._y, transitionSpeed, true);
for (i=curItem+1; i<=maxItems; i++) {
var bottomOfNewsArea:Number = (lgItems_mc._y+lgItem_height-10)+((which.id-curItem)*smItem_height);
which = smItems_mc["ni_s"+i];
new Tween(which, "_y", lgNewsEase, which._y, bottomOfNewsArea, transitionSpeed, true);
}
}
thank you