Skip to main content
Participant
October 6, 2006
Question

Problems with Load Movie

  • October 6, 2006
  • 3 replies
  • 253 views
Hello! I am a flash newbie who is making his first game. I would like to load a movie clip called 'ship' when the ground called "mainGround" is duplicated 7 times. Also I would like the ground to stop scrolling at this point, There is a "ground" mc inside mainGround. Here is the code:



onClipEvent (load) {

ground.duplicateMovieClip("ground2", 100);
ground2._x = ground._x+ground._width;
groundStartx = this._x;
groundSpeed=10;

}

onClipEvent (enterFrame) {

if (_root.spaceship.scrollStart){
this._x-=groundSpeed;
if (this._x<= (groundStartx-ground._width)){
this._x=groundStartx-groundSpeed;
}
}

}
Thanks to all of you! (I realize this must be a stupid question but everyone has to start, right?)
This topic has been closed for replies.

3 replies

tboparisAuthor
Participant
October 10, 2006
Thank you for helping. But i'm sorry I don't understand very well. Could you try to explain?
Note: I have a movie clip in the same flv file that i would like to be loaded when "ground.duplicateMovieClip("ground2", 100);" has been run 7 times.
Thanks
Participating Frequently
October 6, 2006
also be sure to add "this._lockroot = true;" in the main timeline of the swf file that you are loading into your movie clip if you are using _root in the ship.swf file
Inspiring
October 6, 2006
where ever you'd like to have the movie load, just add (and modify) the code...

Mc1.loadMovie("ship.swf")

This will pull the .swf file "ship.swf" from the same place as your main .swf resides, and place it in the movieclip instance of Mc1. (so you'll need to either create Mc1, or change it to another name).

Does that help?