Resizeable, draggable window

ok, i’m quite happy with draggable windows, done that.

i’m happy with resizing a movieclip.

i’ve used the tutorial at http://www.flashkit.com/tutorials/Actionscripting/Basic/Resizing-Becky_Fr-726/index.php which is all very well, but i’m creating a window to display a blog, and i’d really prefer it if when i resized the window, it didn’t scale the text up.

i was thinking maybe creating a text box on the fly and linking the size of it to the movieclip being resized (not having the textbox as part of the movieclip, but maybe sitting on top of it) to match the dimensions of the movieclip as it resizes (with a border of course).

anyone got any ideas on this ? anyone know of a tutorial on resizing windows like this and keeping the text a consistent size ?

cheers

AJ

Hello,
Can’t you remove the part of the script that resizes the text in that tute?

er, no.

the whole idea is that the button used in the script stretches the movieclip. that is, it rescales the clip, including whatever is in the clip, ie. the text.

what i was thinking of is it possible to create a text box when the movieclip is loaded, then float it on a layer above the movieclip, and when the movieclip resizes, resize the textbox accordingly ? would this keep the font size in the textbox uniform, or would it simply scale it if i changed the dimensions ?

what i want is a text box which gets larger, but doesnt “scale” it. just increases the area of visible text.

AJ

Not as easy as I expected :beam: (I’m not too good with textFields). I’ll have a look at it later.

pom :slight_smile:

cheerz (-:

Right. How about that?

rockin ! :beam:

just checking though, i see onEnterFrame there, is this recreating the text field each frame if the movieclip changes size ? or is it only created the once. i’m just asking coz i’m wondering where i might put the code to load into a variable the content i want to put into the text box.

oh, and just to make it worse, how might i go about adding a scrollbar to this ? obviouslty i can’t drop a component onto a text field which doesnt exist yet, hmmm, i’ll have to think about this :wink:

Nope, it’s change changing the width of the textField.
And you could completely create a textField manually. You just have to give it the instance name theText and remove the createTextFild line from the code. Concerning the scrollbar, I can’t get it to work for now. It doesn’t stick to the text :frowning:

obviouslty i can’t drop a component onto a text field which doesnt exist yet
Well, no, but you can attach it dynamically. There’s a tute about that at www.actionscript.org

pom :crazy:

i’ll have a play next week…