numediaweb
January 13th, 2009, 07:18 AM
Hello Kirupians!
[Summary]
i was playing around a dynamic AS3 Textfield scolling script, i would like to add 2 buttons, 1 in top of textfield and one down, to use them as mouse-over scrollers (instead of the old fashioned click-to-scroll scrollbar -I hate clickable scrollbars :lol: - ).. then spice everything with som greenish Tweenlite socks!
now, inside my fla ther's the dynamic textfield set to a fixed width/height, it recieves dynamic text (may be too long or short)
i have so far developped this:
// set text to textfield
avaTXT.TEXT_AVATAR.text="get it from xml files";
// set end of scroll
var scrolMax:Number=avaTXT.TEXT_AVATAR.maxScrollV;
// listen to buttons
btn_skroll_up.addEventListener(MouseEvent.ROLL_OVE R,avaUp);
btn_skroll_down.addEventListener(MouseEvent.ROLL_O VER,avaDown);
// go for hunting
function avaUp(e:Event):void {
TweenLite.to(avaTXT.TEXT_AVATAR,1,{y:0,overwrite:0 });
}
function avaDown(e:Event):void {
if (scrolMax<0) {
TweenLite.to(avaTXT.TEXT_AVATAR,1,{y:scrolMax,over write:0});
}
}
// what should i use; scrollV, maxScrollV, bottomScrollV !?
[SYMPTOMS]
I tried the tweenmax example (http://www.byrographics.com/AS3/textScroller/scrollingText.html) but i found that the mouseWheel doesn't work and i don't want to use scrollers and i got to use Tweenlite (too much conditions eh! :D ).
[MORE INFORMATION]
I searched in tweenlite forum and asked ther but until now, ther's no solution.
thanx for any tips!
[Summary]
i was playing around a dynamic AS3 Textfield scolling script, i would like to add 2 buttons, 1 in top of textfield and one down, to use them as mouse-over scrollers (instead of the old fashioned click-to-scroll scrollbar -I hate clickable scrollbars :lol: - ).. then spice everything with som greenish Tweenlite socks!
now, inside my fla ther's the dynamic textfield set to a fixed width/height, it recieves dynamic text (may be too long or short)
i have so far developped this:
// set text to textfield
avaTXT.TEXT_AVATAR.text="get it from xml files";
// set end of scroll
var scrolMax:Number=avaTXT.TEXT_AVATAR.maxScrollV;
// listen to buttons
btn_skroll_up.addEventListener(MouseEvent.ROLL_OVE R,avaUp);
btn_skroll_down.addEventListener(MouseEvent.ROLL_O VER,avaDown);
// go for hunting
function avaUp(e:Event):void {
TweenLite.to(avaTXT.TEXT_AVATAR,1,{y:0,overwrite:0 });
}
function avaDown(e:Event):void {
if (scrolMax<0) {
TweenLite.to(avaTXT.TEXT_AVATAR,1,{y:scrolMax,over write:0});
}
}
// what should i use; scrollV, maxScrollV, bottomScrollV !?
[SYMPTOMS]
I tried the tweenmax example (http://www.byrographics.com/AS3/textScroller/scrollingText.html) but i found that the mouseWheel doesn't work and i don't want to use scrollers and i got to use Tweenlite (too much conditions eh! :D ).
[MORE INFORMATION]
I searched in tweenlite forum and asked ther but until now, ther's no solution.
thanx for any tips!