如何定义坐标,实现相对应的位置?
我在Application,自己写代码添加了一个PANEL,然后在PANEL中增加一个button,想这个button,靠右并离panel边界10个像素,设置了xy坐标,都么有用,总是靠左贴着panel的边边,请教一下,下面是我的代码:
this._qPanel.x=47;
this._qPanel.y=15;
this._qPanel.id="questionPanel";
this._qPanel.width=585;
this._qPanel.height=412;
this._qPanel.states=new Array("showQuestion");
this._app.addElement(_qPanel);
//x="493" y="335" label="确 定" id="answerBtn" click="answerBtn_clickHandler(event)"
var button:Button=new Button();
button.x=493;
button.y=335;
button.label="确 定";
button.id="answerBtn";
button.addEventListener(MouseEvent.CLICK,answerBtn_clickHandler);
this._qPanel.addElement(button);