mmmh, flash!
- Started
- Last post
- 10 Responses
- stewart
using the Flash MX ScrollbarExtension my swf file with ONE textbox (with external .txt loaded) and ONE scrollbar is 30 Kb!
http://www.kulsdom.com/newstoday…
is there a way to reduce the swf overweight?
or is there an easy way to make a simple scrollbar like this without using the Flash MX ScrollbarExtension?
- Seph0
Got a 4kb one here, check your email, see what you think.
- unfittoprint0
Flash MX ScrollbarExtension sucks... you can make one less that 5kb...
- unknown0
make a 'controller' blank MC and put this in say frame 5:
if (_root.up) {
_root.youtext.scroll += 1;
} else if (_root.down) {
_root.yourtext.scroll -= 1;
}
gotoAndPlay(1);and then this on your down button:
on (rollOver) {
_root.down = true;
}
on (press, release, releaseOutside, rollOut, dragOut) {
_root.down = false;
}and this on your up:
on (rollOver) {
_root.up = true;
}
on (press, release, releaseOutside, rollOut, dragOut) {
_root.up = false;
}
- stewart0
thank you all!
nice one Seph! one thing: is it possible to hide the scrollbar when the input text fits in the textbox?
- Seph0
If you dont know much actionscript then it might be tricky, you will have to fudge some code that sets _visible of MC scrollbar to 0 if the text box exceeds a certain height, but its not very elegant solution.
I would help you if I had the time but Im busy today.
soz, its not that hard, have a go at adapting it.
- unfittoprint0
you could put this (or similar) one a scroll's first frame:
this.onEnterFrame=function(){
if (_parent.textfield.scroll 'less' _parent.textfield.maxscroll){
this._visible=false;
} else{
this._visible=true;
}
}
- stewart0
thanks again.
- stewart0
Seph!
Maybe i asked this before, but what are your [online]resources?!
Or are you writing all these useful scripts yourself...
- Seph0
main resources are
other people on NT
http://www.macromedia.com
http://www.actionscript.org
http://www.flashkit.comnot forgetting, some of my own original work !
its often handy to do a search in PVAN for stuff like this, you can find 100's of threads about scrollbars in Flash with good links to resources
Best
- stewart0
nice!