Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > Simple Stuff (Newbies)

Reply
 
Thread Tools Rate Thread Display Modes
Old 03-04-2002, 04:22 PM   #1
octothorp
Registered User
 
Join Date: Mar 2002
Posts: 5
Default dynamically creating columns of text

So I've got a site where I'm loading information from XML. Sometimes the screen layout will have two or more columns of text. I'm trying to build an actionscript component that will flow the text into multiple columns.

The best approach I can think of is to load the same text into all columns, and then use the "scroll" property to make it appear that the text is flowing from one column to the next: here's my best attempt:

columns = 2;
lines = 9;
for (b=0; b<columns; b++) {
eval("column"+b) = content;
eval("column"+b+".scroll") += lines*b;
}

The text variables are named column0, column1 etc.
I can't figure out any way to dynamically calculate the number of lines in a column (which I need to determine the location of the text breaks). If anyone can think of a way I can do that dynamically, I'd love to know.

However, the big problem is that the last line
--eval("column"+b+".scroll") += lines*b --
doesn't work here. It'll work if I put it in a seperate button and treat it as an on-click action, but I need it to occur when I load the frame. Can anyone help me?

Or, if anyone knows of a better way to create columns, I'm open to suggestions!

#
octothorp is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
dynamically create dynamic text fields and variables [raz] ActionScript 1.0 (and below) 8 12-14-2003 07:46 PM
Help with HTML in dynamic text field... puckett_jw ActionScript 1.0 (and below) 8 08-04-2003 12:58 AM
text in MC how to really undefine onPress... jcgodart ActionScript 1.0 (and below) 5 06-20-2003 08:20 AM
If anyone's bored, a custom class . . . retrotron ActionScript 1.0 (and below) 22 05-24-2003 10:01 PM
Creating function to dynamically change text. ragnarkarlsson ActionScript 1.0 (and below) 5 03-27-2003 10:08 AM


All times are GMT. The time now is 04:23 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.