How to bounce the ball game in flash with Actionscript 2.0



See next picture

1. Make a left and right two lines straight or bent up to you wrote you at will (as above
2. trus i made the movie clip
3. then enter the scrip actin like this
onClipEvent (enterFrame) {
if (hitTest (_root.bola)) {
_root.bola.powerx =-_root.bola.powerx;
}
}
4. ki made another circle triangle atow tow up deh but rather small in size so passssssssss and jadiakan movie clip
5. enter the action scripnya ki
onClipEvent (load) {
powerx = 10;
powerxx = 10;
}
onClipEvent (enterFrame) {
_x + = powerx;
_y + = powerxx;
}

6. after fracturing his ki mi make up and do not forget to bring a bounce make scrip action, enter the action scripnya
That under the given script:

onClipEvent (enterFrame) {
if (hitTest (_root.bola)) {
_root.bola.powerxx =-_root.bola.powerxx;
}
}
onClipEvent (enterFrame) {
if (Key.isDown (Key.UP)) {
_x -= 10;
}
if (Key.isDown (Key.DOWN)) {
_x + = 10;
}
}
7 kemudaian the above
if (hitTest (_root.bola)) {
_root.bola.powerxx =-_root.bola.powerxx;
}
}
onClipEvent (enterFrame) {
if (Key.isDown (Key.LEFT)) {
_x -= 10;
}
if (Key.isDown (Key.RIGHT)) {
_x + = 10;
}
}
8. Make a line down the wana dipaling invisible was before it made the movie clips and action scripts msukan

onClipEvent (enterFrame) {
if (_root.char.hitTest (this)) {
Type your _root.bola._x = x coordinate (this input x c0rdinat when we click on the ball)
Type your _root.bola._y = y coordinate (y c0rdinat this input when we click on the ball
}
}
9. who did not read until the end regret this because an essential step if passed all the action script is useless
here it is click the ball you trus kasikan instance name found on the bottom properties with the name ball
Thanks
Share:

1 komentar:

Main Menu Bar

Total Tayangan Halaman

Categories

as (1) cheatns (19) cheatpb (50) java (1) komputer (4) lomba (1) PS1 (1)

728x90 AdSpace

Share Everything to Support Human Life's :)

Pengikut

Popular Posts

Tags

Recent Posts