View Full Version : can't make scroll bar work
I'm a new flash user having trouble making a scroll bar work. I've searched through the forums but I'm still stuck. What I have so far is a bunch of buttons that load external text files into the same dynamic text box. I did this by assigning a loadvariables action to each button. This part works fine. I then added a scroll bar from the components window by dragging it into the text box. The scroll bar is visible when I test the movie but it doesn't do anything. What am I missing/not understanding?
Thanks for your help
Does the text appear? Post the FLA so we can take a look at it.
the text appears but I can't scroll through it. Here is the file. I'm sure it looks very messy to those of you who know what you're doing but except for the scroll bar it does work.
Thanks again
Jose Antonio
04-27-2005, 06:50 AM
Hi,
I just joined the .org and I was wondering if you ever got an answer to your question? I know it's been several months since you asked but....
I took a look at your problem and saw that your dynamic text box Text was set to white, which would explain why you didn't see the text but I still could not use the scrollBar, it would still not scroll.
Did you ever get this resolved?
Peace
Jose Antonio
silverbitz
07-06-2005, 09:25 PM
bringin back an old topic again...
i have the same problem. i'm loading different texts into the same dynamic textfield, exept that for me it is generated in AS. I've attached a scroll to it through the setScrollContent command and the text shows inside the scroll, only the scroll doesnt work unless i change the height of my textfield inside my AS.. but then it only scrolls to that height and if there is longer text, the text just doesn't show.
i've tried putting my text inside a moviclip, i've tried loading text in a dynamic textbox that i would put on my stage, but just nothing works.
am i stupid or is somehting there im totally missing?
here's a part of my code:
/////textfield that won't scroll:
limit = 1;
g = new LoadVars();
g.load("http://intranet:7331/get.php?table=projects&sort=year%20desc", 1);
g.onLoad = function() {
_root.createEmptyMovieClip ("textHolder", 100);
myTextFormat = new TextFormat();
myTextFormat.font = "MyArial";
myTextFormat.size = 10;
myTextFormat.html = true;
_root.textHolder.createTextField(mytextfield,1,0,0 ,450,150);
_root.textHolder[mytextfield].setNewTextFormat(myTextFormat);
_root.textHolder[mytextfield].setTextFormat(myTextFormat);
_root.textHolder[mytextfield].htmlText = ""
_root.textHolder[mytextfield].border = false;
_root.textHolder[mytextfield].multiline = true;
_root.textHolder[mytextfield].embedFonts = true;
_root.textHolder[mytextfield].wordWrap = true;
scroll2.setScrollContent (_root.textHolder);
}
////my menu that scrolls fine:
l = new LoadVars ();
l.load ("http://intranet:7331/get.php?table=projects&sort=year%20desc");
l.onLoad = function ()
{
_root.createEmptyMovieClip ("mymovie", 500);
for (i = 0; i < this.n; i++)
{
var myMov = _root.mymovie.attachMovie("Btn_Menu", "Btn_Menu" + i, 1000 + i * 10);
_root.mymovie["Btn_Menu" + i]._x = 100;
_root.mymovie["Btn_Menu" + i]._y = 100 + i * 18;
_root.mymovie["Btn_Menu" + i].num = i;
_root.mymovie["Btn_Menu" + i].description = +this["description"+i];
_root.mymovie["Btn_Menu" + i].key = +this["key"+i];
_root.mymovie["Btn_Menu" + i].picsnum = +this["picsnum"+i];
_root.mymovie["Btn_Menu" + i].titre = +this["title"+i]+" ("+this["year"+i]+" / "+this["media"+i]+")";
_root.mymovie["Btn_Menu" + i].menuTxt.text += +this["title"+i]+" ("+this["year"+i]+" / "+this["media"+i]+")";
_root.mymovie["Btn_Menu" + i].onRelease = function ()
{
_root.textHolder[mytextfield].htmlText = ""
_root.textHolder[mytextfield].htmlText = this["description"];
_root.titre[mytextfield2].text = ""
_root.titre[mytextfield2].text = this["titre"];
if (this.picsnum > 0){
_root.ss._alpha = 100;
_root.picHolder.loadMovie("images/"+this.key+"_"+1+".jpg");
}else {
_root.picHolder.loadMovie();
_root.ss._alpha = 0;
}
_global.key = this.key;
_global.picsnum = this.picsnum;
}
}
myscrollpane.setScrollContent (_root.mymovie);
}
:confused:
vBulletin® v3.7.1, Copyright ©2000-2009, Jelsoft Enterprises Ltd.