Divyakedia
07-26-2006, 12:31 AM
Hi there,
I am having a window component, couple of radio btns in my fla (they r coming thru actionscript). On the click of a radiobtn its corresponding img gets displayed in the window. Now, i have made the window scalable thru this code:
sizerPop = new Object();
sizerPop.handleEvent = function(img){
if(img.type == "complete"){
myTW.setSize(myTW.content._width, myTW.content._height +25);
}
}
myTW.addEventListener("complete", sizerPop);
where, myTW is:
myTW = mx.managers.PopUpManager.createPopUp(_root, mx.containers.Window, false, {closeButton: true, title: _root.reqmessage1, _x: 270, _y: 40, color: 16711680,contentPath:radioButtonArray[_loc2].object.bkimage});
myTW.title = "Radio Button Clicked is:"+radioButtonArray[_loc2].object.label;
All this is working fine locally. But, once i upload it the window scales itself to fit the image but the close btn which is by default on the right hand side goes to the left.
But, i'm more baffled by the fact that this problem occurs randomly. Suppose for the first time on the click of a btn the close btn will shift and maybe for the 2nd,3rd or 4th time it won't or maybe will go wrong always or not at all. Why is this?
I am having a window component, couple of radio btns in my fla (they r coming thru actionscript). On the click of a radiobtn its corresponding img gets displayed in the window. Now, i have made the window scalable thru this code:
sizerPop = new Object();
sizerPop.handleEvent = function(img){
if(img.type == "complete"){
myTW.setSize(myTW.content._width, myTW.content._height +25);
}
}
myTW.addEventListener("complete", sizerPop);
where, myTW is:
myTW = mx.managers.PopUpManager.createPopUp(_root, mx.containers.Window, false, {closeButton: true, title: _root.reqmessage1, _x: 270, _y: 40, color: 16711680,contentPath:radioButtonArray[_loc2].object.bkimage});
myTW.title = "Radio Button Clicked is:"+radioButtonArray[_loc2].object.label;
All this is working fine locally. But, once i upload it the window scales itself to fit the image but the close btn which is by default on the right hand side goes to the left.
But, i'm more baffled by the fact that this problem occurs randomly. Suppose for the first time on the click of a btn the close btn will shift and maybe for the 2nd,3rd or 4th time it won't or maybe will go wrong always or not at all. Why is this?