Log in

View Full Version : textbox resize.



punstc
11-12-2007, 07:43 PM
alright this might be an easy answer but for some reason i can't get it to work.

i have a text box that i want to set its width to the size of the stage width and the height 30 pixels less. and have it resize when i resize the movieclip.

here the code i'm using


Stage.scaleMode = "noScale";

//position content
var HPositioner:Number = (Math.round((Stage.width - 640) / 2));
var VPositioner:Number = (Math.round((Stage.height - 480) / 2));

function HPosition () {
var HPositioner:Number = (Math.round((Stage.width - 640) /2));

setProperty(updateText, _width, Stage.width);

}

function VPosition () {
var VPositioner:Number = (Math.round((Stage.height - 480) /2));

setProperty(updateText, _height, Stage.height - 30);

}

HPosition();
VPosition();

i want the text to automatically fill out the new adjusted text box as well. am I doing this correctly?

BLiZZaRD
11-13-2007, 01:58 AM
It's a decent start. I don't foresee any problems with it unless you want to get fancy later.

Is there a problem with it so far or are you just looking for confirmation?

punstc
11-14-2007, 04:31 AM
as far as i know its not working the way i envisioned after i resize the movieclip and move it around the text inside doesnt move to fill out the new box, if it is even changing size. Is there another piece of code needed to make it fill out the box or one to use to even check to see if it's resizing?


Thanks again Blizzard for your help.

BLiZZaRD
11-14-2007, 02:42 PM
Well I am having difficulty seeing what it is that you want me to be looking at. I understand your desires, I think I am just missing the point. Of course I have been awake for 3 & 1/2 days and that may be affecting my thoughts a tad.

Make sure you have all the properties for the font selected correctly... embedded for readability, multi line (with wrap), etc.

punstc
11-15-2007, 04:13 AM
i've checked all of that. i also found noticed the box that shows the textbox border for the first time and when i resize the movie clip the text box doesnt resize at all. i attached my file, if you would have the time. To take a look at it, def get some rest. 3 1/2 days is quite sometime.

thanks a lot

Jake

BLiZZaRD
11-15-2007, 04:49 AM
Sleep happens when the State Auditors are not at work with me! LOL I got 4 hours today though!

I have a couple other things in the queue ahead of you but I will look as soon as I can.

punstc
11-15-2007, 04:53 AM
lol damn auditors. alright thanks a lot blizzard

Jake