# Resizing a loaded swf

**URL:** https://forum.kirupa.com/t/resizing-a-loaded-swf/12030
**Category:** Uncategorized
**Created:** [January 25, 2003, 6:45pm UTC](https://forum.kirupa.com/t/resizing-a-loaded-swf/12030 "2003-01-25T18:45:37Z")
**Posts on this page:** 19
**Page:** 1

<div class="post-metadata">

### Author: ![zephn](https://avatars.discourse-cdn.com/v4/letter/z/5f8ce5/32.png) [@zephn](https://forum.kirupa.com/u/zephn)
#### Post date: [January 25, 2003, 6:45pm UTC](https://forum.kirupa.com/t/resizing-a-loaded-swf/12030/1 "2003-01-25T18:45:37Z")

</div>

This forum is amazing for answers but I couldn’t find this one.

I have a flash movie.  
I am loading a .swf I wish to size down to 1/10th it’s size.  
I have a empty movie clip called container in which I am loading the swf called logo. The instance name for the container movie clip is logo. What can i do to size it down?

Thanks

---

<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 25, 2003, 7:51pm UTC](https://forum.kirupa.com/t/resizing-a-loaded-swf/12030/2 "2003-01-25T19:51:49Z")

</div>

change the containers \_width and \_height or \_xscale and \_yscale.

\_width and \_height size by pixels

\_xscale and \_yscale size by percentage of original size.

---

<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 25, 2003, 10:25pm UTC](https://forum.kirupa.com/t/resizing-a-loaded-swf/12030/3 "2003-01-25T22:25:04Z")

</div>

onclipEvent(load) {  
spin.\_width = 50;  
spin.\_height = 50;  
}

do i apply this to my movie clip, my actions frame or have i even coded it right?  
When I tes my movie I get this

Scene=Scene 2, Layer=logobar, Frame=1: Line 2: ‘;’ expected  
onclipEvent(load) {

---

<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 25, 2003, 10:52pm UTC](https://forum.kirupa.com/t/resizing-a-loaded-swf/12030/4 "2003-01-25T22:52:19Z")

</div>

spin.\_width = 50;  
spin.\_height = 50;

Yes, that is correct, and you can put it wherever you want. If you want it to resize when the button is pressed, use it in the on handler on your button, if you want it when a clip loads, put it in the onClipEvent handler, and if you want it when a frame enters, put it in a frame.

Perhaps you are getting the error because it is onClipEvent not onclipEvent.

---

<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 25, 2003, 10:53pm UTC](https://forum.kirupa.com/t/resizing-a-loaded-swf/12030/5 "2003-01-25T22:53:16Z")

</div>

> \*Originally posted by lostinbeta \*  
> \*\*Perhaps you are getting the error because it is onClipEvent not onclipEvent. \*\*

Doesn’t make any difference actually.

---

<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 25, 2003, 10:55pm UTC](https://forum.kirupa.com/t/resizing-a-loaded-swf/12030/6 "2003-01-25T22:55:07Z")

</div>

I just tested it, it does make a difference.

I know there are some commands in Flash that ARE case sensitive. This is one of them.

---

<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 25, 2003, 10:56pm UTC](https://forum.kirupa.com/t/resizing-a-loaded-swf/12030/7 "2003-01-25T22:56:30Z")

</div>

Hmm, LoadVars = loadvars, onenterframe = onEnterFrame, never tried onclipevent. :-\

---

<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 25, 2003, 10:58pm UTC](https://forum.kirupa.com/t/resizing-a-loaded-swf/12030/8 "2003-01-25T22:58:28Z")

</div>

Yeah… I remember having trouble with this once before (for a different command) and it was the case that screwed it up. It took me forever to figure it out. Now I try to get the right case for everything.

---

<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 25, 2003, 10:58pm UTC](https://forum.kirupa.com/t/resizing-a-loaded-swf/12030/9 "2003-01-25T22:58:37Z")

</div>

oh lol \*\*\*\*!! :x :stunned:

> Scene=Scene 1, Layer=Layer 1, Frame=1: Line 1: ‘;’ expected  
> onclipevent (load){

---

<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 25, 2003, 10:59pm UTC](https://forum.kirupa.com/t/resizing-a-loaded-swf/12030/10 "2003-01-25T22:59:21Z")

</div>

lol :trout:

---

<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 25, 2003, 11:03pm UTC](https://forum.kirupa.com/t/resizing-a-loaded-swf/12030/11 "2003-01-25T23:03:29Z")

</div>

hey … i didn’t know there’s some case sensitive commands :!:

lucky me … i always use the right ones  
but i always forget about semi colons

---

<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 25, 2003, 11:10pm UTC](https://forum.kirupa.com/t/resizing-a-loaded-swf/12030/12 "2003-01-25T23:10:41Z")

</div>

Well now ya know 😉

---

<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 25, 2003, 11:16pm UTC](https://forum.kirupa.com/t/resizing-a-loaded-swf/12030/13 "2003-01-25T23:16:24Z")

</div>

Do you guys get mistaken with ‘as’ terms as variables, because it doesn’t work with some of them, it’s kind of obvious that you shouldn’t use 'em!

---

<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 25, 2003, 11:19pm UTC](https://forum.kirupa.com/t/resizing-a-loaded-swf/12030/14 "2003-01-25T23:19:07Z")

</div>

No, I don’t. If my variable is the same as an AS term I usually shove the word “my” in front of it.

Like “text” would turn into “myText”.

---

<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 25, 2003, 11:20pm UTC](https://forum.kirupa.com/t/resizing-a-loaded-swf/12030/15 "2003-01-25T23:20:13Z")

</div>

Same here, myLoadvars, but i use TextField, it works lol!

---

<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 25, 2003, 11:23pm UTC](https://forum.kirupa.com/t/resizing-a-loaded-swf/12030/16 "2003-01-25T23:23:27Z")

</div>

LOL 🙂

---

<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 25, 2003, 11:29pm UTC](https://forum.kirupa.com/t/resizing-a-loaded-swf/12030/17 "2003-01-25T23:29:20Z")

</div>

i add the first word that comes to my mind … jk 😛

example … if i’m loading external text for my news text field

the variable would be like this:  
newsText

and the actual text field would be:  
newsTextBox [i love the ‘x’ so i use it as much as i can 😛]

---

<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 25, 2003, 11:37pm UTC](https://forum.kirupa.com/t/resizing-a-loaded-swf/12030/18 "2003-01-25T23:37:22Z")

</div>

I have a logo I go in swf format but not the fla.  
I want to load it into an empty movie clip which has been given the instance name spin.  
I Have tried the  
onClipEvent (load) {  
spin.\_width=50;  
sping.\_height=50;  
}  
And I get no code errors now that I have corrected the upper and lower case error. My swf is still loading at full size and not changing.  
My theory is that I may be changing the “blank” movie clips size but it is not affecting the loaded .swf.  
Any solution?

PS your advice is awesoem guys:)

---

<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 25, 2003, 11:51pm UTC](https://forum.kirupa.com/t/resizing-a-loaded-swf/12030/19 "2003-01-25T23:51:15Z")

</div>

Try using \_xscale and \_yscale instead of \_width and \_height.

Does it make any difference?

Also… perhaps you just type it in the message like that, but for the height you have “sping” not “spin”.
