| STORY LOOP FURRY PORN GAMES • C • SERVICES [?] [R] RND POPULAR | Archived flashes: 229941 |
/disc/ · /res/ — /show/ · /fap/ · /gg/ · /swf/ | P0001 · P2599 · P5197 |
![]() | This is the info page for Flash #85182 |
T |
T |
TU |
TU |
TUT |
TUT |
TUTO |
TUTO |
TUTOR |
TUTOR |
TUTORI |
TUTORI |
TUTORIA |
TUTORIA |
TUTORIAL |
TUTORIAL |
TUTORIALS |
TUTORIALS |
TUTORIALS| |
TUTORIALS| |
Simple Side-Scrolling Game Including Goal |
START TUTORIAL |
REPLAY BEGINNING |
GOAL |
NEXT |
NEXT |
Click this or touch the Goal to continue! |
This is S.O.F.A. (Super Ominous Flash Assistant) again. My last tutorial was pretty bad, so I'm gonna do something more people want to know about. Here is what we are going to be making: (Use the left and right arrow keys and space to move and jump) |
You will need to know the following! hitTest: what happens when a movie clip touches another. x and y: basically up and down and left and right. |
Make a ball like below, right click it, and click Convert to Symbol. It doesn't matter what type of Symbol it is but it CAN'T be a Graphic. It doesn't need a specific name. |
Now go to Actions and copy and paste the following actionscript (sorry for the smallness!): |
onClipEvent (load) { moveSpeed = 10;}onClipEvent (enterFrame) { if (Key.isDown(Key.RIGHT)) { this._x += moveSpeed; } else if (Key.isDown(Key.UP)) { this._y -= 0; } else if (Key.isDown(Key.DOWN) && !fall) { this._y += 0; } else if (Key.isDown(Key.LEFT)) { this._x -= moveSpeed; }}onClipEvent (enterFrame) { if (Key.isDown(Key.SPACE) && !jumping) { vel_y = 36; jumping = true; } if (jumping == true) { vel_y -= 2; if (vel_y<=-15) { vel_y = -15; } this._y -= vel_y; } if (_root.ground.hitTest(this._x, this._y+35, true)) { vel_y = 0; jumping = false; }}onClipEvent (enterFrame) { this._y += 16; if (_root.ground.hitTest(this._x, this._y+1, true)) { this._y -= 16; }} |
Convert the rectangle into a movieclip, go to Properties, and in the Instance name box, type in GROUND |
My character's halfway through the ground! |
It should work like this: |
Double click on the ball, and make sure the cross is near the bottom. You may have to adjust it a little to make it work. |
Now make an object labeled, "goal" or whatever. Convert it into a movieclip, then go to Properties and give it the Instance Name GOAL |
Insert a blank keyframe then click on frame 1, go to Actions, and give it the following actionscript: stop(); You can go ahead and do that to the second frame. |
On the second frame (with stop();) make something that says, You won! or whatever. Whatever you do don't say you lose (in case you're retarded O_o). |
Go back and click on the ball. Copy and paste this actionscript under the other one: |
onClipEvent (enterFrame) { if (this.hitTest(_root.goal)) { this._parent.gotoAndPlay(2); } } |
THE FINAL RESULT! |
REDO TUTORIAL |
YOU WON! CONGRATULATIONS!! YOU ALSO FINISHED THE TUTORIAL, SO GIVE YOURSELF A PAT ON THE BACK!!! W00T!!!! |
ActionScript [AS1/AS2] (6.19 KiB)
Instance of Symbol 81 MovieClip in Frame 326 (36 B)on (press) { this.gotoAndPlay(2); }Frame 342 (8 B)stop();Instance of Symbol 79 MovieClip in Frame 342 (29 B)on (press) { _root.play(); }Instance of Symbol 81 MovieClip in Frame 342 (44 B)on (press) { this._parent.gotoAndPlay(2); }Frame 378 (8 B)stop();Instance of Symbol 84 MovieClip "platform1" in Frame 378 (864 B)onClipEvent (load) { moveSpeed = 10; } onClipEvent (enterFrame) { if (Key.isDown(39)) { this._x = this._x + moveSpeed; } else if (Key.isDown(38)) { this._y = this._y - 0; } else if (Key.isDown(40) && (!fall)) { this._y = this._y + 0; } else if (Key.isDown(37)) { this._x = this._x - moveSpeed; } } onClipEvent (enterFrame) { if (Key.isDown(32) && (!jumping)) { vel_y = 36; jumping = true; } if (jumping == true) { vel_y = vel_y - 2; if (vel_y <= -15) { vel_y = -15; } this._y = this._y - vel_y; } if (_root.ground.hitTest(this._x, this._y + 35, true)) { vel_y = 0; jumping = false; } } onClipEvent (enterFrame) { this._y = this._y + 16; if (_root.ground.hitTest(this._x, this._y + 1, true)) { this._y = this._y - 16; } } onClipEvent (enterFrame) { if (this.hitTest(_root.goal)) { _root.play(); } }Frame 393 (8 B)stop();Frame 409 (8 B)stop();Frame 425 (8 B)stop();Frame 441 (8 B)stop();Frame 442 (8 B)stop();Instance of Symbol 84 MovieClip "platform1" in Frame 442 (881 B)onClipEvent (load) { moveSpeed = 10; } onClipEvent (enterFrame) { if (Key.isDown(39)) { this._x = this._x + moveSpeed; } else if (Key.isDown(38)) { this._y = this._y - 0; } else if (Key.isDown(40) && (!fall)) { this._y = this._y + 0; } else if (Key.isDown(37)) { this._x = this._x - moveSpeed; } } onClipEvent (enterFrame) { if (Key.isDown(32) && (!jumping)) { vel_y = 36; jumping = true; } if (jumping == true) { vel_y = vel_y - 2; if (vel_y <= -15) { vel_y = -15; } this._y = this._y - vel_y; } if (_root.ground.hitTest(this._x, this._y + 35, true)) { vel_y = 0; jumping = false; } } onClipEvent (enterFrame) { this._y = this._y + 16; if (_root.ground.hitTest(this._x, this._y + 1, true)) { this._y = this._y - 16; } } onClipEvent (enterFrame) { if (this.hitTest(_root.goal)) { this._parent.gotoAndPlay(377); } }Instance of Symbol 112 MovieClip in Frame 442 (29 B)on (press) { _root.play(); }Frame 443 (8 B)stop();Frame 444 (8 B)stop();Frame 459 (8 B)stop();Frame 473 (8 B)stop();Frame 488 (8 B)stop();Frame 489 (8 B)stop();Instance of Symbol 84 MovieClip "platform1" in Frame 489 (864 B)onClipEvent (load) { moveSpeed = 10; } onClipEvent (enterFrame) { if (Key.isDown(39)) { this._x = this._x + moveSpeed; } else if (Key.isDown(38)) { this._y = this._y - 0; } else if (Key.isDown(40) && (!fall)) { this._y = this._y + 0; } else if (Key.isDown(37)) { this._x = this._x - moveSpeed; } } onClipEvent (enterFrame) { if (Key.isDown(32) && (!jumping)) { vel_y = 36; jumping = true; } if (jumping == true) { vel_y = vel_y - 2; if (vel_y <= -15) { vel_y = -15; } this._y = this._y - vel_y; } if (_root.ground.hitTest(this._x, this._y + 35, true)) { vel_y = 0; jumping = false; } } onClipEvent (enterFrame) { this._y = this._y + 16; if (_root.ground.hitTest(this._x, this._y + 1, true)) { this._y = this._y - 16; } } onClipEvent (enterFrame) { if (this.hitTest(_root.goal)) { _root.play(); } }Instance of Symbol 130 MovieClip in Frame 489 (46 B)on (press) { this._parent.gotoAndPlay(341); }Frame 490 (8 B)stop();Symbol 10 Button (31 B)on (release) { _root.play(); }Symbol 11 MovieClip Frame 1 (200 B)_root.stop(); PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100; if (PercentLoaded != 100) { setProperty(bar, _xscale , PercentLoaded); } else { gotoAndStop ("loaded"); }Symbol 11 MovieClip Frame 2 (17 B)gotoAndPlay (1);Symbol 94 Button (31 B)on (release) { _root.play(); }Symbol 109 Button (42 B)on (release) { this.gotoAndPlay("442"); }Symbol 121 Button (31 B)on (release) { _root.play(); }
Library Items (9.07 KiB)
Symbol 1 Graphic | Used by:2 | ||
Symbol 2 MovieClip | Uses:1 | Used by:11 | |
Symbol 3 Graphic | Used by:11 | ||
Symbol 4 Bitmap | Used by:5 | ||
Symbol 5 Graphic | Uses:4 | Used by:11 | |
Symbol 6 Graphic | Used by:10 | ||
Symbol 7 Graphic | Used by:10 | ||
Symbol 8 Graphic | Used by:10 | ||
Symbol 9 Graphic | Used by:10 | ||
Symbol 10 Button | Uses:6 7 8 9 | Used by:11 | |
Symbol 11 MovieClip | Uses:2 3 5 10 | Used by:Timeline | |
Symbol 12 Graphic | Used by:13 | ||
Symbol 13 MovieClip | Uses:12 | Used by:24 Timeline | |
Symbol 14 Graphic | Used by:Timeline | ||
Symbol 15 Graphic | Used by:Timeline | ||
Symbol 16 ShapeTweening | Used by:Timeline | ||
Symbol 17 Graphic | Used by:24 Timeline | ||
Symbol 18 Graphic | Used by:19 | ||
Symbol 19 MovieClip | Uses:18 | Used by:27 Timeline | |
Symbol 20 Graphic | Used by:21 | ||
Symbol 21 MovieClip | Uses:20 | Used by:26 Timeline | |
Symbol 22 Graphic | Used by:23 | ||
Symbol 23 MovieClip | Uses:22 | Used by:26 27 Timeline | |
Symbol 24 MovieClip | Uses:13 17 | Used by:76 Timeline | |
Symbol 25 Sound | Used by:Timeline | ||
Symbol 26 MovieClip | Uses:21 23 | Used by:76 Timeline | |
Symbol 27 MovieClip | Uses:19 23 | Used by:76 Timeline | |
Symbol 28 Sound | Used by:Timeline | ||
Symbol 29 Graphic | Used by:44 | ||
Symbol 30 Graphic | Used by:31 | ||
Symbol 31 MovieClip | Uses:30 | Used by:42 | |
Symbol 32 Graphic | Used by:33 | ||
Symbol 33 MovieClip | Uses:32 | Used by:42 | |
Symbol 34 Graphic | Used by:35 | ||
Symbol 35 MovieClip | Uses:34 | Used by:42 | |
Symbol 36 Graphic | Used by:37 | ||
Symbol 37 MovieClip | Uses:36 | Used by:42 | |
Symbol 38 Graphic | Used by:39 | ||
Symbol 39 MovieClip | Uses:38 | Used by:42 | |
Symbol 40 Graphic | Used by:41 | ||
Symbol 41 MovieClip | Uses:40 | Used by:42 | |
Symbol 42 MovieClip | Uses:31 33 35 37 39 41 | Used by:43 | |
Symbol 43 MovieClip | Uses:42 | Used by:44 47 49 51 | |
Symbol 44 MovieClip | Uses:29 43 | Used by:Timeline | |
Symbol 45 Sound | Used by:Timeline | ||
Symbol 46 Graphic | Used by:47 | ||
Symbol 47 MovieClip | Uses:46 43 | Used by:Timeline | |
Symbol 48 Graphic | Used by:49 | ||
Symbol 49 MovieClip | Uses:48 43 | Used by:Timeline | |
Symbol 50 Graphic | Used by:51 | ||
Symbol 51 MovieClip | Uses:50 43 | Used by:Timeline | |
Symbol 52 Font | Used by:53 54 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 78 80 86 89 93 95 98 99 101 104 105 108 111 113 116 118 120 123 125 126 127 129 131 | ||
Symbol 53 Text | Uses:52 | Used by:Timeline | |
Symbol 54 Text | Uses:52 | Used by:Timeline | |
Symbol 55 Sound | Used by:Timeline | ||
Symbol 56 Text | Uses:52 | Used by:Timeline | |
Symbol 57 Text | Uses:52 | Used by:Timeline | |
Symbol 58 Text | Uses:52 | Used by:Timeline | |
Symbol 59 Text | Uses:52 | Used by:Timeline | |
Symbol 60 Text | Uses:52 | Used by:Timeline | |
Symbol 61 Text | Uses:52 | Used by:Timeline | |
Symbol 62 Text | Uses:52 | Used by:Timeline | |
Symbol 63 Text | Uses:52 | Used by:Timeline | |
Symbol 64 Text | Uses:52 | Used by:Timeline | |
Symbol 65 Text | Uses:52 | Used by:Timeline | |
Symbol 66 Text | Uses:52 | Used by:Timeline | |
Symbol 67 Text | Uses:52 | Used by:Timeline | |
Symbol 68 Text | Uses:52 | Used by:Timeline | |
Symbol 69 Text | Uses:52 | Used by:Timeline | |
Symbol 70 Text | Uses:52 | Used by:Timeline | |
Symbol 71 Text | Uses:52 | Used by:Timeline | |
Symbol 72 Text | Uses:52 | Used by:Timeline | |
Symbol 73 Text | Uses:52 | Used by:Timeline | |
Symbol 74 Text | Uses:52 | Used by:75 | |
Symbol 75 MovieClip | Uses:74 | Used by:Timeline | |
Symbol 76 MovieClip | Uses:26 27 24 | Used by:Timeline | |
Symbol 77 Graphic | Used by:79 81 | ||
Symbol 78 Text | Uses:52 | Used by:79 | |
Symbol 79 MovieClip | Uses:77 78 | Used by:Timeline | |
Symbol 80 Text | Uses:52 | Used by:81 | |
Symbol 81 MovieClip | Uses:77 80 | Used by:Timeline | |
Symbol 82 Graphic | Used by:Timeline | ||
Symbol 83 Graphic | Used by:84 | ||
Symbol 84 MovieClip | Uses:83 | Used by:Timeline | |
Symbol 85 Graphic | Used by:87 | ||
Symbol 86 Text | Uses:52 | Used by:87 | |
Symbol 87 MovieClip | Uses:85 86 | Used by:Timeline | |
Symbol 88 Graphic | Used by:94 109 121 | ||
Symbol 89 Text | Uses:52 | Used by:91 94 109 121 | |
Symbol 90 Graphic | Used by:91 | ||
Symbol 91 MovieClip | Uses:90 89 | Used by:94 109 121 | |
Symbol 92 Graphic | Used by:94 109 121 | ||
Symbol 93 Text | Uses:52 | Used by:94 109 121 | |
Symbol 94 Button | Uses:88 89 91 92 93 | Used by:Timeline | |
Symbol 95 Text | Uses:52 | Used by:Timeline | |
Symbol 96 Graphic | Used by:97 | ||
Symbol 97 MovieClip | Uses:96 | Used by:Timeline | |
Symbol 98 Text | Uses:52 | Used by:Timeline | |
Symbol 99 Text | Uses:52 | Used by:Timeline | |
Symbol 100 Graphic | Used by:Timeline | ||
Symbol 101 EditableText | Uses:52 | Used by:Timeline | |
Symbol 102 Graphic | Used by:Timeline | ||
Symbol 103 Graphic | Used by:Timeline | ||
Symbol 104 EditableText | Uses:52 | Used by:Timeline | |
Symbol 105 EditableText | Uses:52 | Used by:Timeline | |
Symbol 106 Graphic | Used by:Timeline | ||
Symbol 107 Graphic | Used by:Timeline | ||
Symbol 108 EditableText | Uses:52 | Used by:Timeline | |
Symbol 109 Button | Uses:88 89 91 92 93 | Used by:Timeline | |
Symbol 110 Graphic | Used by:112 | ||
Symbol 111 Text | Uses:52 | Used by:112 | |
Symbol 112 MovieClip | Uses:110 111 | Used by:Timeline | |
Symbol 113 Text | Uses:52 | Used by:Timeline | |
Symbol 114 Graphic | Used by:Timeline | ||
Symbol 115 Graphic | Used by:Timeline | ||
Symbol 116 Text | Uses:52 | Used by:Timeline | |
Symbol 117 Graphic | Used by:Timeline | ||
Symbol 118 EditableText | Uses:52 | Used by:Timeline | |
Symbol 119 Graphic | Used by:Timeline | ||
Symbol 120 EditableText | Uses:52 | Used by:Timeline | |
Symbol 121 Button | Uses:88 89 91 92 93 | Used by:Timeline | |
Symbol 122 Graphic | Used by:Timeline | ||
Symbol 123 EditableText | Uses:52 | Used by:Timeline | |
Symbol 124 Graphic | Used by:Timeline | ||
Symbol 125 EditableText | Uses:52 | Used by:Timeline | |
Symbol 126 EditableText | Uses:52 | Used by:Timeline | |
Symbol 127 Text | Uses:52 | Used by:Timeline | |
Symbol 128 Graphic | Used by:130 | ||
Symbol 129 Text | Uses:52 | Used by:130 | |
Symbol 130 MovieClip | Uses:128 129 | Used by:Timeline | |
Symbol 131 Text | Uses:52 | Used by:Timeline |
Instance Names (788 B)
"platform1" | Frame 378 | Symbol 84 MovieClip |
"goal" | Frame 378 | Symbol 87 MovieClip |
"ground" | Frame 378 | Symbol 97 MovieClip |
"platform1" | Frame 442 | Symbol 84 MovieClip |
"ground" | Frame 442 | Symbol 97 MovieClip |
"platform1" | Frame 443 | Symbol 84 MovieClip |
"platform1" | Frame 489 | Symbol 84 MovieClip |
"goal" | Frame 489 | Symbol 87 MovieClip |
"ground" | Frame 489 | Symbol 97 MovieClip |
"bar" | Symbol 11 MovieClip Frame 1 | Symbol 2 MovieClip |
Labels (108 B)
"loaded" | Symbol 11 MovieClip Frame 3 |
|
|