如何处理父容器调整大小事件或至少浏览器调整大小事件?
我尝试这段代码,但 handleResize 永远不会调用:
package
{
//import org.apache.royale.html.Group;
import org.apache.royale.jewel.Group;
import org.apache.royale.core.BrowserResizeListener;
public class Slideshow extends Group
{
public function Slideshow(){
super();
this.addBead(new BrowserResizeListener());
this.addEventListener("sizeChanged",handleResize);
}
protected function handleResize():void{
// this is never called
trace(this.height)
trace(this.width)
}
}
}
谢谢你的帮助