1 Reply Latest reply on Apr 10, 2011 3:29 AM by pol2095

    flex 4.5 "hero" - stage event is not dispached in a view

    pol2095 Level 1

      Hello,

       

      stage event is not dispached in a view (flex 4.5 hero)

      <?xml version="1.0" encoding="utf-8"?>
      <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:s="library://ns.adobe.com/flex/spark" title="Test" initialize="comp(event)">
             
      <fx:Script>
              <![CDATA[
              public function comp(e:Event):void {
                      this.stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE, orientationChangeHandler);
              }
              public function orientationChangeHandler(event:StageOrientationEvent):void {
                      are.text="aa";
              }
              ]]>
             
      </fx:Script>
             
      <s:TextArea width="400" id="are"/>
      </s:View>

      thanks