scrollpane adjusting dynamicaly

I am using the scrollpane component to show dynamic content loaded from mysql.
I want the pane to scroll automatic depending on the length of the data it receives.
Anyone knows a good toturial for that or has sample code??

this is a sample of what i'm doing (currently the pane is set to a static size)
http://www.5visions.com/Tina_Demel/flash/panorama.html
Thanks!!
LVL 4
nysurf1Asked:
Who is Participating?
 
negatyveCommented:
>I beleive it has something to do with ScrollPane.refreshPane()

With flash mx 2004 components, the method to adjust the scrollpane scrollbar according to content its not "refreshPane()", but "redraw()" instead:

// once content loading is finished
YourScrollPane.redraw(true);
0
 
BillystyxCommented:
name your scrollpane instance scrollpane

frame1:
x=_root._xmouse;
frame2:

_root.onMouseMove = function() {
      if (x<_root._xmouse) {
            dir = 1;
            x = _root._xmouse;
      } else if (x>_root._xmouse) {
            dir = 0;
            x = _root._xmouse;
      }
};
if (dir == 1) {
      scrollpane.content._x += 10;
}
if (dir == 0) {
      scrollpane.content._x -= 10;
}
frame3:
gotoAndPlay(2);

Billystyx
0
 
BillystyxCommented:
you can govern how far it scrolls in this piece of code:

if (dir == 1 && scrollpane.content._x<scrollpane.content._width) {
      scrollpane.content._x += 10;
}
if (dir == 0 && scrollpane.content._x>0) {
      scrollpane.content._x -= 10;
}

billystyx
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
nysurf1Author Commented:
I don't know if  I explained my problem well enough, my pane is loading dinamicaly from mysql and I need it to adjust itself after the images are dinamicaly loaded, in my case I use the same object for displaying jewlary and bags, I have 60 pieces of jewlary loading from the database so in that case i need the pane to scroll but then when i use it to display the bags I have only 20 bags so I don't need it to scroll.
I beleive it has something to do with ScrollPane.refreshPane() i just dont seem to use it correctly.

Thanks !!@!!

0
 
BillystyxCommented:
can you post your fla?
When you say the pane is loading dynamically, I am assuming you mean the content of the pane is loading dynmically, as in images and text coming from the db. Are the images coming in blob form from the db, or are just the paths to the images sent across from the db and the images loaded from a folder?
Billystyx
0
 
nysurf1Author Commented:
been kindof busy to try these solutions , I'll do it soon and get back 2u  ,, thanks for the help!!!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.