Solved

Scroll Bar Help?

Posted on 2002-05-09
7
185 Views
Last Modified: 2010-04-03
i am trying to modify

"http://www.jeffbeasley.com/downloads/database_sort.swf"
"http://www.jeffbeasley.com/downloads/database_sort.fla"

it is a database sorting table. how can i make a scroll bar for this table so that if i put lots of entries in i can scroll down if the page is too long for the screen? not the whole flash movie just the table. thanks.
0
Comment
Question by:frosty5656
  • 3
  • 2
7 Comments
 
LVL 6

Expert Comment

by:rootdir
ID: 7000439
simple,

1. Convert your data into HTML table form.

2. Pass this HTML table to dynamic-textbox in flash.

3. Make sure that you have to check the HTML box for dynamic-textbox. Play with some table formating so that it look like seperate cells.

4.Now it is simple to scroll this HTML table in textbox

Use add code from any of these examples to scroll this text

http://www.actionscripts.org/tutorials/intermediate/scrolling_text/index.shtml

http://www.actionscripts.org/tutorials/intermediate/scrolling_a_text_box/index.shtml

for sorting you have to construct this HTML table again.

I think this will help you lot

Cheers
RootDir
0
 

Author Comment

by:frosty5656
ID: 7002540
Thanks for the help.
I am a little unclear in what you’re trying to say. If I used your idea would I have a large text box with the appearance of cells inside it? Or are you saying that I could have small cells but they would be able to scroll?

My original intent was to have the movie display some data by duplicating a cell and then entering in the information for that row, then continuing on until all of the data has been outputted. My problem was that I have to many rows so they will be duplicated of the screen. That’s why I wanted a scroll option. Here is the action script I am using:

// person object constructor
function person (lastname, firstname, ssnumber) {
     this.lastname = lastname;
     this.firstname = firstname;
     this.ssnumber = ssnumber;
}
var database = new Array();
database[0] = new person("Lee", "Bruce", "111-111-1111");
database[1] = new person("Simon", "Joe", "222-222-2222");
database[2] = new person("Doe", "John", "333-333-3333");
trace (database[1].lastname.charAt(0));
// ********************************************************
// * FUNCTION : bubblesort                                *
// *                                                      *
// *                                                      *
// ********************************************************
function bubblesort (input) {
     for (i=0; i<=database.length; i++) {
          trace (database[i][input]);
     }
     for (done="false", n=0; done != "true"; n++) {
          done = "true";
          for (i=0; i<=database.length; i++) {
               if (database[i][input]>database[i+1][input]) {
                    done = "false";
                    temp = database[i];
                    database[i] = database[i+1];
                    database[i+1] = temp;
               }
          }
     }
     duplication();
     for (i=0; i<=database.length; i++) {
          trace (database[i][input]);

     }
}

// ********************************************************
// * FUNCTION : duplication                               *
// *                                                      *
// *                                                      *
// ********************************************************
function duplication () {
     for (i=0; i<database.length; i++) {
          duplicateMovieClip ("_root.data_holder.d0", "d"+i, i);
          data_curr = eval("_root.data_holder.d"+i);
          data_prev = eval("_root.data_holder.d"+(i-1));
          data_curr._y = data_prev._y+13;
          data_curr.last_name = database[i].lastname;
          data_curr.first_name = database[i].firstname;
          data_curr.ss_number = database[i].ssnumber;
     }
}
0
 
LVL 6

Accepted Solution

by:
rootdir earned 101 total points
ID: 7003728
I will post sample file tomorrow

RootDir
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:frosty5656
ID: 7015084
???
0
 

Author Comment

by:frosty5656
ID: 7198598
any time now...
0
 
LVL 9

Expert Comment

by:OBCT
ID: 10319916
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept rootdir's comment as answer.

Please leave any comments here within the next four days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

OBCT
EE Cleanup Volunteer
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
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…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

914 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now