LoadMovie and Movement

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 :slight_smile:


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

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 :slight_smile: