# Movie width and height

**URL:** https://forum.kirupa.com/t/movie-width-and-height/25943
**Category:** Uncategorized
**Created:** [July 17, 2003, 9:10pm UTC](https://forum.kirupa.com/t/movie-width-and-height/25943 "2003-07-17T21:10:49Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![cuerotech](https://avatars.discourse-cdn.com/v4/letter/c/8e7dd6/32.png) [@cuerotech](https://forum.kirupa.com/u/cuerotech)
#### Post date: [July 17, 2003, 9:10pm UTC](https://forum.kirupa.com/t/movie-width-and-height/25943/1 "2003-07-17T21:10:49Z")

</div>

how can i make a movie clip the same width and height of the stage using actionscript, when the width of the movie isnt known?

---

<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: [July 17, 2003, 9:17pm UTC](https://forum.kirupa.com/t/movie-width-and-height/25943/2 "2003-07-17T21:17:27Z")

</div>

[AS]myMovieClip.\_width = Stage.width;  
myMovieClip.\_height = Stage.height;[/AS]  
😉

---

<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: [July 17, 2003, 10:41pm UTC](https://forum.kirupa.com/t/movie-width-and-height/25943/3 "2003-07-17T22:41:29Z")

</div>

doesnt work. when i do that, the movie clip doesnt even show up.

---

<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: [July 17, 2003, 10:43pm UTC](https://forum.kirupa.com/t/movie-width-and-height/25943/4 "2003-07-17T22:43:25Z")

</div>

It works… :sigh:

Can you post your code?

---

<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: [July 17, 2003, 10:58pm UTC](https://forum.kirupa.com/t/movie-width-and-height/25943/5 "2003-07-17T22:58:21Z")

</div>

holder.loadMovie(“jayza8.jpg”);  
holder.\_width = Stage.width;  
holder.\_height = Stage.height;

there is one movie clip named image, with an instance name of holder. im just loading an image into and trying to make it bigger.

---

<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: [July 17, 2003, 11:05pm UTC](https://forum.kirupa.com/t/movie-width-and-height/25943/6 "2003-07-17T23:05:21Z")

</div>

When you load the SWF/JPG into the MovieClip, all (almost, actually) the properties of the MovieClip are set to their default values.

Either wait until the SWF/JPG has been fully loaded to set the values or you could use the code I posted in this thread: [http://www.kirupaforum.com/forums/showthread.php?s=&threadid=27009](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=27009)

---

<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: [July 17, 2003, 11:09pm UTC](https://forum.kirupa.com/t/movie-width-and-height/25943/7 "2003-07-17T23:09:47Z")

</div>

ohh ok. thanks. im not that experienced with actionscript… so this is kinda confusing to me, but ill give it a shot

---

<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: [July 17, 2003, 11:11pm UTC](https://forum.kirupa.com/t/movie-width-and-height/25943/8 "2003-07-17T23:11:17Z")

</div>

No problem and good luck! =)

---

<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: [July 17, 2003, 11:20pm UTC](https://forum.kirupa.com/t/movie-width-and-height/25943/9 "2003-07-17T23:20:48Z")

</div>

well i tried the code that was on that page, and it still doesnt show up when i try to change the height of it.

---

<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: [July 17, 2003, 11:26pm UTC](https://forum.kirupa.com/t/movie-width-and-height/25943/10 "2003-07-17T23:26:20Z")

</div>

haha - I wasn’t sure if it would work for the \_height/\_width properties. 😛

Preload the JPG then…  
[AS]holder.loadMovie(“jayza8.jpg”);  
this.createEmptyMovieClip(“holderPreloader”, 9876);  
holderPreloader.onEnterFrame = function() {  
if (holder.getBytesLoaded()\>0 && holder.getBytesLoaded() == holder.getBytesTotal()) {  
holder.\_width = Stage.width;  
holder.\_height = Stage.height;  
this.removeMovieClip();  
}  
};[/AS]

---

<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: [July 17, 2003, 11:27pm UTC](https://forum.kirupa.com/t/movie-width-and-height/25943/11 "2003-07-17T23:27:37Z")

</div>

k, ill try it

---

<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: [July 17, 2003, 11:29pm UTC](https://forum.kirupa.com/t/movie-width-and-height/25943/12 "2003-07-17T23:29:19Z")

</div>

youre awesome! it worked! thank you so much!

---

<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: [July 17, 2003, 11:33pm UTC](https://forum.kirupa.com/t/movie-width-and-height/25943/13 "2003-07-17T23:33:52Z")

</div>

You’re welcome. 😉

By the way, next time try to search the forum first, you’d have found the answer. 😛
