1 Reply Latest reply on Jun 9, 2008 8:02 AM by jan viehweger

    Alert.show() doesnt pops up

    jan viehweger Level 1
      hi list,

      as many times before, i simply try to create a new alert in an the script tag of flex:

      private function myHandler(event:Event):void
      {
      trace("myHandler() was fired");
      Alert.show("My Message", "My Title");
      }

      for some reasons, the alert doesnt pops up. the trace() is printed in the output which tells me that the function has been executed???

      the code obove is executed inside a new <mx:Window /> which has been created by the by the main <mx:WindowedApplication />.

      settings for the <mx:WindowedApplication /> are:
      showFlexChrome="false"

      settings for the <mx:Window /> are:
      systemChrome="none"
      showFlexChrome="false"
      transparent="false"

      the app descriptor file has:
      <systemChrome>none</systemChrome>

      maybe someone can help?


        • 1. Re: Alert.show() doesnt pops up
          jan viehweger Level 1
          i found the problem by my self:

          the reason was, tha i forgot to set "parent" param of the Alert. since i create the Alert in a Window, i have to explicit set this param. in my app, where the used the main file as a "splash screen" which directly closes after it creates the window the Alert was created, but in the main file (which was'nt visible)! stupid things happens.

          the correct code is like this:

          private function myHandler(event:Event):void
          {
          trace("myHandler() was fired");
          Alert.show("My Message", "My Title", this);
          }

          regards