Control
1. Production of 1-dimensional ball, 1-arrow button and 2 magnifying glass buttons ("+" and "-") components, according to their own preferences design shape and style;
2. Drag the movie you made above into the scene, then copy the three arrow buttons and rotate them up, down, left, and right, respectively. Adjust the position of each component;
3. Take an instance name for the ball, such as: "Qiu";
4. Next, write the buttons as:
Up button:
On (release) {
SetProperty ("/qiu", _y, (GetProperty ("/qiu", _y))-10);
}
Down button:
On (release) {
SetProperty ("/qiu", _y, (GetProperty ("/qiu", _y)) +10);
}
Left button:
On (release) {
SetProperty ("/qiu", _x, (GetProperty ("/qiu", _x))-10);
SetProperty ("/qiu", _rotation, (GetProperty ("/qiu", _rotation))-10);
}
Right button:
On (release) {
SetProperty ("/qiu", _x, (GetProperty ("/qiu", _x)) +10);
SetProperty ("/qiu", _rotation, (GetProperty ("/qiu", _rotation)) +10);
}
Zoom Out button:
On (release) {
SetProperty ("/qiu", _xscale, (GetProperty ("/qiu", _xscale)) *0.9);
SetProperty ("/qiu", _y, "");
SetProperty ("/qiu", _yscale, (GetProperty ("/qiu", _yscale)) *0.9);
}
Zoom button:
On (release) {
SetProperty ("/qiu", _xscale, (GetProperty ("/qiu", _xscale)) *1.1);
SetProperty ("/qiu", _yscale, (GetProperty ("/qiu", _yscale)) *1.1);
}
5.OK, all finished, Ctrl+enter test film.