# LoadMovie and Movement

**URL:** https://forum.kirupa.com/t/loadmovie-and-movement/62203
**Category:** flash
**Created:** [August 25, 2004, 8:24pm UTC](https://forum.kirupa.com/t/loadmovie-and-movement/62203 "2004-08-25T20:24:43Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Bmoeb](https://avatars.discourse-cdn.com/v4/letter/b/59ef9b/32.png) [@Bmoeb](https://forum.kirupa.com/u/Bmoeb)
#### Post date: [August 25, 2004, 8:24pm UTC](https://forum.kirupa.com/t/loadmovie-and-movement/62203/1 "2004-08-25T20:24:43Z")

</div>

Hello there, I have a problem here that I can’t seem to figure out. What I want to do is load a image into a movie that has actionscripted movements attached to it.

The movie works fine without the loadmovie function. What I can’t seem to understand is why, when the image is loaded into the movie, I can’t get the movie to move.

What does the loadmovie function do that would cause the as to stop working.

Thanks

_Note: Has had one to many cups of coffee today, no big words please 🙂_

```auto

loadMovie("one.jpg", _root.dsc000); 
_root.dsc000._y=-1;
_root.dsc000.floor=318;
_root.dsc000.fall = -10 ;
_root.dsc000.bounce = 0.5 ;
_root.dsc000.speedy = 0;
_root.dsc000.onEnterFrame= function()
{
	 this.speedy = this.speedy + this.fall;
		this._y -= this.speedy/5;
		if(this._y > this.floor)
{	
	 this._y = this.floor;
	 this.speedy *= -this.bounce;
		 }
} 

```

---

<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: [August 25, 2004, 9:34pm UTC](https://forum.kirupa.com/t/loadmovie-and-movement/62203/2 "2004-08-25T21:34:12Z")

</div>

> [@Bmoeb](#):
>
> Hello there, I have a problem here that I can’t seem to figure out. What I want to do is load a image into a movie that has actionscripted movements attached to it.
> 
> The movie works fine without the loadmovie function. What I can’t seem to understand is why, when the image is loaded into the movie, I can’t get the movie to move.
> 
> What does the loadmovie function do that would cause the as to stop working.
> 
> Thanks
> 
> _Note: Has had one to many cups of coffee today, no big words please 🙂_
> 
> ```auto
> 
> loadMovie("one.jpg", _root.dsc000); 
> _root.dsc000._y=-1;
> _root.dsc000.floor=318;
> _root.dsc000.fall = -10 ;
> _root.dsc000.bounce = 0.5 ;
> _root.dsc000.speedy = 0;
> _root.dsc000.onEnterFrame= function()
> {
> this.speedy = this.speedy + this.fall;
> this._y -= this.speedy/5;
> if(this._y > this.floor)
> {	
> this._y = this.floor;
> this.speedy *= -this.bounce;
> }
> } 
> 
> ```

try this  
createEmptyMovieClip(“dsc000”, 1);  
function init() {  
\_root.dsc000.\_y = -1;  
\_root.dsc000.floor = 318;  
\_root.dsc000.fall = -10;  
\_root.dsc000.bounce = 0.5;  
\_root.dsc000.speedy = 0;  
\_root.dsc000.onEnterFrame = function() {  
this.speedy = this.speedy+this.fall;  
this.\_y -= this.speedy/5;  
if (this.\_y\>this.floor) {  
this.\_y = this.floor;  
this.speedy \*= -this.bounce;  
}  
};  
}  
loadMovie(“one.jpg”, \_root.dsc000);  
checkLoad = function () {  
if (dsc000.getBytesLoaded\>=dsc000.getBytesTotal) {  
clearInterval(myInterval);  
init();  
}  
};  
myInterval = setInterval(checkLoad, 50);

you will have to go to view/steaming to see

---

<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: [August 26, 2004, 5:15pm UTC](https://forum.kirupa.com/t/loadmovie-and-movement/62203/3 "2004-08-26T17:15:24Z")

</div>

Thx for the help, what I ended up doing is just placing the loaded image one level lower. I created another Movie instance inside of dsc000 and it worked fine. Your solution worked great, but when I duplicated the movie I couldn’t get it to work correctly. By moving the loaded image one level down it seemed to solve my problem, for now that is 🙂
