Solved

Scroll Bar Help?

Posted on 2002-05-09
7
184 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
Comment Utility
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
Comment Utility
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
Comment Utility
I will post sample file tomorrow

RootDir
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

Author Comment

by:frosty5656
Comment Utility
???
0
 

Author Comment

by:frosty5656
Comment Utility
any time now...
0
 
LVL 9

Expert Comment

by:OBCT
Comment Utility
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

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…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
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 how to load their YouTube profile onto Flash Media Live Encoder.

762 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

12 Experts available now in Live!

Get 1:1 Help Now