5 Replies Latest reply on Apr 16, 2006 7:34 PM by MoisesZAragoza


      I have a text field that I need to turn Bold or change color when you pres on it but i cang get it to work

        • 1. Bold
          Here try these:
          To change the text style:

          On mouseUp
          member("text field").fontstyle="bold"

          To change colour:

          On mouseUp
          member("text field").forecolor=33
          member("text field").backcolor=77

          If you wanted it as rollover then you'd use:

          On mouseEnter
          member("text field").fontstyle="bold" --Changes the text named text field to bold

          on mouseLeave
          member("text field").fontstyle="plain" --Changes text back to what is was before, plain

          • 2. Re: Bold
            DoneSK Level 1
            I fogot to mention that you put in the codes in scripting menu for the text. On windows, right click on the text sprite, on the pop menu go to "Scripts..." then add the codes above.

            Also this method:
            member( ), does not necessarily need the name of the sprite, you can use the sprite channel number instead.

            For instance:

            On mouseUp
            member(2).fontstyle="bold" --Changes fonstyle of text sprite in channel 2.

            • 3. Re: Bold
              James Newton, ACP Level 3
              See the font styles in director question for a similar question. The behavior that I provide as an answer sets the color of the word under the mouse, and sets its fontStyle to underline. If you are using a #text member, then you will need to set the fontStyle to [#bold]. If you are using a #field member, then you need to set it to "bold". You will also need to adapt the behavior so that the change occurs on mouseDown rather than on mouseWithin.
              • 4. Re: Bold
                DoneSK Level 1
                Hey, thanks buddy. You also helped me there.
                • 5. Re: Bold
                  MoisesZAragoza Level 1
                  Thanks to all just what I needed