# SetProperty on Movie Clip

**URL:** https://forum.kirupa.com/t/setproperty-on-movie-clip/17248
**Category:** flash
**Created:** [April 3, 2003, 1:57am UTC](https://forum.kirupa.com/t/setproperty-on-movie-clip/17248 "2003-04-03T01:57:01Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Hakmed](https://avatars.discourse-cdn.com/v4/letter/h/bc8723/32.png) [@Hakmed](https://forum.kirupa.com/u/Hakmed)
#### Post date: [April 3, 2003, 1:57am UTC](https://forum.kirupa.com/t/setproperty-on-movie-clip/17248/1 "2003-04-03T01:57:01Z")

</div>

Alright ppl, last question for the week, I promise!

So I’m trying to set the width and height of a movie clip symbol. Initially, on the stage the movie clip is set to w = 400, h = 350. Whenever I load a 400x350 image on the clip (from a button), it looks way too wide. So I tried to fix this by adding setproperties for width and height on the action for the button.

[AS]  
on (release) {  
\_root.photo.\_width = 400;  
\_root.photo.\_height = 350;  
loadMovie(“pics/1.jpg”, \_root.photo);  
}  
[/AS]

The first time I click on the button, it’s still way too wide… the second time (and beyond) after that it’s fine. What can I do to fix this problem?

---

<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: [April 3, 2003, 5:34am UTC](https://forum.kirupa.com/t/setproperty-on-movie-clip/17248/2 "2003-04-03T05:34:48Z")

</div>

I would try this first.

on the button…

```auto
on (release) {
        loadMovie("pics/1.jpg", _root.photo);
}

```

… then attached to the movie clip itself I’d put this

```auto
onClipEvent(data){
        _root.photo._width = 400;
        _root.photo._height = 350;
}

```

the onClipEvent “data” fires it’s actions any time the movie clip has finished loading anything. It may be that you were setting the params initialy, but had them thrown off again by the loading of the jpg. (the clip will resize to whatever dimensions the image is that you are loading.)

let us know how that works.
