flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Mclean <jus...@classsoftware.com>
Subject [FlexJS] resize event not working?
Date Wed, 22 Feb 2017 04:12:08 GMT

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:BrowserResizeHandler />
        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);
        <js:View id="view" percentWidth="100" percentHeight="100">
            <js:Label text="Resize Me" />


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'));


View raw message