DoHinder
%Europe/Berlin %819 %2005, 20:40
Hola,
Ik heb een (een behoorlijk lange stuk)tekst met een scrollbar gemaakt.
in scene1 heb ik via frame1:
scrollheight = textbox.scrollbar.scrolltrack._height;
in frame 2 heb ik deze script staan:
ms = textbox.Message.maxscroll;
scale = scrollheight/ms;
if (ms>1) {
if (!dragpress) {
textbox.scrollbar.scrollbox._yscale = 300/textbox.Message.maxscroll;
textbox.scrollbar.scrollbox._y = -(scrollheight/2)+((textbox.Message.scroll-1)*scale);
if (!textbox.scrollbar._visible) {
textbox.scrollbar._visible = true;
}
textbox.scrollbar.scrollbox._y = boxypos
} else if (textbox.scrollbar.scrollbox._y<-(scrollheight/2)+1 and move<0) {
move = 0;
textbox.scrollbar.scrollbox._y = -(scrollheight/2);
} else if (textbox.scrollbar.scrollbox._y+textbox.scrollbar. scrollbox._height>(scrollheight/2)-1 and move>0) {
move = 0;
textbox.scrollbar.scrollbox._y = scrollheight/2;
} else {
scrollfix = textbox.Message.scroll = ((textbox.scrollbar.scrollbox._y+(scrollheight/2))/scale)+1;
boxypos = textbox.scrollbar.scrollbox._y = textbox.scrollbar.scrollbox._y+(move*scale);
}
} else {
if (textbox.scrollbar._visible) {
textbox.scrollbar._visible = false;
}
}
en in frame 3
gotoAndPlay(2);
De tekst word via een .txt bestand ingelezen, namelijk:
loadVariables("message.txt", "");
stop();
deze script zit in mijn MC die ik weer in een tekstbox inlaad.....
het probleem nu is dat zodra ik de tekstbox groter maak...de tekst ook groter word......
Misschien zie ik iets over het hoofd..... :o of zie ik het niet goed.....
Hopelijk weet een van jullie het wel.... :D
Ciao Do
Ik heb een (een behoorlijk lange stuk)tekst met een scrollbar gemaakt.
in scene1 heb ik via frame1:
scrollheight = textbox.scrollbar.scrolltrack._height;
in frame 2 heb ik deze script staan:
ms = textbox.Message.maxscroll;
scale = scrollheight/ms;
if (ms>1) {
if (!dragpress) {
textbox.scrollbar.scrollbox._yscale = 300/textbox.Message.maxscroll;
textbox.scrollbar.scrollbox._y = -(scrollheight/2)+((textbox.Message.scroll-1)*scale);
if (!textbox.scrollbar._visible) {
textbox.scrollbar._visible = true;
}
textbox.scrollbar.scrollbox._y = boxypos
} else if (textbox.scrollbar.scrollbox._y<-(scrollheight/2)+1 and move<0) {
move = 0;
textbox.scrollbar.scrollbox._y = -(scrollheight/2);
} else if (textbox.scrollbar.scrollbox._y+textbox.scrollbar. scrollbox._height>(scrollheight/2)-1 and move>0) {
move = 0;
textbox.scrollbar.scrollbox._y = scrollheight/2;
} else {
scrollfix = textbox.Message.scroll = ((textbox.scrollbar.scrollbox._y+(scrollheight/2))/scale)+1;
boxypos = textbox.scrollbar.scrollbox._y = textbox.scrollbar.scrollbox._y+(move*scale);
}
} else {
if (textbox.scrollbar._visible) {
textbox.scrollbar._visible = false;
}
}
en in frame 3
gotoAndPlay(2);
De tekst word via een .txt bestand ingelezen, namelijk:
loadVariables("message.txt", "");
stop();
deze script zit in mijn MC die ik weer in een tekstbox inlaad.....
het probleem nu is dat zodra ik de tekstbox groter maak...de tekst ook groter word......
Misschien zie ik iets over het hoofd..... :o of zie ik het niet goed.....
Hopelijk weet een van jullie het wel.... :D
Ciao Do