PDA

View Full Version : Scroll Text position RESET??



th3Phallex
October 21st, 2005, 03:38 PM
I know this is a dumb question, but it would've taken me forever to search through all the rest of the posts regarding Scrolling Text boxes.


So I have text scrolling in a dynamic text box. Buttons control it's movement, up and down with (scroll --) and (scroll ++).

Let's say I read to the bottom of this text, and then load a new file into this same box. When I do this, the new text is scrolled to the bottom.

My Question:
How do I reset the scrolled position back to the top for each new file that I load??

nathan99
October 21st, 2005, 06:28 PM
is it an mc,?

GPP
October 21st, 2005, 06:38 PM
What meathod are you using to to laod the new file?

th3Phallex
October 22nd, 2005, 03:48 AM
What meathod are you using to to laod the new file?

i am using:


lyricsMC.loadVariables (mp3Path+mp3LyricsArray[mp3Num]);


which loads a text file from my array into a textbox in the "lyricsMC" movie clip.

nathan99
October 22nd, 2005, 10:47 AM
onClipEvent(load){
startY=_y;
}

then tell the Y to go back to startY

th3Phallex
October 22nd, 2005, 03:24 PM
onClipEvent(load){
startY=_y;
}

then tell the Y to go back to startY


nope, that doesn't make it go back to the top...

the text is still scrolled at the bottom.


here's my code for the MC:


onClipEvent (load){
scrolling = 0;
frameCounter = 1;
speedFactor = 3;
startY=_y;
}

onClipEvent (enterFrame){
if( frameCounter % speedFactor == 0){
if( scrolling == "up"){
lyricstext.scroll--;
}
if( scrolling == "down"){
lyricstext.scroll++;
}
frameCounter = 0;
}
frameCounter++;
}



here's my code for the loadVariables:


lyricsMC.loadVariables (mp3Path+mp3LyricsArray[mp3Num]);
lyricsMC._y = lyricsMC.startY;

th3Phallex
October 23rd, 2005, 04:38 AM
Found out how to reset the scroll position.

it's


textbox.scroll = 1;


SOLVED!