i made a scrolling window, but sensitivity is messed up

  • theman
  • Graduate
  • Graduate
  • User avatar
  • Posts: 124

Post 3+ Months Ago

ok so by following tutorials and instructions of lostinbeta i finnaly have a window that scrolls that looks like i want it to. However i cant scroll it completely. Its seems the size of the window does not adjust how far the dragger actually makes it scroll

In other words when i scroll it down it only scrolls a short distance and doesn't actually show all the text i put in the box.

How can i adjust this code so that relationship is as I want it?

Heres all the info you'll need to know:

box im trying to make : http://www.keanemusic.com

window i made: http://www.lastamericanbuffalo.com/portfolio/window.swf

code i used:

Code: [ Select ]
this.onEnterFrame = function() {
  myTextBox.scroll = mySlider.ratio;
};
  1. this.onEnterFrame = function() {
  2.   myTextBox.scroll = mySlider.ratio;
  3. };


and then

Code: [ Select ]
this.ratio=0 ;
dragger.onPress = function() {
  this.startDrag(true, 0, 0, line._width, 0);
  this.onEnterFrame = function() {
   ratio = Math.round(this._x*_parent.myTextBox.maxscroll/line._width);
  };
};
dragger.onRelease=dragger.onreleaseOutside=stopDrag;
  1. this.ratio=0 ;
  2. dragger.onPress = function() {
  3.   this.startDrag(true, 0, 0, line._width, 0);
  4.   this.onEnterFrame = function() {
  5.    ratio = Math.round(this._x*_parent.myTextBox.maxscroll/line._width);
  6.   };
  7. };
  8. dragger.onRelease=dragger.onreleaseOutside=stopDrag;
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

Can you post your .fla?
  • theman
  • Graduate
  • Graduate
  • User avatar
  • Posts: 124

Post 3+ Months Ago

ok here it is! Thanks so much for your time and patience:


http://www.lastamericanbuffalo.com/portfolio/window.fla
  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

Heh, well doesn't that just suck.

MX2004 apparently lost the ability to manually create a dynamic textbox at a fixed height so that the excess text past that height can get be hidden and scrolled.

Why on earth would they do something so retarded?

This means to have any scrolling text, it has to be generated dynamically, or through actionscript.

So you can either change your one set of actions to look like this
Code: [ Select ]
this.onEnterFrame = function() {
  myTextBox.scroll = mySlider.ratio;
};
myTextBox.text = "test test test test test test test test test test test";
  1. this.onEnterFrame = function() {
  2.   myTextBox.scroll = mySlider.ratio;
  3. };
  4. myTextBox.text = "test test test test test test test test test test test";
changing the tests to your text... which will be EXTREMELY annoying. Or you can load it from an external text file by changing the actions to look like this...
Code: [ Select ]
this.onEnterFrame = function() {
    myTextBox.scroll = mySlider.ratio;
};
myText = new LoadVars();
myText.onLoad = function(success) {
    if (success) {
        myTextBox.text = this.myWords;
    } else {
        myTextBox.text = "Failed to Load Data";
    }
};
myText.load("myTextFile.txt");
  1. this.onEnterFrame = function() {
  2.     myTextBox.scroll = mySlider.ratio;
  3. };
  4. myText = new LoadVars();
  5. myText.onLoad = function(success) {
  6.     if (success) {
  7.         myTextBox.text = this.myWords;
  8.     } else {
  9.         myTextBox.text = "Failed to Load Data";
  10.     }
  11. };
  12. myText.load("myTextFile.txt");
and having a textfile in the same directory named myTextFile.txt with this in it
Quote:
myWords=test test test test test test test




[edit]
Oh yeah, and as for your current myTextBox instance... clear all the text out from inside it, and drag the resize handle (lower right corner) to resize the textbox to the size you want it to be.

after all that, everything should work peachy
[/edit]
  • theman
  • Graduate
  • Graduate
  • User avatar
  • Posts: 124

Post 3+ Months Ago

Thanks I'll try it out!

Keep an eye out for more questions if i get stuck though. But hopefully i'll be peachy.

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 13 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.