# Resizeable, draggable window

**URL:** https://forum.kirupa.com/t/resizeable-draggable-window/10908
**Category:** Uncategorized
**Created:** [January 9, 2003, 8:51am UTC](https://forum.kirupa.com/t/resizeable-draggable-window/10908 "2003-01-09T08:51:42Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![AJCrowley](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@AJCrowley](https://forum.kirupa.com/u/AJCrowley)
#### Post date: [January 9, 2003, 8:51am UTC](https://forum.kirupa.com/t/resizeable-draggable-window/10908/1 "2003-01-09T08:51:42Z")

</div>

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](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

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [January 9, 2003, 11:26am UTC](https://forum.kirupa.com/t/resizeable-draggable-window/10908/2 "2003-01-09T11:26:11Z")

</div>

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

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [January 9, 2003, 11:30am UTC](https://forum.kirupa.com/t/resizeable-draggable-window/10908/3 "2003-01-09T11:30:08Z")

</div>

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

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [January 9, 2003, 12:07pm UTC](https://forum.kirupa.com/t/resizeable-draggable-window/10908/4 "2003-01-09T12:07:48Z")

</div>

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

pom 🙂

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [January 9, 2003, 3:34pm UTC](https://forum.kirupa.com/t/resizeable-draggable-window/10908/5 "2003-01-09T15:34:47Z")

</div>

cheerz (-:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [January 9, 2003, 3:53pm UTC](https://forum.kirupa.com/t/resizeable-draggable-window/10908/6 "2003-01-09T15:53:39Z")

</div>

Right. How about that?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [January 9, 2003, 4:26pm UTC](https://forum.kirupa.com/t/resizeable-draggable-window/10908/7 "2003-01-09T16:26:04Z")

</div>

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 😉

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [January 10, 2003, 3:02pm UTC](https://forum.kirupa.com/t/resizeable-draggable-window/10908/8 "2003-01-10T15:02:42Z")

</div>

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 ☹

> 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](http://www.actionscript.org)

pom :crazy:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [January 10, 2003, 3:21pm UTC](https://forum.kirupa.com/t/resizeable-draggable-window/10908/9 "2003-01-10T15:21:29Z")

</div>

i’ll have a play next week…
