4 Replies Latest reply on Aug 22, 2006 6:05 PM by ntsiii

    Alert box

    Level 7
      Any way to allow Alert.show("very long text line..... the end");
      To have the text wrap (My alert needs to show a ErrorFault message string
      that is very long).

      Or do I have to go to my own custom popup?



        • 1. Re: Alert box
          peterent Level 2
          I believe the Alert control determines how wide to make itself and to wrap the text as it sees fit. Can you give an example of something that does not work for you and why?
          • 2. Re: Alert box
            Level 7
            This is a fault handler for a REST HTTP call. The event.fault.message string
            can be about 100 chars long, and it does not wrap, so the Alert exceeds the
            size of the Flash window:


            "peterent" <webforumsuser@macromedia.com> wrote in message
            news:ecffvd$933$1@forums.macromedia.com...
            >I believe the Alert control determines how wide to make itself and to wrap
            >the text as it sees fit. Can you give an example of something that does not
            >work for you and why?


            • 3. Re: Alert box
              Level 7
              This is a fault handler for an HTTP REST call. The event.fault.message can
              get over 100 characters, Alert does not wrap the text, so the Alert window
              is clipped.





              private function faultHandler(event:FaultEvent) : void
              {
              Alert.show(event.fault.faultString, "Error requesting data:" +
              "\n" + event.fault.message + "\ntype: " + event.type);
              }

              <mx:HTTPService id="srv" url="../assets/mapLayers.xml" useProxy="false"
              resultFormat="e4x"
              result="resultHandler(event)"
              fault="faultHandler(event)"/>

              "peterent" <webforumsuser@macromedia.com> wrote in message
              news:ecffvd$933$1@forums.macromedia.com...
              >I believe the Alert control determines how wide to make itself and to wrap
              >the text as it sees fit. Can you give an example of something that does not
              >work for you and why?


              • 4. Re: Alert box
                ntsiii Level 3
                It should wrap.

                But if you have too much trouble making Alert behave as you want, making a custom pop-up is very easy.

                I wanted a consistent and somewhat complex format for my HTTPService fault messages, and got frustrated with Alert's inflexibility, so I created my own.

                Tracy