Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

text scroll is slow need to make it faster

Status
Not open for further replies.

wikfx

IS-IT--Management
Dec 16, 2001
196
MT
Hi all I am currently working on a project the final swf is about 14MB its not for web its for a CD so size doesnt really matter I need to try to not load anything dynamically as the company dont want anyone having access to all the pics and stuff so everything is in the fla, now the problem is that in some parts of the movie I have scrollbars attached to some text but when you pull the scroll bars up or down to view the text they have a little delay they are a little choppy anyone know of anything I can do I might be able to load some stuff dynamically than later compile everyhting to one .exe file and I tried but it still runs a little slow anyone have any ideas? it would be great help.

WiKfx
 
Are these scrollbar components?

Regards,

cubalibre2.gif
 
yes they are scrollbar components

WiKfx
 
Try this...

In the Library, under Flash UI Components, double-click the scrollbar. Select the frame on the actions layer and open up the Actions window. Scroll down to line 270 or abouts, where you should find...
Code:
FScrollBarClass.prototype.startUpScroller = function()
{
	this.controller.upArrow_mc.gotoAndStop(2);
	this.controller.scrollIt("one",-1);
	this.controller.scrolling = setInterval(this.controller, "scrollInterval",500, "one", -1);
}

FScrollBarClass.prototype.startDownScroller = function()
{
	this.controller.downArrow_mc.gotoAndStop(2);
	this.controller.scrollIt("one",1);
	this.controller.scrolling = setInterval(this.controller, "scrollInterval", 500, "one", 1);
}

Modify the -1 and 1 numbers (to 2, 3, 4 or whatever seems to work for you), so you get...

Code:
FScrollBarClass.prototype.startUpScroller = function()
{
	this.controller.upArrow_mc.gotoAndStop(2);
	this.controller.scrollIt("one",-5);
	this.controller.scrolling = setInterval(this.controller, "scrollInterval",500, "one", -5);
}

FScrollBarClass.prototype.startDownScroller = function()
{
	this.controller.downArrow_mc.gotoAndStop(2);
	this.controller.scrollIt("one",5);
	this.controller.scrolling = setInterval(this.controller, "scrollInterval", 500, "one", 5);
}

Regards,

cubalibre2.gif
 
oldnewbie,
Where in the above code would I be able to change the number of lines that were scrolled when you clicked on the down arrow?
I want to be able to scroll 2 lines instead of 1 when the arrow on the scrollbar is clicked.
thanks,
Tech No Know
 
You don't need to change it in the above...

Just make sure your scrollbar has an instance name (I've used "my_scrollbar" and use the following on the first frame of your movie.

_root.my_scrollbar.setSmallScroll(2);

That's it.

3 lines? Set it to 3.

Regards,

cubalibre2.gif
 
oldnewbie,
I tried your example:_root.my_scrollbar.setSmallScroll(3);
I put the action in the 1st frame of my Scroll layer. It still only scrolls 1 line at a time.
What have I done wrong? I have an instance of ScrollBar and in the properties window for the ScrollBar component I have the instance name my_scrollbar.
Thanks,
Tech No Know
 
Is the path right? Are your textfield and scrollbar nested in a movie clip?
Post a link to your test.fla, zipped up and in MX format only, not MX2004, or e-mail it to me. Hit my handle for e-mails.

Regards,

cubalibre2.gif
 
Just in case anyone is following ths link & has the same problem. What I was doing wrong was the script: _root.my_scrollbar.setSmallScroll(2);
needs to be in the first frame that the scrollbar is in. Since my scrollbar didn't come onto the stage untill frame 100 it didn't work to put the code into the first frame of the movie.
Thanks for your help oldnewbie, sorry I forgot to zip up the fla file that I sent you a link to, I'll remember next time.
technoknow
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top