View Full Version : Scrolling Dynamically loaded text - Flash MX
goingblank
December 6th, 2004, 06:32 PM
Hi all,
I have a text box which dynamically loads the information from a .txt file. I want to scroll the text, with buttons that I have made(not the component scroll bar that comes with Flash MX), up and down through the text I have. I've tried many different scripts, and none seem to work. Is there a good concise walkthrough for this anywhere? or can someone steer me in the right direction? any help would be much appreciated,
Thank you very much,
gb
lunatic
December 6th, 2004, 06:42 PM
Claudio's scroller works great:
click me (http://www.kirupaforum.com/forums/showthread.php?t=27214&highlight=Claudio+scroller)
Post #8 has the original fla. Lots of other versions as people needed throughout that thread.
:hr:
goingblank
December 6th, 2004, 06:45 PM
thanks! That rocks!
GB
goingblank
December 6th, 2004, 06:55 PM
This scroll bar is great, but can it work with dynamically loaded text? and if so, is there a specific actionScript for the up and down buttons? the reason I have the text dynamically loaded is because I would like the client to update the text using notepad, so I don't have to do it in Flash.
let me know,
thanks,
GB
icio
December 6th, 2004, 07:03 PM
if you're just wanting buttons to scroll up and down, then try this:
note: use movieclips instead of buttons for this.
//scroll up:
on(press) {
this.mouseIsDown = true;
}
on(release) {
this.mouseIsDown = false;
}
onClipEvent(enterFrame) {
if (mouseIsDown) {
_parent.input.scroll--;
}
}
//scroll down
on(press) {
this.mouseIsDown = true;
}
on(release) {
this.mouseIsDown = false;
}
onClipEvent(enterFrame) {
if (mouseIsDown) {
_parent.input.scroll++;
}
}
also, i have a scrollbar component on my website. i wrote another one a few weeks ago. if you put a textbox into it, you can load dynamic content into it and it will work well :).
http://www.cyberathlete.pwp.blueyonder.co.uk/ - under Lab
hope this helps :thumb:
goingblank
December 6th, 2004, 07:09 PM
That worked!
thanks to both of you! you have saved my poor aching head!
GB
icio
December 6th, 2004, 07:13 PM
welcome =)
lunatic
December 6th, 2004, 07:20 PM
nice component cyberathelete :thumb: One suggestion for your lab - could you add flash version info to each item? You only mention mx2004 for scroller 2.0 but not the others (which I assumed were all MX but still it would be nice to know at a glance).
Glad you got it working GB
:hr:
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.