Solved

Can you control how Flash loads dynamic text?

Posted on 2004-04-11
4
243 Views
Last Modified: 2008-03-06
Hi,

We are loading in dynamic text created in Notepad. We are finding that when Flash loads it into our tutorial, it changes the spacing, somewhat, of the text. For example, the Notepad file will show a sentence with all the proper spacing between words (one space between each word) but when it shows in our Flash piece, Flash will add an extra space before one of the words, thus making it look like we typed an extra space when in fact, we did not. It doesn't happen on every line of text but does on at least one or two. The extra space is noticeable. Yes, we can go in and alter the Notepad file by adding an extra space before a word so that Flash makes it look okay,however, that can present problems for modifying text later. We'd rather not have to do this. Can anyone explain why Flash does this and if there is something we can do about it?

Thanks
0
Comment
Question by:mmichelep
  • 2
4 Comments
 
LVL 23

Assisted Solution

by:Zeffer
Zeffer earned 25 total points
ID: 10803313
using Mime Format is the way to deal with this.. + denotes a space..eg

Here+is+a+sentance+which+will+come+out+exactly+as+I+want+it+to.

for line returns use...  %0D%0A

Z
0
 
LVL 9

Accepted Solution

by:
krishnaprathab earned 200 total points
ID: 10804476
Hi,

I dont know why this is happening , try putting the text inside quotes. If that doesnt work use the below function on you string variable which will trim away extra spaces in the text.

myText="this is a  test text where iam using  this is a  test text where using  ";

String.prototype.trimSpaces = function()
{
      tempStr = new String();
      var i = 0;
      do
      {
            if (this.substr(i,1)==" " && this.substr(i+1, 1)==" ")
            {
                  i++;
            }
            tempStr = tempStr + this.substr(i,1);
            i++;
      } while(i<=this.length);
      return(tempStr);
}

myText = myText.trimSpaces();

Hope this helps !

Thanks,
KP
0
 
LVL 1

Assisted Solution

by:pcazella
pcazella earned 25 total points
ID: 10810009
Try setting the properties of the text field to display it as HTML.  As you know, HTML will only see one space...
0
 
LVL 9

Expert Comment

by:krishnaprathab
ID: 10824861
Hi,

Did my reply answer your question. If so please close this question or if you need some more help on this feel free to ask.

Thanks,
KP
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SWF won't scale? 4 520
Can't see Flash on IE Windows Apps - Windows 8.1 4 392
Flash Player White Screen Facebook 5 750
IE11 stops playing video on a certain website 10 68
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now