10-04-2004, 04:11 AM | #1 (permalink) |
Femme Fatale
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. |
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.” |
10-05-2004, 04:38 AM | #3 (permalink) | |
Femme Fatale
Location: Elysium
|
Quote:
__________________
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. |
|
10-05-2004, 06:03 AM | #4 (permalink) | ||
Crazy
Location: Belgium
|
Quote:
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:
__________________
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.” |
||
10-05-2004, 10:24 AM | #5 (permalink) | |
Femme Fatale
Location: Elysium
|
Quote:
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. |
|
10-06-2004, 03:04 PM | #6 (permalink) | |
Crazy
Location: Belgium
|
I made this:
Quote:
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.. |
|
10-06-2004, 10:27 PM | #7 (permalink) | |
Femme Fatale
Location: Elysium
|
Quote:
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. |
|
10-07-2004, 02:56 AM | #8 (permalink) |
Femme Fatale
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. |
10-07-2004, 03:45 AM | #9 (permalink) | |
Crazy
Location: Belgium
|
Quote:
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.” |
|
10-07-2004, 04:54 AM | #10 (permalink) |
Femme Fatale
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. |
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.” |
10-07-2004, 11:24 PM | #12 (permalink) | |
Femme Fatale
Location: Elysium
|
Quote:
__________________
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. |
|
10-08-2004, 12:12 AM | #13 (permalink) |
Femme Fatale
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. |
Tags |
box, flash, tabulators, text |
|
|