?
Solved

Scroll Bar Help?

Posted on 2002-05-09
7
Medium Priority
?
193 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
6 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 404 total points
ID: 7003728
I will post sample file tomorrow

RootDir
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

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

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

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

Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
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 use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
Suggested Courses

839 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