Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

scrollpane adjusting dynamicaly

Posted on 2005-04-21
6
Medium Priority
?
333 Views
Last Modified: 2012-06-27
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!!
0
Comment
Question by:nysurf1
  • 3
  • 2
6 Comments
 
LVL 18

Expert Comment

by:Billystyx
ID: 13838534
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
 
LVL 18

Expert Comment

by:Billystyx
ID: 13838581
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
 
LVL 4

Author Comment

by:nysurf1
ID: 13845866
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 18

Expert Comment

by:Billystyx
ID: 13847261
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
 
LVL 27

Accepted Solution

by:
negatyve earned 1000 total points
ID: 13847263
>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
 
LVL 4

Author Comment

by:nysurf1
ID: 13961774
been kindof busy to try these solutions , I'll do it soon and get back 2u  ,, thanks for the help!!!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question