[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Can you control how Flash loads dynamic text?

Posted on 2004-04-11
4
Medium Priority
?
282 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

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…
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…
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

649 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