2 Replies Latest reply on May 30, 2007 12:59 PM by McFazstp

    A text question

    wgb14 Level 1
      Hi all,

      Does anyone know how can i check if a text cast member contains text ? What i would like to do is the following

      case true of

      (member("Level1").text = ) --- any text in the cast member input will validate this

      end case

      case true of

      (member("Level1").text = EMPTY):

      --do somethign here

      end case

      I tried member("Level1").text = member("Level1").text which works but it gives me very long case staments (something which i want to avoid). Any ideas?

      Thanks
        • 1. Re: Cast member question
          Level 7
          if member("Level1").text <> "" then
          --do stuff
          end if

          "wgb14" <webforumsuser@macromedia.com> wrote in message
          news:f3k5ok$9lv$1@forums.macromedia.com...
          > Hi all,
          >
          > Does anyone know how can i check if a text cast member contains text ?
          > What i
          > would like to do is the following
          >
          > case true of
          >
          > (member("Level1").text = ) --- any text in the cast member input
          > will
          > validate this
          >
          > end case
          >
          > case true of
          >
          > (member("Level1").text = EMPTY):
          >
          > --do somethign here
          >
          > end case
          >
          > I tried member("Level1").text = member("Level1").text which works but it
          > gives me very long case staments (something which i want to avoid). Any
          > ideas?
          >
          > Thanks
          >


          • 2. Re: A text question
            McFazstp Level 1
            If you just want to check if it is empty;

            if (member("Level1").text = EMPTY) then
            -- it's empty
            else
            -- it's got text in it
            end if

            If you want to be more specific

            case ( member("Level1").text ) of
            "Hello":
            "Goodbye":
            "etc":
            EMPTY:
            end case