xcaliber
09-01-2004, 06:27 PM
Hello,
I am stuck and need some help. I have two input boxes that control the size of a movieClip, so far no problem.
The problem that I run into is, how do I set the checkBox to lock the scale or not lock the scale when a user enters numbers into the texboxes. Default is true, so it would start of locking the two input boxes.
Also, how do I convert pixels (72 per inch) into inches, so when the user enters numbers, they enter inches instead of pixels?
Here is the code that I current have to control the sizing.
keyListener = new Object();
keyListener.onKeyDown = function() {
if (Key.isDown(Key.ENTER))
{
trace("enter");
scaleHeight = _root.heightRequest;
setProperty(dragIt,_yscale,scaleHeight);
scaleWidth = _root.widthRequest;
setProperty(dragIt,_xscale,scaleWidth);
} else {
trace(String.fromCharCode(Key.getAscii()));
}
}
Key.addListener(keyListener);
I am using MX 2004 and not using input components.
Thanks in advance for any help out with this.
xcaliber
I am stuck and need some help. I have two input boxes that control the size of a movieClip, so far no problem.
The problem that I run into is, how do I set the checkBox to lock the scale or not lock the scale when a user enters numbers into the texboxes. Default is true, so it would start of locking the two input boxes.
Also, how do I convert pixels (72 per inch) into inches, so when the user enters numbers, they enter inches instead of pixels?
Here is the code that I current have to control the sizing.
keyListener = new Object();
keyListener.onKeyDown = function() {
if (Key.isDown(Key.ENTER))
{
trace("enter");
scaleHeight = _root.heightRequest;
setProperty(dragIt,_yscale,scaleHeight);
scaleWidth = _root.widthRequest;
setProperty(dragIt,_xscale,scaleWidth);
} else {
trace(String.fromCharCode(Key.getAscii()));
}
}
Key.addListener(keyListener);
I am using MX 2004 and not using input components.
Thanks in advance for any help out with this.
xcaliber