STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
228096
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2561 · P5121

swfchan turned sixteen years old yesterday! (5may2024)

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/97199398?noj=FRM97199398-6DC" width="1" height="1"></div>

SOFA2.swf

This is the info page for
Flash #85182

(Click the ID number above for more basic data on this flash file.)


Text
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]

Instance of Symbol 81 MovieClip in Frame 326
on (press) { this.gotoAndPlay(2); }
Frame 342
stop();
Instance of Symbol 79 MovieClip in Frame 342
on (press) { _root.play(); }
Instance of Symbol 81 MovieClip in Frame 342
on (press) { this._parent.gotoAndPlay(2); }
Frame 378
stop();
Instance of Symbol 84 MovieClip "platform1" in Frame 378
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
stop();
Frame 409
stop();
Frame 425
stop();
Frame 441
stop();
Frame 442
stop();
Instance of Symbol 84 MovieClip "platform1" in Frame 442
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
on (press) { _root.play(); }
Frame 443
stop();
Frame 444
stop();
Frame 459
stop();
Frame 473
stop();
Frame 488
stop();
Frame 489
stop();
Instance of Symbol 84 MovieClip "platform1" in Frame 489
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
on (press) { this._parent.gotoAndPlay(341); }
Frame 490
stop();
Symbol 10 Button
on (release) { _root.play(); }
Symbol 11 MovieClip Frame 1
_root.stop(); PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100; if (PercentLoaded != 100) { setProperty(bar, _xscale , PercentLoaded); } else { gotoAndStop ("loaded"); }
Symbol 11 MovieClip Frame 2
gotoAndPlay (1);
Symbol 94 Button
on (release) { _root.play(); }
Symbol 109 Button
on (release) { this.gotoAndPlay("442"); }
Symbol 121 Button
on (release) { _root.play(); }

Library Items

Symbol 1 GraphicUsed by:2
Symbol 2 MovieClipUses:1Used by:11
Symbol 3 GraphicUsed by:11
Symbol 4 BitmapUsed by:5
Symbol 5 GraphicUses:4Used by:11
Symbol 6 GraphicUsed by:10
Symbol 7 GraphicUsed by:10
Symbol 8 GraphicUsed by:10
Symbol 9 GraphicUsed by:10
Symbol 10 ButtonUses:6 7 8 9Used by:11
Symbol 11 MovieClipUses:2 3 5 10Used by:Timeline
Symbol 12 GraphicUsed by:13
Symbol 13 MovieClipUses:12Used by:24  Timeline
Symbol 14 GraphicUsed by:Timeline
Symbol 15 GraphicUsed by:Timeline
Symbol 16 ShapeTweeningUsed by:Timeline
Symbol 17 GraphicUsed by:24  Timeline
Symbol 18 GraphicUsed by:19
Symbol 19 MovieClipUses:18Used by:27  Timeline
Symbol 20 GraphicUsed by:21
Symbol 21 MovieClipUses:20Used by:26  Timeline
Symbol 22 GraphicUsed by:23
Symbol 23 MovieClipUses:22Used by:26 27  Timeline
Symbol 24 MovieClipUses:13 17Used by:76  Timeline
Symbol 25 SoundUsed by:Timeline
Symbol 26 MovieClipUses:21 23Used by:76  Timeline
Symbol 27 MovieClipUses:19 23Used by:76  Timeline
Symbol 28 SoundUsed by:Timeline
Symbol 29 GraphicUsed by:44
Symbol 30 GraphicUsed by:31
Symbol 31 MovieClipUses:30Used by:42
Symbol 32 GraphicUsed by:33
Symbol 33 MovieClipUses:32Used by:42
Symbol 34 GraphicUsed by:35
Symbol 35 MovieClipUses:34Used by:42
Symbol 36 GraphicUsed by:37
Symbol 37 MovieClipUses:36Used by:42
Symbol 38 GraphicUsed by:39
Symbol 39 MovieClipUses:38Used by:42
Symbol 40 GraphicUsed by:41
Symbol 41 MovieClipUses:40Used by:42
Symbol 42 MovieClipUses:31 33 35 37 39 41Used by:43
Symbol 43 MovieClipUses:42Used by:44 47 49 51
Symbol 44 MovieClipUses:29 43Used by:Timeline
Symbol 45 SoundUsed by:Timeline
Symbol 46 GraphicUsed by:47
Symbol 47 MovieClipUses:46 43Used by:Timeline
Symbol 48 GraphicUsed by:49
Symbol 49 MovieClipUses:48 43Used by:Timeline
Symbol 50 GraphicUsed by:51
Symbol 51 MovieClipUses:50 43Used by:Timeline
Symbol 52 FontUsed 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 TextUses:52Used by:Timeline
Symbol 54 TextUses:52Used by:Timeline
Symbol 55 SoundUsed by:Timeline
Symbol 56 TextUses:52Used by:Timeline
Symbol 57 TextUses:52Used by:Timeline
Symbol 58 TextUses:52Used by:Timeline
Symbol 59 TextUses:52Used by:Timeline
Symbol 60 TextUses:52Used by:Timeline
Symbol 61 TextUses:52Used by:Timeline
Symbol 62 TextUses:52Used by:Timeline
Symbol 63 TextUses:52Used by:Timeline
Symbol 64 TextUses:52Used by:Timeline
Symbol 65 TextUses:52Used by:Timeline
Symbol 66 TextUses:52Used by:Timeline
Symbol 67 TextUses:52Used by:Timeline
Symbol 68 TextUses:52Used by:Timeline
Symbol 69 TextUses:52Used by:Timeline
Symbol 70 TextUses:52Used by:Timeline
Symbol 71 TextUses:52Used by:Timeline
Symbol 72 TextUses:52Used by:Timeline
Symbol 73 TextUses:52Used by:Timeline
Symbol 74 TextUses:52Used by:75
Symbol 75 MovieClipUses:74Used by:Timeline
Symbol 76 MovieClipUses:26 27 24Used by:Timeline
Symbol 77 GraphicUsed by:79 81
Symbol 78 TextUses:52Used by:79
Symbol 79 MovieClipUses:77 78Used by:Timeline
Symbol 80 TextUses:52Used by:81
Symbol 81 MovieClipUses:77 80Used by:Timeline
Symbol 82 GraphicUsed by:Timeline
Symbol 83 GraphicUsed by:84
Symbol 84 MovieClipUses:83Used by:Timeline
Symbol 85 GraphicUsed by:87
Symbol 86 TextUses:52Used by:87
Symbol 87 MovieClipUses:85 86Used by:Timeline
Symbol 88 GraphicUsed by:94 109 121
Symbol 89 TextUses:52Used by:91 94 109 121
Symbol 90 GraphicUsed by:91
Symbol 91 MovieClipUses:90 89Used by:94 109 121
Symbol 92 GraphicUsed by:94 109 121
Symbol 93 TextUses:52Used by:94 109 121
Symbol 94 ButtonUses:88 89 91 92 93Used by:Timeline
Symbol 95 TextUses:52Used by:Timeline
Symbol 96 GraphicUsed by:97
Symbol 97 MovieClipUses:96Used by:Timeline
Symbol 98 TextUses:52Used by:Timeline
Symbol 99 TextUses:52Used by:Timeline
Symbol 100 GraphicUsed by:Timeline
Symbol 101 EditableTextUses:52Used by:Timeline
Symbol 102 GraphicUsed by:Timeline
Symbol 103 GraphicUsed by:Timeline
Symbol 104 EditableTextUses:52Used by:Timeline
Symbol 105 EditableTextUses:52Used by:Timeline
Symbol 106 GraphicUsed by:Timeline
Symbol 107 GraphicUsed by:Timeline
Symbol 108 EditableTextUses:52Used by:Timeline
Symbol 109 ButtonUses:88 89 91 92 93Used by:Timeline
Symbol 110 GraphicUsed by:112
Symbol 111 TextUses:52Used by:112
Symbol 112 MovieClipUses:110 111Used by:Timeline
Symbol 113 TextUses:52Used by:Timeline
Symbol 114 GraphicUsed by:Timeline
Symbol 115 GraphicUsed by:Timeline
Symbol 116 TextUses:52Used by:Timeline
Symbol 117 GraphicUsed by:Timeline
Symbol 118 EditableTextUses:52Used by:Timeline
Symbol 119 GraphicUsed by:Timeline
Symbol 120 EditableTextUses:52Used by:Timeline
Symbol 121 ButtonUses:88 89 91 92 93Used by:Timeline
Symbol 122 GraphicUsed by:Timeline
Symbol 123 EditableTextUses:52Used by:Timeline
Symbol 124 GraphicUsed by:Timeline
Symbol 125 EditableTextUses:52Used by:Timeline
Symbol 126 EditableTextUses:52Used by:Timeline
Symbol 127 TextUses:52Used by:Timeline
Symbol 128 GraphicUsed by:130
Symbol 129 TextUses:52Used by:130
Symbol 130 MovieClipUses:128 129Used by:Timeline
Symbol 131 TextUses:52Used by:Timeline

Instance Names

"platform1"Frame 378Symbol 84 MovieClip
"goal"Frame 378Symbol 87 MovieClip
"ground"Frame 378Symbol 97 MovieClip
"platform1"Frame 442Symbol 84 MovieClip
"ground"Frame 442Symbol 97 MovieClip
"platform1"Frame 443Symbol 84 MovieClip
"platform1"Frame 489Symbol 84 MovieClip
"goal"Frame 489Symbol 87 MovieClip
"ground"Frame 489Symbol 97 MovieClip
"bar"Symbol 11 MovieClip Frame 1Symbol 2 MovieClip

Labels

"loaded"Symbol 11 MovieClip Frame 3




http://swfchan.com/18/85182/info.shtml
Created: 31/3 -2019 01:21:27 Last modified: 31/3 -2019 01:21:27 Server time: 06/05 -2024 10:35:02