1.membuat movie clip namanya "pointer"
,
2.frame name "variables"
inc = 5; // number of pixels in each pointer move
canvas_width = 176; // screen width of target device
canvas_height = 208; // screen height of target device
// set starting position in upper left corner
pointer_regpoint = 9; // registration point pixel distance from left edge of mc (tilted mc)
pointer_offset = pointer.width - pointer_regpoint;
pointer._x = pointer._width - pointer_offset; // shift position according to registration point
pointer._y = 0;
// set range for pointer so it will not go off screen
max_pointer_x = canvas_width; // right most position of pointer
min_pointer_x = pointer._width - 1; // left most posiition of pointer
max_pointer_y = canvas_height - pointer._height; // bottom most position of pointer
min_pointer_y = 0; // top most position of pointer
,
3 membuat button
on(keyPress "<Left>"){
nextpos = pointer._x - inc; // find next position
if(nextpos > min_pointer_x){ // not at edge, move pointer
pointer._x = pointer._x - inc;
} else {
pointer._x = min_pointer_x; // at edge, reset pointer
}
}
on(keyPress "<Right>"){
nextpos = pointer._x + inc; // find next position
if(nextpos < max_pointer_x){ // not at edge move pointer
pointer._x = pointer._x + inc;
} else {
pointer._x = max_pointer_x; // at edge, reset position
}
}
,
4.yang saya bingungin ketika movie klip menekan tombol button itu skrip y gimana mas bro......Mohon pencerahan y



LinkBack URL
About LinkBacks


Reply With Quote

Bookmarks