# Movie Loading Problem

**URL:** <https://forum.kirupa.com/t/movie-loading-problem/26169>\
**Category:** flash\
**Created:** [July 20, 2003, 3:20pm UTC](https://forum.kirupa.com/t/movie-loading-problem/26169 "2003-07-20T15:20:58Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jasninder](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@Jasninder](https://forum.kirupa.com/u/Jasninder)\
**Post date:** [July 20, 2003, 3:20pm UTC](https://forum.kirupa.com/t/movie-loading-problem/26169/1 "2003-07-20T15:20:58Z")

</div>

Hi Guys  
I have a base movie(wid links)  
size=800X600  
and i have links on it (profile, resources , contact)

now, suppose i click on resources  
i want to load a movie wid width 750X410 size on level 1wid ths script

[AS]  
on (release) {  
unloadMovieNum (1);  
loadMovieNum (“resources.swf”, 1);  
}  
[/AS]

(assuming there’s a movie already loaded at level number 1, this will be the same in every button as i have another movie named default at level 1 wid)  
But anyway, my problem is that i want to load a movie wid a smaller sized (750X410) so that i dont have to animate 800X600 movies and work on square boundry i made, it’s funny i kno =)

* * *

if u dont understand all wat i said, m just speakin in my mind as i have the movie and problem in front of me and so clear… i want to load a movie on a specific place, lets say a center…  
800X600 movie on base level\_0 wid links on it and it shud load  
750X410 movie in the center of the screen, i kno it’s positioning problem, but m confused.So bear wid my explaination.  
Thank 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:** [July 20, 2003, 9:48pm UTC](https://forum.kirupa.com/t/movie-loading-problem/26169/2 "2003-07-20T21:48:37Z")

</div>

1. you don’t need to unload a movie. If you load another movie, the pervious one will automaticly be erased.

2. To center a movie:

if(\_level1.getBytesTotal()/\_level1.getBytesLoaded()) {  
\_level1.\_x = (800-\_level1.\_width)/2;  
\_level1.\_y = (600-\_level1.\_height)/2;  
}

---

<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 21, 2003, 8:14am UTC](https://forum.kirupa.com/t/movie-loading-problem/26169/3 "2003-07-21T08:14:44Z")

</div>

Cool, thanx [M] =)  
I am gona try this and yea dis not a cd presentation so i dont have to use the get byte line.I ll do that riteaway and post my problems if any.

---

<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 21, 2003, 8:36am UTC](https://forum.kirupa.com/t/movie-loading-problem/26169/4 "2003-07-21T08:36:24Z")

</div>

it’s not working or i m doing something dumb ☹  
my main movie has all the links and from there i m calling the movies at level 1 and level 1 movie shud load itself in the center of the screen.I want to learn how to position a movie at some specific place, lets not take center as a criteria.Its a cd presentation,but i d love to learn it all for the web aswell.  
it’s like  
load movie 1.swf \_x= \_y=  
i dont kno exactly.  
i want to load a movie at a specif position.

---

<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 21, 2003, 8:38am UTC](https://forum.kirupa.com/t/movie-loading-problem/26169/5 "2003-07-21T08:38:26Z")

</div>

code  
[AS]  
on (release) {  
loadMovieNum (“1.swf”, 1);  
\_level1.\_x = (800-\_level1.\_width)/2;  
\_level1.\_y = (600-\_level1.\_height)/2;  
}  
[/AS]  
am i doing something wrong here?

---

<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 24, 2003, 7:01am UTC](https://forum.kirupa.com/t/movie-loading-problem/26169/6 "2003-07-24T07:01:50Z")

</div>

so i guess no one is ready to help ha?  
Time for desperate measures !! 😛

---

<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 24, 2003, 2:11pm UTC](https://forum.kirupa.com/t/movie-loading-problem/26169/7 "2003-07-24T14:11:00Z")

</div>

hi man!  
i suggest you place it in a MC… say  
//create and empty mc  
\_root.createEmptyMovieClip(“clip”,0);  
[AS]  
loadMovie(“jaz.swf”,clip);  
clip.\_x=(Stage.width-clip.\_width)/2;  
clip.\_y=(Stage.height-clip.\_height)/2;  
[/AS]  
where “clip” is a MC where you load your stuff…

but if the alignment doesnt seem to center still… you can make a loop until the movie is fully loaded… or create an enterframe function and delete the enterframe after a couple of seconds…

```auto

_root.createEmptyMovieClip("clip",0);
loadMovie("sample.swf",clip)
this.onEnterFrame=function(){
clip._x=(Stage.width-clip._width)/2;
clip._y=(Stage.height-clip._height)/2;
}

```

…hope that helps…

---

<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 27, 2003, 5:02pm UTC](https://forum.kirupa.com/t/movie-loading-problem/26169/8 "2003-07-27T17:02:15Z")

</div>

nox i will do as u said in other projects, but this one is complete and i m just curious how to do wat i was tryn to do… loading an external swf file on a perticular position =)  
Thanx for ur suggestion, i m gona try it.
