Solved

Scroll Bar Help?

Posted on 2002-05-09
7
188 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
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!

 

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

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…
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
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…

726 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