Horizontal Spacing With Dynamic Text Boxes
Hi,
Using the tutorial for the Digital Clock I have created my own date viewer.
However, because the text boxes are dynamic, I cannot edit the horizontal spacing of the font.
I wish my date to look like the image below but as I cannot edit the horizonatal spacing, I cannot squeeze the letters together.
Is there another way of doing this?
Thanks in advance.
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 03-29-2004, 02:55 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Horizontal Spacing With Dynamic Text Boxes
Hi,
Using the tutorial for the Digital Clock I have created my own date viewer.
However, because the text boxes are dynamic, I cannot edit the horizontal spacing of the font.
I wish my date to look like the image below but as I cannot edit the horizonatal spacing, I cannot squeeze the letters together.
Is there another way of doing this?
Thanks in advance.
Horizontal Spacing And Dynamic Text Fields: Possible?
The problem I have is that I just cant seem to work out how to have kerning or horizontal spacing on dynamic letters or numbers in dynamic text fields.
I would like to know if its possible or not. If it is then i'll drop my workarounds below and just do what ever it i need to get it working.
I worked out a workaround for the loadVars problem by placing a space between all the letters in the text file!
Im now stuck with the preloader..I know what im trying to do is possible, but im not sure where to start so I need some help.
This is the preloader:
startListener.onLoadProgress = function(target_mc:MovieClip, bytesLoaded:Number, bytesTotal:Number){
percentage = Math.round(bytesLoaded/bytesTotal*100);
//the if/else ensures it always produces a 3 digit number
if (percentage==100) {
loader.text = percentage;
//if the percentage is under 10, then stick 00 in front
}else if (percentage<10){
loader.text = "00"+percentage;
//if the percentage is between 9 and 99 then stick 0 in front
} else {
loader.text = "0"+percentage;
}
}
I need to space out each individual digit of the percentage. Im thinking this must be possible with alittle algerbra and actionscript.
Any ideas?
Thanks in advance,
Hoolagon
www.kigwan.com
Horizontal Spacing And Dynamic Text Fields: Possible?
The problem I have is that I just cant seem to work out how to have kerning or horizontal spacing on dynamic letters or numbers in dynamic text fields.
I would like to know if its possible or not. If it is then i'll drop my workarounds below and just do what ever it i need to get it working.
I worked out a workaround for the loadVars problem by placing a space between all the letters in the text file!
Im now stuck with the preloader..I know what im trying to do is possible, but im not sure where to start so I need some help.
This is the preloader:
startListener.onLoadProgress = function(target_mc:MovieClip, bytesLoaded:Number, bytesTotal:Number){
percentage = Math.round(bytesLoaded/bytesTotal*100);
//the if/else ensures it always produces a 3 digit number
if (percentage==100) {
loader.text = percentage;
//if the percentage is under 10, then stick 00 in front
}else if (percentage<10){
loader.text = "00"+percentage;
//if the percentage is between 9 and 99 then stick 0 in front
} else {
loader.text = "0"+percentage;
}
}
I need to space out each individual digit of the percentage. Im thinking this must be possible with alittle algerbra and actionscript.
Any ideas?
Thanks in advance,
Hoolagon
www.kigwan.com
Spacing Of Dynamic Text Boxes
I am having trouble spacing dynamic text boxes with as.
I can define how many spaces(characters) for each text box, but I want it to say something along the lines of:
"mc._x = i._width + "some extra space";
here's where the problem is:
ActionScript Code:
spacing = 150;boot = function () { for (var i = 0; i<images.length; i++) { mc = container.attachMovie("thumbMC", "thumb"+i, i); trace(mc); //mc._x = i*(spacing); mc._x = thumb[i].width; mc.path = images[i].path; mc.link = images[i].link; mc.over.captionMC.caption.text = images[i].caption; }
I just don't know how to say mc._x = i._width + spacing; in flash. If anyone could help I'd really appreciate it. I'm working on this as I type this so hopefully I can figure it out myself, but I'm not the greatest as-er
thank you.
Character Spacing In Dynamic Text Boxes
er, what the title says really
i need to fix the character spacing on some dynamic text, is there a way to do this???
Maybe there is a way to do it outside of flash???
thanks
cuse
Don't Want Horizontal Input Text Boxes
I am using Flash5 and I have a contact form. However, I wish to have input text boxes that are rotated somewhat so that they are not horizontal (slightly rising from left to right.
Is it possible ?
Thanks
MM
Dynamic Text Spacing
Hi
When I enter text into my html form and then pass the text to my dynamic text field in my flash program, all the text seems to be double spaced or has extra returns in them. Is there a setting that correct this?
Dynamic Text Spacing?
is there a way to space dynamic text?
through actionscript?
the letters of my dynamic text are to dense and i would like to change this.
regards,
.dnd
Equal Spacing For Horizontal Navigation
I am building a horizontal navigation and I am having trouble getting equal spacing between the mc's. Inside the mc's there is a text box that will contain different titles.
Code:
function buildNav():Void
{
var navTitle:Array = new Array({title: "home", path: "index.html"},
{title: "tools", path: "tools.html"},
{title: "specs", path: "specs.html"},
{title: "process", path: "process.html"},
{title: "reference", path: "reference.html"},
{title: "best practices", path: "practices.html"});
var navHolder:MovieClip = r.createEmptyMovieClip("navHolder", 0);
var tempX:Number;
for(var i:Number = 0; i < navTitle.length; i++)
{
var mc:MovieClip = navHolder.attachMovie("nav_mc", "nav_mc" + i, i, {_x: tempX});
mc.id = i;
tempX = ((mc._x + mc._width) + 60);
var navFormat:TextFormat = new TextFormat();
navFormat.leftMargin = 10;
navFormat.rightMargin = 10;
mc.nav_content.nav_content_txt.autoSize = true;
mc.nav_content.nav_content_txt.text = navTitle[i].title.toUpperCase();
mc.nav_content.nav_content_txt.setTextFormat(navFormat);
mc.nav_hit._width = mc.nav_content._width;
mc._y = 6;
}
}
Dynamic Text Boxes / Resizing Text Boxes
I have a site with a dynamic text box that I have initialized (I'm not sure that that is the correct term) at the beginning with:
myText = new LoadVars();
myText.onLoad = function()
{ textBox_txt.htmlText = this.content;
};
myText.load("text/bio.txt");
stop();
Then I have just used a text box throughout with the same instance name, although sometimes I have it on a new keyframe. I assumed I could just keep loading text into it on different frames with:
stop();
myText.load("text/performances.txt");
This appears to be working, except that sometimes it seems to be confused and the text box on a certain frame has the wrong text in it. Do I have to initialize one for each frame in order for them to display the right code? What could be causing it to load another text file if it's frame action is telling it to load something else? It seems unnecessary to have to re-initialize it for a new text box instance in every new frame, but is that the way it has to be done?
Also, I'm not clear on resizing text boxes. It seems like if I use the width and height numbers to resize this text box on different pages then it changes the size of the text inside, and the scroll bar (the UIScrollbar) is a little squishy looking sometimes. How does this work?
Thanks for any help.
Text Rendering Bugs W/dynamic/css Text - Overlaps, Spacing, Etc.
Hi There:
This is a problem I've been having for years but which came up again today. I've got a fairly complex quiz engine which builds question and answer screens from xml & stylesheets using embedded fonts. I've wrangled most of the basic issues with formatting - bold & italics, special characters, etc.
Unfortunately, I still have regular problems with Flash's rendering of the text - usually when using an inline style with italics. At small font sizes italic text will overlap the text that precedes it - and I know that it's a rendering bug, because if I zoom in to 200 or 400%, the letter spacing is correct. I end up adding non-breaking spaces to the file, which is bad form, but it works.
Today I have a problem with underline tags adding too much space between words - even when there are no spaces. Again, it displays correctly when zoomed in. Unfortunately, I can't fix this one by adding NBSPs. I've tried playing with the letterspacing with no success.
Does anybody have any insights or advice? I'm attaching an image that shows examples of what I'm talking about. I've experienced this problem for YEARS with dozens of different fonts, and I've tried every variation of kerning/letterspacing/font embedding etc. that I can think of.
Thanks in advance!
Patrick
Text Rendering Bugs W/dynamic/css Text - Overlaps, Spacing, Etc.
Hi There:
This is a problem I've been having for years but which came up again today. I've got a fairly complex quiz engine which builds question and answer screens from xml & stylesheets using embedded fonts. I've wrangled most of the basic issues with formatting - bold & italics, special characters, etc.
Unfortunately, I still have regular problems with Flash's rendering of the text - usually when using an inline style with italics. At small font sizes italic text will overlap the text that precedes it - and I know that it's a rendering bug, because if I zoom in to 200 or 400%, the letter spacing is correct. I end up adding non-breaking spaces to the file, which is bad form, but it works.
Today I have a problem with underline tags adding too much space between words - even when there are no spaces. Again, it displays correctly when zoomed in. Unfortunately, I can't fix this one by adding NBSPs. I've tried playing with the letterspacing with no success.
Does anybody have any insights or advice? Here's an image that shows examples of what I'm talking about. I've experienced this problem for YEARS with dozens of different fonts, and I've tried every variation of kerning/letterspacing/font embedding etc. that I can think of.
Thanks in advance!
Patrick
Set Dynamic Text Letter Spacing ?
Hello I am wondering if there is any way to be able to set the letter spacing for dynamic text like you can with static text? I know I could break each word up into an array and insert spaces in between each letter and feed it back into a string, or something like that, but that seems like a lot of trouble... is there any other way?
thanks in advance for any ideas!
Dynamic Text Line Spacing
im loading text into a multiline text area from .txt file
why in text file if i start a new line does it show up in flash as a huge gap? (<p>)
how can i display text file "as is"????
Dynamic Text Line Spacing
Hello--
This is the code i use 2 upload my text file
Code:
loadVariablesNum("screen.txt", 0);
Inside the TXT file i wrote
Code:
screen=bla bla
so far so good
BUT!
When i write two sentences like:
Hello world,
How u doing?
In the SWF it shows like
Hello world,
How u doing?
I dont know y it makes an extra space?
How can i fix this?
Thanks allot,
Dynamic Text And Character Spacing
Hi there,
Is it all possible to reduce the character spacing in dynamic text? I have some dynamic text fields displaying the date etc and the letter spacing needs to be tighter. Any ideas?
Thanx
Dynamic Text Character Spacing
I am not sure how to control the character spacing when a text box is dynamic. Has anyone found how to make this work?
Thanks so much!
Brian.
Dynamic Text Character Spacing
I am not sure how to control the character spacing when a text box is dynamic. Has anyone found how to make this work?
Thanks so much!
Brian.
Character Spacing In Dynamic Text
Is there a way to use character spacing in dynamic text? You can use it with static text it's an option drop down on the properties dialog box, but I can't find a way to use it with dynamic text.
If there is for some very stupid reason you can't is there a way around it.
Thanks
[CS3] Dynamic Text Line Spacing
I have a dynamic text tat loads a txt file.
it is multiline and HTML.
it loads the original file (like this):
this is a test message
this is a test message
this is a text message
like this:
this is a text message
this is a text message
this is a text message
the problem is.... to much line spacing, and different than the original.
How can I correct this ?
Thank you.
Flash Dynamic Text Spacing
Hi,
I have a website iin Aspx 2.0 that loads some data from an Access Database to Flash Dynamic Text boxes.
My problem is that in my server Flash in not "loading" the paragraph information, when there is more than one paragraph. I tried the same website in another server and it doubles every paragraph. I don't know why. Everything is exactly the same...
Here are pictures os the same text in the two different servers:
http://pwp.netcabo.pt/jn.brochado/server1.jpg
http://pwp.netcabo.pt/jn.brochado/server2.jpg
Any ideas why and how to solve it???
thanks..
Dynamic Text Letter Spacing?
i notice for flash 8. static text'S letter spacing can be controlled by actionscript BUT I have no luck doing the same with dynamic text.
take a look at my source file. and see if you got better luck with letter spacing with dynamic text.
raskol
Dynamic Text, Multiline, Spacing?
Hello all!
I am working on a project that loads an RSS feed into a dynamic text box. I have the feed loading just fine, but once it loads the spacing between the "wrapped" lines is HUGE compared to the spacing between topics.
Here is an example:
example HERE
Is there any setting in Flash 8 that I can use to correct this? Actionscript maybe?
This looks dumb, and it's driving me nuts.
Thanks,
Chris
Dynamic/Input Text Spacing
Is it possible to have character spacing in an input field and a dynamic textbox? If so, how do I do it?
the font i want needs to be spaced
Thanks
Letter Spacing On A Dynamic Text Box
I would like to apply letter spacing on a dynamic text box, but it seems once I export the swf, the letter spacing defaults back to 0. How can this be done?
Thanks a lot for any help!
Letter Spacing For Dynamic Text
Hi All,
Im having a problem with setting the letter spacing for a dynamic text box that exists on my timeline.
I have a string which is telling the dynamic text box what words to put into it.
What I want to do is set the letter spacing to 5. I have tried the following code from the help manual: -
var format1:TextFormat = new TextFormat();
format1.letterSpacing = 5;
myTxtBox.setTextFormat(format1);
What this does is sets the leading to 5 for any text I physically write into the box, and then preview. For any text that I dynamically load using a string and preview..... the leading is 0?
Any ideas? Help is thanked in advanced
Line Spacing W/ Dynamic Text
Hey guys, I have a question about line spacing and dynamic text. For my client site, www.haultrash.com ,a line break is double spaced. I didn't use HTML, and this is exactly what the Shop Haultrash text file looks like:
shop=HaulTrash.com now has an online store to buy all kinds of HaulTrash merchandise! At the store, you will find:
-T-Shirts
-Sweatshirts
-Collared Shirts
-Baby Accessories
-Boxers
-Hats
-Mugs
-Tote Bags
-And Much More!
If you go to the shop section on the site however, whenever there is a line break it is double spaced. To add to the problem, it works fine on my own server, as you can see if you go to
http://www.someoneleet.com/main.html
The .swf, .html files and .txt files are the exact same on both sites. What could be making the text act like this? Is there a double line break in Flash or something you can customize?
Maybe you guys know something I don't because I'm stump[ed, and as far as I know, the server should ot have anything to do with the text.
Thanks!
-brad-
Spacing Dynamic/input Text
Is it possible? I want to space out the characters so they arent so clumped in input and dynamic text
s e n d
instead of
send
thanks
Letter Spacing In Dynamic Text
I want to increase the letter spacing of dynamic text that I am using is it posible...mine doesn't allow me to do this.
Thanks in Advance.
Noir.
Spacing Of Dynamic Text Field.
Normally I would space the mc's on a whole number like for thumbnails, but since the widht is set to autosize, I cant do that. Help please.
ActionScript Code:
var showWhat = 0;var links:XML = new XML();links.ignoreWhite = true;links.onLoad = function(ok) { if (ok) { var entrys = this.firstChild.childNodes; for (var i = 0; i<entrys.length; i++) { var current = entrys[i]; var secret = current.childNodes[0].firstChild.toString(); if (secret == showWhat) { var titleBtn = menu_mc.attachMovie("title_txt", "button"+i, i); titleBtn.titleTxt.autoSize = true; titleBtn.titleTxt.text = current.childNodes[1].firstChild.toString(); // need help with this line titleBtn._x = //// titleBtn.entry = current.childNodes[2].firstChild.toString(); titleBtn.date = current.childNodes[3].firstChild.toString(); titleBtn.link = current.childNodes[4].firstChild.toString(); titleBtn.img = current.childNodes[5].firstChild.toString(); titleBtn.onRelease = function() { trace(this.entry); trace(this.date); trace(this.link); trace(this.img); }; } } }};links.load('http://www.xml.xml');
Letter Spacing On A Dynamic Text Box
I would like to apply letter spacing on a dynamic text box, but it seems once I export the swf, the letter spacing defaults back to 0. How can this be done?
Thanks a lot for any help!
Spacing Dynamic Text Widths
Hi there,
I would like to determine the exact spacing of the textfields for my xml file so I get a result for my horizontal nave like: home/ features/ work/ etc.
Now I have something like this:
GenerateMenu = function (container, name, x, y, depth, node_xml) {
var curr_node;
var curr_item;
var curr_menu = _root.container;
for (var i = 0; i<node_xml.childNodes.length; i++) {
curr_item = curr_menu.attachMovie("beh", "item"+i+"_mc", i);
curr_item._x = x+i*spacing;
curr_item.i = i;
curr_item._y = y;
//beh(export name) is the movieclip attached to the mc container. In the mc with export name "beh' I have a textfield with the name 'name'.
This is what I tried to create the space with no result:
container.beh.name.autoSize = true;
spacing=container.beh.name._width +10;
Can someone help me out. Thx
Spacing Dynamic/input Text
Is it possible? I want to space out the characters so they arent so clumped in input and dynamic text
s e n d
instead of
send
thanks
Dynamic Text Box Character Spacing
hey.
Im loading external .txt files into dynamic text boxes in flashMX.
Is there a way to alter the character spacing in either flash or the txt file though as it screws my design up greatly without it?
thanks
cuse
Vertical And Horizontal Thumbnail Spacing - .as Related
in this file i have 7 thumbnails. 5 out of 7 are 93x66 pixels, but the other two are 66x93 pixels. when i test the .swf, there is a large space after the two vertical thumbnails, and i don't know how to change it. i think it would be easier to view the file in question here, which is labeled print.fla. the .as file that contains all the code is called Thumbnail.as.
I just want to reduce the spacing after the vertical thumbnails to 10 pixels, but if i change this in the code, then it screws up the positioning for the horizontal ones.
thanks in advance.
Better Control Over Line Spacing With Dynamic Text
I'm putting together an administration system for my boss that will allow him to update his Flash-based site simply by editing content from an HTML textarea. The system works perfectly and is totally dummy proof. My only problem is with line spacing.
To my knowledge, when a dynamic text field is set to render HTML tags, it inserts a <P> tag for each line break. That means that for each new line entered in the HTML textarea there will be a new paragraph. This makes sense as when else would you put a line break? The problem however is the spacing or line height of the <P> effect. I've played with the formatting of my dynamic text field but reducing the line spacing to a comfortable paragraph spacing results in other lines of text overlapping each other.
I've tried replacing chr(13)'s (via PHP) in my HTML textarea with <BR>, escaping the HTML tag to avoid simply rendering it. The problem here is that MySQL takes this literally. So when my SWF retrieves this data, it sees it also as a literal (i.e. &ltBR&gt instead of <BR>) and doesn't render proper <BR> tags.
Something tells me the HTML renderer is of fairly poor quality. Something else we should ask Macromedia to fix in future releases.
I'm at work and can't spend much time on this so I appologize for any clarifications that may be needed.
-ptolemy
[Edited by pateym on 07-09-2002 at 12:28 PM]
Character Spacing In Dynamic Text Fields
Hi All,
How can i give character spacing in dynamic text field using Actionscript?
I have tried:
x_txt.htmlText="<span style='letter-spacing:2.0pt'>My Text</span>"
I Suppose, this is not working because span tag is not supported by Flash MX.
Can anyone provide me with a solution?
Thanks,
Aman.
Dynamic Text From File, Scrolling And Spacing
Hi all.
I have a flash movie that has some buttons on the left side and a dynamic text box on the right. Each button loads a different text file into the dynamic text box, but whenever there is a new line in the text file, there is an extra line in the dynamic text box.
example:
"this is line one.
this is line two."
shows up as:
"this is line one.
this is line two."
Can anyone help me out?
I was also wondering how I could add a scroll bar to said dynamic text box.
Thanks.
::] Peter
Control Character Spacing In Dynamic Text Box?
I think my text looks better with a character spacing of .5 - problem is I have some dynamic text boxes and the option greys out when you change to a dynamic text box. Is it possible to control this with a little actionscript?? anyone??
Thanks!
Lost Paragraph Spacing Using Dynamic Text
Hello,
I'm having a problem with dynamic text.
Last year I´ve a flash 5 website with dynamic text and everithing worked fine.
The text appeared online as I wanted. Some paragraphs(Enter) and some <br> to keep the txt line closer.
example:
&int1=<br>• Lançamentos contabilísticos<br>• Facturas de trabalhos classificadas<br>• Documentos de despesa do caixa da unidade
&int2=• Lançamentos contabilísticos
• Facturas de trabalhos classificadas
• Documentos de despesa do caixa da unidade
Now, I had to update the website in MX(not 2004)and lost all the paragraph spacing, everything looks like I'm using next line spacing ( <br> ) using the same *.txt that worked before.
Does anyone know how I can solve this problem
Thank you
Madre T
How Do I Prevent Double Spacing In Dynamic Text?
What am I doing wrong? I have tried using html tags to format my text but the tags just appear in the text. I need to get rid of the double spacing.
(Probably a silly question but I have searched through the forums and couldn't find an answer. )
Thanks for any help!
Madeleine
Letter Spacing In Dynamic Text Fields
Hello,
When I load text into a dynamic text field it loses its letter spacing. I type in some text in Flash and set the letter spacing and all is fine, but when I run the swf the spacing is reset to 0. I've tried setting it using actionscript but that doesn't work. Any ideas?
|