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.
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.