flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yishay Weiss <yishayj...@hotmail.com>
Subject FW: [FlexJS] resize event not working?
Date Wed, 22 Feb 2017 06:13:43 GMT

From: Yishay Weiss<mailto:yishayjobs@hotmail.com>
Sent: Wednesday, February 22, 2017 8:07 AM
To: Justin Mclean<mailto:justin@classsoftware.com>
Subject: RE: [FlexJS] resize event not working?

Looks like you’re using a flash event instead of the flexjs one.

From: Justin Mclean<mailto:justin@classsoftware.com>
Sent: Wednesday, February 22, 2017 6:12 AM
To: dev@flex.apache.org<mailto:dev@flex.apache.org>
Subject: [FlexJS] resize event not working?


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


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message