Tilted Forum Project Discussion Community  

Go Back   Tilted Forum Project Discussion Community > Interests > Tilted Technology


 
 
LinkBack Thread Tools
Old 10-04-2004, 04:11 AM   #1 (permalink)
Femme Fatale
 
Nancy's Avatar
 
Location: Elysium
Need tabulators in Flash MX text box

hey all.

I'm currently working on a website in Flash MX and it containts numbers in the text that needs to be aligned perfectly by using tabulators. The problem is that Flash itself does not have that feature so I have to link the text box to an external text file such as txt. But notepad doesn't have the tabulator feature either so what the heck do I do?! Help! *sniff*

__________________
I have all the characteristics of a human being: blood, flesh, skin, hair; but not a single, clear, identifiable emotion, except for greed and disgust. Something horrible is happening inside of me and I don't know why. My nightly bloodlust has overflown into my days. I feel lethal, on the verge of frenzy.
I think my mask of sanity is about to slip.
Nancy is offline  
Old 10-05-2004, 04:05 AM   #2 (permalink)
Crazy
 
Location: Belgium
Hey Nancy,

There are a few (possible) work-arounds for this:
1. you can make textboxes on top of each other. Most people put all there text in just one textbox, but sometimes it is handier (or more beautifull) to make a textbox per paragraph or so. If you want to have the textbox-look you can make a big one without any text for the looks and the paragraph-textboxes (transparant) on top of it.
2. Dynamic and input textboxes (not static) can preserve rich text formating (aka some basic HTML tags). The folowing tags are supported:
<A>, <B>, <FONT COLOR>, <FONT FACE>, <FONT SIZE>, <I>, <P>, and <U>.
and the following attributes are supported:
LEFTMARGIN, RIGHTMARGIN, ALIGN, INDENT, and LEADING.
alltough no tab, the LeftMargin and/or Indent attributes will do the trick.

To enable HTML, be sure to use dynamic text, Select the Render Text as HTML button in the Property inspector (Button looks like this: [<>] )
and use the HTML-tags in your dynamicly loaded .txt file.

Hope this is of any help...
__________________
Amerika by Franz Kafka
“As Karl Rossman, a poor boy of sixteen who had been packed off to America by his parents because a servant girl had seduced him and got herself a child by him, stood on the liner slowly entering the harbour of New York, a sudden burst of sunshine seemed to illumine the Statue of Liberty, so that he saw it in a new light, although he had sighted it long before. The arm with the sword rose up as if newly stretched aloft, and round the figure blew the free winds of heaven.”
T.U.B. is offline  
Old 10-05-2004, 04:38 AM   #3 (permalink)
Femme Fatale
 
Nancy's Avatar
 
Location: Elysium
Quote:
Originally Posted by T.U.B.
Hey Nancy,

There are a few (possible) work-arounds for this:
1. you can make textboxes on top of each other. Most people put all there text in just one textbox, but sometimes it is handier (or more beautifull) to make a textbox per paragraph or so. If you want to have the textbox-look you can make a big one without any text for the looks and the paragraph-textboxes (transparant) on top of it.
How will the result be when it's meant for a scrollable text box?
__________________
I have all the characteristics of a human being: blood, flesh, skin, hair; but not a single, clear, identifiable emotion, except for greed and disgust. Something horrible is happening inside of me and I don't know why. My nightly bloodlust has overflown into my days. I feel lethal, on the verge of frenzy.
I think my mask of sanity is about to slip.
Nancy is offline  
Old 10-05-2004, 06:03 AM   #4 (permalink)
Crazy
 
Location: Belgium
Quote:
Originally Posted by Nancy
How will the result be when it's meant for a scrollable text box?
Argh... didn't think of it to be scrollable...
Well, again there is a workaround... but not quite a simple one...
(First rule of programming/scripting/designing: there is always a solution)

I do not know if I make sense if I explain it here, it involves quite a bit of Actionscript and making objects.
I do not know how familiar you are with Flash & Actionscript, if you are, let's go for it. (If you aren't it could be nice first steps, if you have the time)

just to be sure, is it something like this you're making? (but then in flash and scrollable)

Quote:
this is a bunch of text. this is a bunch of text. this is a bunch of text. this is a bunch of text. this is a bunch of text. this is a bunch of text. this is a bunch of text. this is a bunch of text. this is a bunch of text. this is a bunch of text. this is a bunch of text. this is a bunch of text. this is a bunch of text. this is a bunch of text. this is a bunch of text. this is a bunch of text. this is a bunch of text. this is a bunch of text. this is a bunch of text. this is a bunch of text.
Here comes the numbers!!
506
24549
3
64
this is a bunch of text. this is a bunch of text. this is a bunch of text. this is a bunch of text. this is a bunch of text. this is a bunch of text. this is a bunch of text. this is a bunch of text. this is a bunch of text. this is a bunch of text. this is a bunch of text. this is a bunch of text. this is a bunch of text. this is a bunch of text.
__________________
Amerika by Franz Kafka
“As Karl Rossman, a poor boy of sixteen who had been packed off to America by his parents because a servant girl had seduced him and got herself a child by him, stood on the liner slowly entering the harbour of New York, a sudden burst of sunshine seemed to illumine the Statue of Liberty, so that he saw it in a new light, although he had sighted it long before. The arm with the sword rose up as if newly stretched aloft, and round the figure blew the free winds of heaven.”
T.U.B. is offline  
Old 10-05-2004, 10:24 AM   #5 (permalink)
Femme Fatale
 
Nancy's Avatar
 
Location: Elysium
Quote:
Originally Posted by T.U.B.
just to be sure, is it something like this you're making? (but then in flash and scrollable)
yes.. sort of. I need this:

http://www.the-numbers.com/index.php as shown below the Daily Chart - Sunday, October 3 part. Perfectly aligned numbers!
__________________
I have all the characteristics of a human being: blood, flesh, skin, hair; but not a single, clear, identifiable emotion, except for greed and disgust. Something horrible is happening inside of me and I don't know why. My nightly bloodlust has overflown into my days. I feel lethal, on the verge of frenzy.
I think my mask of sanity is about to slip.
Nancy is offline  
Old 10-06-2004, 03:04 PM   #6 (permalink)
Crazy
 
Location: Belgium
I made this:
Quote:
Originally Posted by T.U.B.
1. you can make textboxes on top of each other. Most people put all there text in just one textbox, but sometimes it is handier (or more beautifull) to make a textbox per paragraph or so. If you want to have the textbox-look you can make a big one without any text for the looks and the paragraph-textboxes (transparant) on top of it.
and the scrollbars work together.

I made an example for you here:
http://users.skynet.be/fa878553/ForNancy/index.html
the .swf file is here:
http://users.skynet.be/fa878553/ForNancy/Nancy.swf
and I uploaded the .fla source-file for ya:
http://users.skynet.be/fa878553/ForNancy/Nancy.fla

Downside of this is:
The text is static. i.e.: a lot of work when you have to update the numbers.
as usual, there is a solution for this, but I didn't had the time to make it (yet).

The above example works by not using a textbox with scrollbar, but a scrollplane (you can find it in the Flash UI window) instead. Inside this scrollplane I loaded a movieclip (called TextfieldsAllTogether in the example) and in that movieclip I dropped a bunch of textfields that are displaying the text. (push F11 in Flash MX to display the library, and double-click on the movieclip "TextfieldsAllTogether" to view them).

I hope this is a bit helpfull...
__________________
Amerika by Franz Kafka
“As Karl Rossman, a poor boy of sixteen who had been packed off to America by his parents because a servant girl had seduced him and got herself a child by him, stood on the liner slowly entering the harbour of New York, a sudden burst of sunshine seemed to illumine the Statue of Liberty, so that he saw it in a new light, although he had sighted it long before. The arm with the sword rose up as if newly stretched aloft, and round the figure blew the free winds of heaven.”

Last edited by T.U.B.; 10-06-2004 at 03:06 PM..
T.U.B. is offline  
Old 10-06-2004, 10:27 PM   #7 (permalink)
Femme Fatale
 
Nancy's Avatar
 
Location: Elysium
Quote:
Originally Posted by T.U.B.
I made this:

and the scrollbars work together.

I made an example for you here:
http://users.skynet.be/fa878553/ForNancy/index.html
the .swf file is here:
http://users.skynet.be/fa878553/ForNancy/Nancy.swf
and I uploaded the .fla source-file for ya:
http://users.skynet.be/fa878553/ForNancy/Nancy.fla

Downside of this is:
The text is static. i.e.: a lot of work when you have to update the numbers.
as usual, there is a solution for this, but I didn't had the time to make it (yet).

The above example works by not using a textbox with scrollbar, but a scrollplane (you can find it in the Flash UI window) instead. Inside this scrollplane I loaded a movieclip (called TextfieldsAllTogether in the example) and in that movieclip I dropped a bunch of textfields that are displaying the text. (push F11 in Flash MX to display the library, and double-click on the movieclip "TextfieldsAllTogether" to view them).

I hope this is a bit helpfull...
that's exactly how I want it to look like! Thanks so much T.U.B.! *stoked*

I've never used a scrollplane before but I guess this is as good a time as any to give it a try. I hope it'll work!
__________________
I have all the characteristics of a human being: blood, flesh, skin, hair; but not a single, clear, identifiable emotion, except for greed and disgust. Something horrible is happening inside of me and I don't know why. My nightly bloodlust has overflown into my days. I feel lethal, on the verge of frenzy.
I think my mask of sanity is about to slip.
Nancy is offline  
Old 10-07-2004, 02:56 AM   #8 (permalink)
Femme Fatale
 
Nancy's Avatar
 
Location: Elysium
of course it doesn't work *sigh*

I've tried making a new movieclip then naming it cv and then changing the scroll content to "cv" but it doesn't work. I've tried to make a completely new movieclip and scrollpanel but I still can't make it work.
__________________
I have all the characteristics of a human being: blood, flesh, skin, hair; but not a single, clear, identifiable emotion, except for greed and disgust. Something horrible is happening inside of me and I don't know why. My nightly bloodlust has overflown into my days. I feel lethal, on the verge of frenzy.
I think my mask of sanity is about to slip.
Nancy is offline  
Old 10-07-2004, 03:45 AM   #9 (permalink)
Crazy
 
Location: Belgium
Quote:
Originally Posted by Nancy
of course it doesn't work *sigh*

I've tried making a new movieclip then naming it cv and then changing the scroll content to "cv" but it doesn't work. I've tried to make a completely new movieclip and scrollpanel but I still can't make it work.
no problem, I didn't explain that clearly...
The new movieclip you created has to be exported for using with actionscript.
To do that, go to the library and find your movieclip, right click on it, click on properties and then in the 'Linkage' part click "Export for Actionscript" and "Export in first frame" on. As Identifier name I usually take exact the same as the movieclip's name.

Flash is indeed a bit tricky on the naming part. If you want to adress something on Stage, it has to have an "Instance Name", alltough it has a movieclip name. The reason behind this is that you can have multiple copy's (instances) of the same movieclip on stage, all those instances do need a unique name, because their movieclip name is the same.
In the library, things are adressed by their "Identifier" name for the same reason.

Hope it works now...
I learned also a lot with your question. It was quite chalanging to find a solution for this.
If you have anymore questions, keep them coming
__________________
Amerika by Franz Kafka
“As Karl Rossman, a poor boy of sixteen who had been packed off to America by his parents because a servant girl had seduced him and got herself a child by him, stood on the liner slowly entering the harbour of New York, a sudden burst of sunshine seemed to illumine the Statue of Liberty, so that he saw it in a new light, although he had sighted it long before. The arm with the sword rose up as if newly stretched aloft, and round the figure blew the free winds of heaven.”
T.U.B. is offline  
Old 10-07-2004, 04:54 AM   #10 (permalink)
Femme Fatale
 
Nancy's Avatar
 
Location: Elysium
Ooooooooooooo! Well that's a whole other matter! I'll get right on it and see if I can get it work..

thank you for all your help T.U.B! I actually do have another question that's been bugging me for some time now. When ever I make a text box and throw in some text I can't resize it withought the text getting thinner/fatter as well. It's really annoying because so far I'd been forced to CTRL + C all the text, then resize the box and finally throw the text back in. It's sooo annoying
__________________
I have all the characteristics of a human being: blood, flesh, skin, hair; but not a single, clear, identifiable emotion, except for greed and disgust. Something horrible is happening inside of me and I don't know why. My nightly bloodlust has overflown into my days. I feel lethal, on the verge of frenzy.
I think my mask of sanity is about to slip.
Nancy is offline  
Old 10-07-2004, 11:44 AM   #11 (permalink)
Crazy
 
Location: Belgium
Don't know a solution for that either... That is bothering me also...
__________________
Amerika by Franz Kafka
“As Karl Rossman, a poor boy of sixteen who had been packed off to America by his parents because a servant girl had seduced him and got herself a child by him, stood on the liner slowly entering the harbour of New York, a sudden burst of sunshine seemed to illumine the Statue of Liberty, so that he saw it in a new light, although he had sighted it long before. The arm with the sword rose up as if newly stretched aloft, and round the figure blew the free winds of heaven.”
T.U.B. is offline  
Old 10-07-2004, 11:24 PM   #12 (permalink)
Femme Fatale
 
Nancy's Avatar
 
Location: Elysium
Quote:
Originally Posted by T.U.B.
Don't know a solution for that either... That is bothering me also...
what?! there's actually something about Flash you don't know?! I'm ..shocked!
__________________
I have all the characteristics of a human being: blood, flesh, skin, hair; but not a single, clear, identifiable emotion, except for greed and disgust. Something horrible is happening inside of me and I don't know why. My nightly bloodlust has overflown into my days. I feel lethal, on the verge of frenzy.
I think my mask of sanity is about to slip.
Nancy is offline  
Old 10-08-2004, 12:12 AM   #13 (permalink)
Femme Fatale
 
Nancy's Avatar
 
Location: Elysium
woo hoo! It works! Allthough... there are some lines at the top and at the buttom of the scrollpanel and.. the text seems to be bigger than the rest even though it's set for 10 pt.
__________________
I have all the characteristics of a human being: blood, flesh, skin, hair; but not a single, clear, identifiable emotion, except for greed and disgust. Something horrible is happening inside of me and I don't know why. My nightly bloodlust has overflown into my days. I feel lethal, on the verge of frenzy.
I think my mask of sanity is about to slip.
Nancy is offline  
 

Tags
box, flash, tabulators, text


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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 08:20 PM.

Tilted Forum Project

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73