Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

load and position a child movie clip

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi all!

I am currently making a mini-game using Flash.
Well, I got a silly question, just wondering if anyone can take some time to answer me =P

In my game, when the player click a button, I loads a child movie clip into the current movie clip, at level1
and want to position this child movie clip at a specified location.
I used the following script, attached to a button, to do the task.

on (release) {
loadMovieNum ("childMovie.swf", 1);
setProperty ("_level1/", _x, "300");
setProperty ("_level1/", _y, "280");
}


But when I test the game, as I click the button, the movie loaded and position at the (300, 280) coordinate, and immediately it re-position to (0, 0) again.
Everytime I clicked that button, the childMovie go to (300, 280) and then back to (0, 0) again...
Alternatively, I use the following scripts instead

on (press) {
loadMovieNum ("childMovie.swf", 1);
}
on (release) {
setProperty ("_level1/", _x, "300");
setProperty ("_level1/", _y, "280");
}

The output seems normal and the childMovie doesn't re-position. But when I keep holding down the mouse button, the childMovie stay at (0, 0) and go to (300, 280) as I release the button. This's not wat I expect...

Well, the only thing I want to do is to load a movie at (300, 280) everytime I click the button...
Can anyone give me some suggestion?

Thanks in advance.
 
hi,

u want the child movie to appear at(ie..300,280).one thing u can do is go to ur child movie, i mean the fla of the child movie set all the objects to the postion of where u wanted.now load the movie and see. i hope this will help u.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top