![]() |
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* :confused: |
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... |
Quote:
|
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:
|
Quote:
http://www.the-numbers.com/index.php as shown below the Daily Chart - Sunday, October 3 part. Perfectly aligned numbers! :) |
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... :) |
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! :crazy: |
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. :mad: |
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 :thumbsup: |
Ooooooooooooo! Well that's a whole other matter! :crazy: 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 :( |
Don't know a solution for that either... That is bothering me also... :(
|
Quote:
|
woo hoo! It works! Allthough... there are some lines at the top and at the buttom of the scrollpanel :confused: and.. the text seems to be bigger than the rest even though it's set for 10 pt. :(
|
All times are GMT -8. The time now is 07:30 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project