?
Solved

Can you control how Flash loads dynamic text?

Posted on 2004-04-11
4
Medium Priority
?
277 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 23

Assisted Solution

by:Zeffer
Zeffer earned 75 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 600 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 75 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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
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 how to record live broadcast.
Suggested Courses

771 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