Hey @DevNote! What did you use to learn ActionScript? I am looking for a book to study off of and did not know if you knew of any or any good detailed tutorials.
hello, um i just wanted to say that i was wondering if there was a thing for people that want it to side scroll once you get to the right of the screen... please help!
Found an answer to another question thanks to this. Thanks for typing it all out instead of just offering a copy/paste in the desc. I would recommend that you add in-video links to the next/previous video for easy navigation, by the way.
Also... for the movement bit of code, I wanted to simplify it for you...
I've taken your tutorial (great one, btw) and I'm trying to animate my character, but I can't really seem to make it work. I've just put "_player.gotoAndPlay(1);" under "case 38:" in the keyDown handler, which, if it worked, should make it run continuously from frames 1 to 5, a running animation, nested in the movieclip. Any idea why this doesn't work? I'm pulling my hair out here!
@cpetersen1610 sorry, but this is one of those flash ide issues (as opposed to purely actionscript-based issue) that's too broad for me to try to deduce the solution based only on the given facts.
but i can give you a simple tip: try creating a new, dummy flash app wherein you only have the bare minimums to test out the triggering of animation based on hard code; the triggering of code based on key input; then the triggering of animation based on key input.
haha.. yeah, i just realized that i've overlooked at least two things in my "adjustments":
1) we now have to test for the BOUNDARY's y-position to detect a reset (not the PLAYER's y-position), b/c the player always stays vertically centered now, but the boundary moves up and down; and
2) the y coordinate of the boundaries needs to be reset as well when respawning (currently, we're only resetting the x-coordinate).
if that's not enough info, i'll post the details when i get off work ;)
If you take a look at the stage scrolling function (at 6 minutes into part 3 of this tutorial series), you end up with two lines that take care of the horizontal scrolling. All you have to do is copy those two lines, then paste the copy just below the original two lines, then replace all instances of "x" with "y" and replace all instances of "stageWidth" with "stageHeight."
.. at least, it works in my mind.. heh, so if that works for you, please post back and let the rest of us know. thanks!
oh, i'm sure it's pretty obvious, but just to be clear, i meant "replace all instances of x and stageWidth with y and stageHeight IN THE TWO LINES YOU JUST COPIED"
do you mean that, when running the final product, the game screen doesn't follow the player as it moves up and down (the way it follows the player sideways by "scrolling")?
just want to make sure before posting a solution :)
oh, i see what you're saying. i can think of one of two most likely possibilities here:
1) you forgot to double-click on the player object, and therefore are not actually editing the player movie clip, but rather, the orientation of the player clip on the stage; or
2) you DID double click it, and you ARE adjusting the crosshairs, but it doesn't look like it, b/c "moving the crosshair" actually involves moving the player within the player view. in this case, the crosshair changes will become visible/apparent after exiting to the stage view.
sorry, i tried to figure out what you're saying isn't working at 2:55, but i'm still not sure.. are you saying you aren't able to set coordinates for your 'Player' movie clilp object?
i think your problem is most likely caused by a typo. do a quick search to make sure there's not more than one "package" in your entire code file. also, also consider checking out the website indicated in the video annotation for a link to a website with the original file. hope that helps!
it's a bit of a stretch for me to try to figure out what's wrong without looking at it myself, but my next best guess is that, maybe you've pasted the code directly into the timeline instead of creating a separate actionscript file to be referenced by your flash file via the document class field? (see 4:18 of this vid)
Dude this is seriously one of the best side scrolling tutorials out there!!!! You have to post the advanced engine tutorial! I'm really interested in seeing how you handle your collision detection. I've been fighting with what you laid out in these tutorials to get the collision detection pixel perfect so that my character cannot clip through a boundary if his _vy is to high.
Thanks for the feedback. A day doesn't go by that I don't remind myself that I need to get around to creating those other promised tutorials, but my day job has been pretty demanding these days.
For your own convenience, you might want to consider subscribing so you can be notified as soon as those new videos are uploaded.
Your voice kinda sounds like archers
blaze7774 2 weeks ago
Thank you very much. If you don't mind me asking, where did you obtain you knowledge in this subject?
JayDesignGFX 3 weeks ago
thanks for the tutorial coach mcguirk
TheSpectical 1 month ago 2
anyone know a good tutorial on how to make a virtual joypad in flash AS3?
DrN0OB 1 month ago
you sound like Jon Benjamin
myfuckingtitsarecold 2 months ago
devnote.org redirects to bigtac.com
can you give me the .fla plox and .as
or set it up again
flamenohax 2 months ago in playlist Making a Basic Side Scroller Flash Game
you need to make it for people that don't know how to use flash
latazzy777 2 months ago
Hey @DevNote! What did you use to learn ActionScript? I am looking for a book to study off of and did not know if you knew of any or any good detailed tutorials.
BBryandownes 2 months ago
What shortcut does he use at 4:15 its really annoying me, im using cs3
UnkyTii 2 months ago
HEY GREAT TUTORIAL....but you didnt show creating _stage
politicaltruth42 2 months ago
Thank you so much! This was extremely helpful
lelionmusic 3 months ago
You sound like the guy from family Guy. haha, anyway, the Tut rocks.
mykedivino08 3 months ago
u have a aple wallpaper while ur using windows?
hichamtoons 5 months ago
hello, um i just wanted to say that i was wondering if there was a thing for people that want it to side scroll once you get to the right of the screen... please help!
WearsUndiesInShower 6 months ago
Great tutorial so far. See you in part 2 ;)
SoImPlayer2 6 months ago
wtf did you click to make documentmain
666ShahMat666 6 months ago
@666ShahMat666 he created a new AS file and called it documentmain.
ElvargCharcoal 4 months ago
.....will u be my master oh wise one?? lmao XD
sk8r2473 7 months ago
Favorite part: You speak English. :)
MacdonjoGaming 9 months ago
you sound like bobs burger thumbs up if you agree
WhosUrMoms 9 months ago 3
0 people are stupid
PatLoser10000 11 months ago 5
Found an answer to another question thanks to this. Thanks for typing it all out instead of just offering a copy/paste in the desc. I would recommend that you add in-video links to the next/previous video for easy navigation, by the way.
Also... for the movement bit of code, I wanted to simplify it for you...
var noCollision:Boolean = false;
while (!noCollision)
{ if (_boundaries.hitTestPoint(_player.x, _player.y, true)) { _player.y -= 0.1; _vy = 0; } else { noCollision = true; }
}
RaethFennec 1 year ago
dude make more vids these are beast!
mariomodguy 1 year ago
This is what your voice reminds me of.. v=mfQEpdSTOfI
VisualSerenade 1 year ago
At every break in between you talking, I thought you fell asleep
googledoogle 1 year ago
@googledoogle i did to
KingofMk98 1 year ago
That heavy breathing creeps me out D:
Flashlight1996 1 year ago 10
@Flashlight1996 now that you mention it.. it's starting to creep me out too D:
DevNote 1 year ago 21
@DevNote Do you smoke?
NEXTGENTECHINFO 1 year ago
Your background sucks.
cubby1996 1 year ago 3
@cubby1996 indeed, it does ;)
DevNote 1 year ago 9
@cubby1996 You watch this whole tutorial and all you have to say is 'your background sucks'? You are sad.
iamanp 1 year ago
I've taken your tutorial (great one, btw) and I'm trying to animate my character, but I can't really seem to make it work. I've just put "_player.gotoAndPlay(1);" under "case 38:" in the keyDown handler, which, if it worked, should make it run continuously from frames 1 to 5, a running animation, nested in the movieclip. Any idea why this doesn't work? I'm pulling my hair out here!
cpetersen1610 1 year ago
@cpetersen1610 sorry, but this is one of those flash ide issues (as opposed to purely actionscript-based issue) that's too broad for me to try to deduce the solution based only on the given facts.
but i can give you a simple tip: try creating a new, dummy flash app wherein you only have the bare minimums to test out the triggering of animation based on hard code; the triggering of code based on key input; then the triggering of animation based on key input.
it's not much, but hope it helps.
DevNote 1 year ago
Aw damn, now if I fall I think it just falls and falls, it doesn't die :/
Miny000000 1 year ago
haha.. yeah, i just realized that i've overlooked at least two things in my "adjustments":
1) we now have to test for the BOUNDARY's y-position to detect a reset (not the PLAYER's y-position), b/c the player always stays vertically centered now, but the boundary moves up and down; and
2) the y coordinate of the boundaries needs to be reset as well when respawning (currently, we're only resetting the x-coordinate).
if that's not enough info, i'll post the details when i get off work ;)
DevNote 1 year ago
Okay, I remade it because everything went wrong.
Now, once I respawn once, my StartMarker seems to act in a different place. I'll PM you a link to play :D.
But the vertical scrolling is perfect. Here's the code:
_boundaries.x += (stage.stageWidth * 0.5) - _player.x;
_player.x = stage.stageWidth * 0.5;
_boundaries.y += (stage.stageHeight * 0.5) - _player.y;
_player.y = stage.stageHeight * 0.5;
Miny000000 1 year ago
Thanks I fixed the thing with the corsshair.
Miny000000 1 year ago
Exactly! And I'll check that soloution out :)
Miny000000 1 year ago
If you take a look at the stage scrolling function (at 6 minutes into part 3 of this tutorial series), you end up with two lines that take care of the horizontal scrolling. All you have to do is copy those two lines, then paste the copy just below the original two lines, then replace all instances of "x" with "y" and replace all instances of "stageWidth" with "stageHeight."
.. at least, it works in my mind.. heh, so if that works for you, please post back and let the rest of us know. thanks!
DevNote 1 year ago
oh, i'm sure it's pretty obvious, but just to be clear, i meant "replace all instances of x and stageWidth with y and stageHeight IN THE TWO LINES YOU JUST COPIED"
.. yeah, just making sure..
DevNote 1 year ago
Also, it doesn't follow up and down movements.
Miny000000 1 year ago
do you mean that, when running the final product, the game screen doesn't follow the player as it moves up and down (the way it follows the player sideways by "scrolling")?
just want to make sure before posting a solution :)
DevNote 1 year ago
When I change X and Y it just moves the player, not the crosshair.
And np :)
Miny000000 1 year ago
oh, i see what you're saying. i can think of one of two most likely possibilities here:
1) you forgot to double-click on the player object, and therefore are not actually editing the player movie clip, but rather, the orientation of the player clip on the stage; or
DevNote 1 year ago
2) you DID double click it, and you ARE adjusting the crosshairs, but it doesn't look like it, b/c "moving the crosshair" actually involves moving the player within the player view. in this case, the crosshair changes will become visible/apparent after exiting to the stage view.
DevNote 1 year ago
2:55 doesn't work for me.
Miny000000 1 year ago
sorry, i tried to figure out what you're saying isn't working at 2:55, but i'm still not sure.. are you saying you aren't able to set coordinates for your 'Player' movie clilp object?
thanks for the timestamp ref btw, it helps a lot.
DevNote 1 year ago
Great stuff.
Jonse009 2 years ago
thank you! glad you like it.
DevNote 2 years ago
i get this error 1037: Packages cannot be nested. when I try to play the movie
flavur 2 years ago
i think your problem is most likely caused by a typo. do a quick search to make sure there's not more than one "package" in your entire code file. also, also consider checking out the website indicated in the video annotation for a link to a website with the original file. hope that helps!
DevNote 2 years ago
there's no typo I got it straight off the website you provided and there is only one package in the code and I still can't figure out the problem
flavur 2 years ago
it's a bit of a stretch for me to try to figure out what's wrong without looking at it myself, but my next best guess is that, maybe you've pasted the code directly into the timeline instead of creating a separate actionscript file to be referenced by your flash file via the document class field? (see 4:18 of this vid)
DevNote 2 years ago
2:52 or sumthing
you could have done this before, while creating the class, only select the "Registrating point" in the top left.
btw: GREAT tut
hdfufd 2 years ago
yeah, it looks like that would've been the simpler way to do it. thanks for the advice and the positive feedback!
DevNote 2 years ago
Dude this is seriously one of the best side scrolling tutorials out there!!!! You have to post the advanced engine tutorial! I'm really interested in seeing how you handle your collision detection. I've been fighting with what you laid out in these tutorials to get the collision detection pixel perfect so that my character cannot clip through a boundary if his _vy is to high.
Thanks!
makemefuckinrich 2 years ago
Thanks for the feedback. A day doesn't go by that I don't remind myself that I need to get around to creating those other promised tutorials, but my day job has been pretty demanding these days.
For your own convenience, you might want to consider subscribing so you can be notified as soon as those new videos are uploaded.
Sorry about the wait, and thanks again!
DevNote 2 years ago
Thanks~
Is this CS3 or CS4?
skullkid12345 2 years ago
CS4, but the contents of the tutorial should be just as applicable to CS3 (though, the interface will look slightly different).
Thank you for your interest!
DevNote 2 years ago
No, Thank you for the help!
It's been a huge step forward for me. ^_^
skullkid12345 2 years ago
Looks great, thanks
TehShawGui 2 years ago