Problems with tracker when scrolling dynamic text field. Please help!

Hi all,

Thank you for reading my post…

I’m having some problems with scrolling a dynamic text field.

When I use _root in my code (see below), everything works fine but I have to use _parent as the swf that the scroll stuff is in is to be loaded dynamically from my main move.

When I use _parent, the buttons work ok but the scroll tracker moves to a random location on the stage and stays there and won’t move - and also it won’t scroll the text like it should.

Below is the code I’m using in the main timeline:

myLV = new LoadVars();
myLV.load("profile.txt");
myLV.onLoad = function() {
myText.htmlText = this.myText;
_parent.top = sliderMC._y;
_parent.bottom = sliderMC._y+trackMC._height-sliderMC._height;
};
upBtn.onPress = function() {
scrollI = setInterval(scrollBtnF, 80, -1);
};
upBtn.onRelease = upBtn.onReleaseOutside=downBtn.onRelease=downBtn.onReleaseOutside=function 

() {
clearInterval(scrollI);
};
downBtn.onPress = function() {
scrollI = setInterval(scrollBtnF, 80, 1);
};
sliderMC.onPress = function() {
this.startDrag(0, this._x, top, this._x, bottom);
scrollI = setInterval(scrollF, 80);
};
sliderMC.onRelease = sliderMC.onReleaseOutside=function () {
this.stopDrag();
clearInterval(sliderI);
};
function scrollF() {
var a = (myText.maxscroll-1)/(bottom-top);
myText.scroll = Math.round((sliderMC._y-top)*a+1);
}
function setSlider() {
var a = (bottom-top)/(myText.maxscroll-1);
sliderMC._y = a*(myText.scroll-1)+top;
}
function scrollBtnF(dir) {
myText.scroll += dir;
setSlider();
}

I’ve uploaded my .fla to www.spindriftmedia.com/scroll2.zip and would be most grateful if someone could have a look at my file to see if they can see the problem please.

Thank you very much and I hope to hear from you.

All the best,

Mark