7 Replies Latest reply on Dec 14, 2007 6:18 PM by Newsgroup_User

    Dynamic Font properties.

    rafa@mediatech Level 1
      Hello everyone:
      I have a project, in which the information for the client is inserted dynamically by the end user. Meaning, my customer pays us to create a splash screen in Director. This splash screen has blank text fields. When my client types information in a specific line of a notepad.txt the blank text fields get populated with the required info. The info on the .txt file are things like names, telephone #'s, emails, etc. Now my client wants to be able to change the font properties dynamically also. Is there anywhere that I can get a list of font properties for Director. So far I have some, like :

      member("info").font= "arial"
      member("info").forecolor=5

      Also, with the forecolor, is there anywhere with a list of what the =number means? I mean, numbers are not very colorful, what if the customer wants blue, of green, or red.

      Thank you!
        • 1. Re: Dynamic Font properties.
          robdillon Most Valuable Participant
          Select the Categorized Lingo menu from either a Script window or the Message Window. From there select Media Element and then Text. From the Text submenu, select Formatting. You should see a list of all of the properties that you can address for a Text Member.Of these, you probably only really care about color, font, fontSize and fontStyle.

          The color property can be expressed as an rgb, palette number or hex value. but what you probably want to do is to give the user an interface to select a color. You could give the user a list of color names, or a set of color swatches, or something similar and then translate the selection to a value that you use to change the text color.
          • 2. Re: Dynamic Font properties.
            rafa@mediatech Level 1
            Thanks Rob!!!!
            I wouldn't be able to give an interface, because my client doesn't want his client to be able to make changes. My client wants to have the file, make changes himself using the notepad, and then burns the whole project to a disc.

            Unless I can make an .exe that would be an interface to make changes to the main .exe...is that possible? how could I make such a thing?

            thank you.
            • 3. Re: Dynamic Font properties.
              Level 7

              "rafa@mediatech" <webforumsuser@macromedia.com> wrote in message
              news:fjui5t$lvl$1@forums.macromedia.com...
              > Thanks Rob!!!!
              > I wouldn't be able to give an interface, because my client doesn't
              > want his
              > client to be able to make changes. My client wants to have the file,
              > make
              > changes himself using the notepad, and then burns the whole project
              > to a disc.
              >
              > Unless I can make an .exe that would be an interface to make changes
              > to the
              > main .exe...is that possible? how could I make such a thing?
              >
              > thank you.
              >

              Hi Rafa,
              I have done a project similar to what you describe.
              If you send me an email, we can see if there is anything that is of
              use to you.

              Regards,
              Richard.

              info looping nl


              • 4. Re: Dynamic Font properties.
                rafa@mediatech Level 1
                That would be great Richard, what is your email? I tried clicking on your name link, but the email returns to me as address not found.
                • 5. Re: Dynamic Font properties.
                  rafa@mediatech Level 1
                  Rob:
                  Using what you mention about RGB, this is what I created:


                  global gFont
                  global gRed
                  global gBlue
                  global gGreen



                  on beginSprite
                  gFont = member("font").text
                  gRed = member("red").text
                  gBlue = member("green").text
                  gGreen = member("blue").text


                  member("title tn").font = gFont
                  member("title tn").color = rgb(gRed,gBlue,gGreen)
                  end

                  But now I get an error saying "Script error:Integer expected member ("title tn".color = rgb(gRed, gGreen, gBlue)

                  I think director doesnt like the global been in the place of an integer. Any way around this?
                  • 6. Re: Dynamic Font properties.
                    Level 7

                    "rafa@mediatech" <webforumsuser@macromedia.com> wrote in message
                    news:fjulnj$pqs$1@forums.macromedia.com...
                    > That would be great Richard, what is your email? I tried clicking on
                    > your name link, but the email returns to me as address not found.

                    Rafa,
                    I do not use the Macromedia forum, but the newsgroup.
                    I dont think I set any address ever on the site.

                    Try info looping nl for email
                    Fill in the blanks in that of course...

                    Richard.


                    • 7. Re: Dynamic Font properties.
                      Level 7
                      "rafa@mediatech" wrote:

                      > I think director doesnt like the global been in the place of an integer. Any
                      > way around this?

                      gRed = member("red").text
                      put gRed
                      -- "12"
                      above is a text string

                      gRed = value (member("red").text)
                      put gRed
                      -- 12
                      above is now an integer

                      regards
                      Dean

                      Director Lecturer / Consultant / Director Enthusiast
                      http://www.fbe.unsw.edu.au/learning/director
                      http://www.multimediacreative.com.au
                      email: d.utian@unsw.edu.au