Skip navigation
HappyFlashGuy
Currently Being Moderated

Crazy bug - Flash is deleting random string characters

May 16, 2010 9:23 PM

Hello!  I'm working through Adobe's "Actionscript 3.0 for Adobe Flash CS4 Professional" book (though I'm using a trial version of CS5).  I've run into a crazy error on the 2nd lessons that I believe is out of my control, and wanted to see if the more advanced users had seen it or had any advice.

 

Everything was going well, when suddenly this bug appeared out of nowhere.  It appears that some random characters are getting removed from my strings.  For example, when I write the code:

 

info_txt.text = "Welcome to the home page";

 

And then run the program, then info_txt just shows: "elmehehmepage", which is the same string minus a bunch of characters.  When I try to write the code:

 

info_txt.text = "abcdefghijklmnopqrstuvwxyz0123456789";

 

Then it comes out as "aeghilmnprs".  This character removal happens for all strings.  And it seems that it isn't random, it's just removing a bunch of letters and all numbers, the same ones every time.

 

Troubleshooting that didn't work:

  • I thought it might have been something that I did, so I removed ALL actionscript from the project except for the above lines, and got the same result
  • I tried opening the end-of-the-lesson completed example file that came with the book, and that had the same problem (now I KNOW it wasn't a problem with the actionscript)
  • Tried restarting Flash CS5, no luck

 

Does anyone have any ideas what's going on?  I can't figure out what made this occur suddenly, and I can't figure out how to undo it.

 

Thanks!

 
Replies
  • kglad
    72,235 posts
    Jul 21, 2002
    Currently Being Moderated
    May 16, 2010 9:24 PM   in reply to HappyFlashGuy

    you need to embed all the used characters.

     
    |
    Mark as:
  • kglad
    72,235 posts
    Jul 21, 2002
    Currently Being Moderated
    May 16, 2010 9:46 PM   in reply to HappyFlashGuy

    click on the textfield to select it.  in the properties panel there's an embed combobox you can click that allows you to embed characters.

     

    if that fails.  save your fla and close flash.  reopen flash and reopen your fla.  retest

     
    |
    Mark as:
  • kglad
    72,235 posts
    Jul 21, 2002
    Currently Being Moderated
    May 17, 2010 11:49 AM   in reply to HappyFlashGuy

    you can embed particular letters.   there's an autofill button to embed the minimum amount of characters needs for a textfield that has its text assigned in the authoring environment.  then if you assign different text using actionscript, you'll have exactly the problem you described.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 13, 2010 1:31 AM   in reply to kglad

    Have the same problem. Everything is ok in CS4 but in CS5 some chars are missing.

    Embedding font is not a solution. Why I should embed system fonts like Arial or Tahoma? Size of resulted SWF is critical for me. At last it works in CS4 and I want to see the same behavior in CS5.

    Is it a bug or a new unknown feature?

    thanks

     
    |
    Mark as:
  • kglad
    72,235 posts
    Jul 21, 2002
    Currently Being Moderated
    Jun 13, 2010 9:56 AM   in reply to Roman Petrusha

    i don't think that's a "feature".

     

    and, i don't know why you're having that problem.  but i know you're not alone.  i've seen several posts about people having trouble with missing characters in cs5 textfields.  i haven't been able to duplicate the problem.  are you using a mac?

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 13, 2010 11:16 PM   in reply to kglad

    Thanks, kglad

     

    We have this problem on win 7 and win xp. I think it not depending on os.

    It works fine if I add textfield at runtime but If I have a textfield on stage and change text I see only chars that were in original string.

    For example, I have textfield on stage with default value 'country', change texfield.text = 'canada' and see 'cn'

     
    |
    Mark as:
  • kglad
    72,235 posts
    Jul 21, 2002
    Currently Being Moderated
    Jun 14, 2010 7:33 AM   in reply to Roman Petrusha

    that i can duplicate.  but when i embed the font and include all the previously missing characters, i see no problem.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 14, 2010 7:49 AM   in reply to kglad

    You are right! No problem with embedded chars.

    But why I have problem with non-embedded fonts? Arial, Tahoma etc. May be I miss something new in CS5?

    I want to migrate to CS5 from CS4. I have download trial version, try to compile my projects and can't see text boxes correctly

     
    |
    Mark as:
  • kglad
    72,235 posts
    Jul 21, 2002
    Currently Being Moderated
    Jun 14, 2010 8:08 AM   in reply to Roman Petrusha

    that's a bug.  it may be corrected in an update.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 14, 2010 9:08 AM   in reply to kglad

    Thanks, kglad!

    Should I post this bug somewhere or it's already known?

     
    |
    Mark as:
  • kglad
    72,235 posts
    Jul 21, 2002
    Currently Being Moderated
    Jun 14, 2010 9:33 AM   in reply to Roman Petrusha

    i don't know if this has been reported/fixed.

     

    here's where you report bugs, though:  https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 15, 2010 6:16 AM   in reply to HappyFlashGuy

    I use CS4 with Verdana font. I have never experienced the problem before, so I decided to do some testing. When using the dynamic text, if I do not embed, I do not loose the text. If I embed part of the text, I will loose what I do not embed. As expected if I embed all, everything works fine.

     
    |
    Mark as:
  • kglad
    72,235 posts
    Jul 21, 2002
    Currently Being Moderated
    Jun 15, 2010 7:58 AM   in reply to brooksrv

    that's great but isn't relevant to this thread.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 21, 2010 4:20 PM   in reply to HappyFlashGuy

    I have the same issue, Mac or Win. Text missing or dropped completely. If I select Use device fonts then it works. It appears to me that the font engine is ignoring device fonts unless explicitly stated, so the fallback engine/checks are busted. If you compile the app in CS4 then Dynamic Text works; in CS5 it breaks. Pretty bad bug. I've written a ton of code for explicit font enumeration and might need to incorporate that for *all* dynamic text and override the base class, which is fairly evil. Would love to know when/if this gets fixed.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 5, 2010 1:52 AM   in reply to HappyFlashGuy

    Dear Friends

     

    I find the solution for this Text Problem....


    The Problem is Anti-alias property of the TextField.

    by default it will be in "Anti-alies animation".

     

    but for Display the text properly we need to chang it...

    In Flash CS5 do the following chantge........

     


    Select Text Field ----> Properties Pallete ----> Anti-alias ---> Use Device Fonts


    or


    Select Text Field ----> Properties Pallete ----> Anti-alias  ---> Bitmap Text[no Anti-alias]

     


    now it will work properly.....

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points