Hi, This code doesn’t seem to work - anyone have any ideas why?
I tried with and with out the bead and also tried “this.” instead of “view.” <?xml version="1.0" encoding="utf-8"?> <js:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:js="library://ns.apache.org/flexjs/basic" initialize="init()"> <js:beads> <js:BrowserResizeHandler /> </js:beads> <fx:Script><![CDATA[ import flash.events.Event; public function init():void { view.addEventListener("resize", resized); } public function resized(event:flash.events.Event):void { trace("resized to " + view.x + " " + view.y); } ]]></fx:Script> <js:valuesImpl> <js:SimpleCSSValuesImpl/> </js:valuesImpl> <js:initialView> <js:View id="view" percentWidth="100" percentHeight="100"> <js:Label text="Resize Me" /> </js:View> </js:initialView> </js:Application> BTW this: public function init():void { this.addEventListener(flash.events.Event.RESIZE, resized); } Also gives this warning when compiling: WARNING - variable flash is undeclared this.addEventListener(flash.events.Event.RESIZE, org.apache.flex.utils.Language.closure(this.resized, this, 'resized')); Thanks, Justin