# Loading external pic in centre of grey box

**URL:** https://forum.kirupa.com/t/loading-external-pic-in-centre-of-grey-box/264455
**Category:** Uncategorized
**Created:** [June 26, 2008, 9:11am UTC](https://forum.kirupa.com/t/loading-external-pic-in-centre-of-grey-box/264455 "2008-06-26T09:11:40Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![vineet](https://avatars.discourse-cdn.com/v4/letter/v/8e8cbc/32.png) [@vineet](https://forum.kirupa.com/u/vineet)
#### Post date: [June 26, 2008, 9:11am UTC](https://forum.kirupa.com/t/loading-external-pic-in-centre-of-grey-box/264455/1 "2008-06-26T09:11:40Z")

</div>

hi everyone

i have three butons on stage and one empty movieclip container which load the external jpg images.

i want that those external images should load in the centre of the big grey box.

fla file is included

what script do i need to include in this

b1.onRelease = function(){  
\_root.container.loadMovie(“pic1.jpg”)  
}  
b2.onRelease = function(){  
\_root.container.loadMovie(“pic2.jpg”)  
}  
b3.onRelease = function(){  
\_root.container.loadMovie(“pic3.jpg”)  
}

vineet

---

<div class="post-metadata">

### Author: ![prg9](https://avatars.discourse-cdn.com/v4/letter/p/8dc957/32.png) [@prg9](https://forum.kirupa.com/u/prg9)
#### Post date: [June 26, 2008, 2:10pm UTC](https://forum.kirupa.com/t/loading-external-pic-in-centre-of-grey-box/264455/2 "2008-06-26T14:10:21Z")

</div>

[QUOTE=vineet;2349434]i want that those external images should load in the centre[/QUOTE]

Hi vineet,

I answered your question about centering images in your other thread:

> **[make loading pic load in centre](https://www.kirupa.com/forum/showthread.php?t=302144)**
>
> Got a web design/development question or just want to hang out with the most awesome people on the planet? Drop on in!

(I would recommend using the MovieClipLoader method, like your other thread as it offers more built in control)

---

<div class="post-metadata">

### Author: ![vineet](https://avatars.discourse-cdn.com/v4/letter/v/8e8cbc/32.png) [@vineet](https://forum.kirupa.com/u/vineet)
#### Post date: [June 27, 2008, 9:48am UTC](https://forum.kirupa.com/t/loading-external-pic-in-centre-of-grey-box/264455/3 "2008-06-27T09:48:48Z")

</div>

hi prg9

it was great to have your answer. it worked really as i wanted.

can u help with another thing based on same theory. this theory was for loading in levels.

now i have created the same thing but not in levels.  
i have created manually a bigmovieclip name “container” and inside it another movie “subcontainer”.  
and the script works fine with this theory also.  
but i want to know how can we make the external pic load in the centre of “container”.  
in our levels theory we have centre it according to stage.  
but now we dont have to centre it according to stage. its now according to container and subcontainer. it has nothing to do with the stage.

what should i edit or replace in that script to make it work

vineet

[quote=prg9;2349573]Hi vineet,

I answered your question about centering images in your other thread:

> **[make loading pic load in centre](https://www.kirupa.com/forum/showthread.php?t=302144)**
>
> Got a web design/development question or just want to hang out with the most awesome people on the planet? Drop on in!

(I would recommend using the MovieClipLoader method, like your other thread as it offers more built in control)[/quote]

---

<div class="post-metadata">

### Author: ![vineet](https://avatars.discourse-cdn.com/v4/letter/v/8e8cbc/32.png) [@vineet](https://forum.kirupa.com/u/vineet)
#### Post date: [June 27, 2008, 9:53am UTC](https://forum.kirupa.com/t/loading-external-pic-in-centre-of-grey-box/264455/4 "2008-06-27T09:53:07Z")

</div>

[QUOTE=prg9;2349573]Hi vineet,

I answered your question about centering images in your other thread:

> **[make loading pic load in centre](https://www.kirupa.com/forum/showthread.php?t=302144)**
>
> Got a web design/development question or just want to hang out with the most awesome people on the planet? Drop on in!

(I would recommend using the MovieClipLoader method, like your other thread as it offers more built in control)[/QUOTE]  
hi prg9

it was great to have your answer. it worked really as i wanted.

can u help with another thing based on same theory. this theory was for loading in levels.

now i have created the same thing but not in levels.  
i have created manually a bigmovieclip name “container” and inside it another movie “subcontainer”.  
and the script works fine with this theory also.  
but i want to know how can we make the external pic load in the centre of “container”.  
in our levels theory we have centre it according to stage.  
but now we dont have to centre it according to stage. its now according to container and subcontainer. it has nothing to do with the stage.

what should i edit or replace in that script to make it work

vineet
