3 Replies Latest reply on Jun 19, 2006 8:07 AM by foreign_c

    special characters

    foreign_c
      i'm looking for solution to display a special character, not-equal sign (≠) in director (projector).
      the text is coming from a database and displayed in a scrolling text-member.

      i'm aware of the unicode limitations - but there's no ascii character for not-equal sign (≠) either.

      any ideas, suggestions.

      at the moment i'm thinking of editing the font and replacing an unused character with the ≠ sign, and replace the chars in the db with the new "placeholder". not sure if this will work.
        • 1. Re: special characters
          Level 7
          The easy way is to replace the character with something that is readily
          accessible, like <>.

          If that is not an option, then you can use the symbol font which does
          have a not equal sign. I'm not sure if that font is available on Mac,
          but I have used it on PC only projects before.

          Also, if you are authoring on a PC, you can embed the symbol font into
          the Director movie, so then it should be cross-platform compatible.

          This is the script I used- it goes on the text field that is displaying
          the info from the database, and you'll probably need to change the 1st
          line inside of the repeat to whatever is currently in your db for the
          not equal sign. In my case it was "<>":

          on prepareFrame me
          o=1
          repeat while o<>0
          o=offset("<>",sprite(me.spriteNum).member.text)
          if o=0 then exit repeat
          sprite(me.spriteNum).member.char[o]="�"
          sprite(me.spriteNum).member.char[o].font="Symbol"
          sprite(me.spriteNum).member.char[o+1].delete()
          end repeat
          end
          • 2. Re: special characters
            Level 7
            The not equal sign can be found in the symbol font (windows), index 185 -
            numtochar(185)
            If the ? (question mark) character is not actually used anywhere else,
            you can search for that character in the text returned from the db to
            director, change it to numToChar(185) and it's font to 'symbol'.
            If there are more unicode characters in your db, or the question mark sign
            is used elsewhere, you'll have to modify the db's contents - change the
            not-eq char to a not used character of the ansi set (e.g. 185, if not used
            alsywhere) and then find and replace that character, as above.
            If you do the latest, and you use <185>, the only thing you'll have to
            change in your text member is the font of the <185> characters.


            "foreign_c" <webforumsuser@macromedia.com> wrote in message
            news:e7672q$mfq$1@forums.macromedia.com...
            > i'm looking for s solution to display a special character, not-equal sign
            > (?)
            > in director (projector, not shockwave).
            > the text is coming from a database and displayed in a scrolling
            > text-member.
            >
            > i'm aware of the unicode limitations - but there's no ascii character for
            > not-equal sign (?) either.
            >
            > any ideas, suggestions.
            >
            > at the moment i'm thinking of editing the font and replacing another
            > unused
            > character with the ? sign, and replace the chars in the db with the new
            > "placeholder". not sure if this will work.
            >






            • 3. Re: special characters
              foreign_c Level 1
              Hi there, thanks for the response.

              I used Mike's code to check for the char and then replace using numToChar.
              Just one thing - the member.font stays set to Symbol.
              Because I'm changing db records in the same frame, I'm simply resetting the font to the original when changing records, before it checks again.

              Thanks.