[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Can you control how Flash loads dynamic text?

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.
Suggested Courses

834 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