if you set the "registration point" of theShip exactly on the nose (so the nose tip was on x:0 and y:0), you wouldnt have to guess the x and y value to use for the laserShot.
Also, a tip for centering things --> laserShot.x = (theShip.width/2)-(laserShot.width/2); Great intro to actionscript - nice and easy pace.
BTW: I removed the previous comment, because i found out other had the same problem:
Here is it online: "/livedocs/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00001136.html" Just put it after "adobe . com"
I got to say thank you for providing this video, well conducted, very easy to follow through, you explain the purposes of the code very well and it is going to help me greatly in class, thank you once again.
I'm nearly positive that "anything you want to access" on the Keyboard isn't true. The class built into flash only allows arrow keys, backspace, space and some other not useful keys. The rest like letters and numbers are only available for AIR runtime. Keyboard.A will return an error unless its an AIR application. AIR isn't very practical imo and games like your attempting are made for the web... you should fix that, because it was kinda a bitch for me until I realized it's not allowed
I dont know if you can still do this but could you paste all the commands in either the video info or in a reply. I have CS4 and when you open the "Flash Help" it opens a IE8 window which brings you to adobe help page. The page doesnt have the codes on them as far as I could find, so I would be erally greatful if you could paste them somewhere.
lots of error's with the lazershot.. :(
Scène 1, Layer 'actionscript', Frame 1, Line 58 1046: Type was not found or was not a compile-time constant: laser.
Scène 1, Layer 'actionscript', Frame 1, Line 58 1180: Call to a possibly undefined method Laser.
Scène 1, Layer 'actionscript', Frame 1, Line 99 1120: Access of undefined property KeyCharCode.
Scène 1, Layer 'actionscript', Frame 1, Line 101 1120: Access of undefined property laserShot.
and much more.. :( please some body help me!
neil6406 4 months ago
excellent tutorial, thank you
ideator001 8 months ago
Interesting
torocity 1 year ago
This has been flagged as spam show
I found best video tutorial for Capture Video Screen
capturevideoscreenָcom
Awsome Tutorial
I just Wana Help
Enjoy In Your Life!
nemanjasmina 1 year ago
if you set the "registration point" of theShip exactly on the nose (so the nose tip was on x:0 and y:0), you wouldnt have to guess the x and y value to use for the laserShot.
Also, a tip for centering things --> laserShot.x = (theShip.width/2)-(laserShot.width/2); Great intro to actionscript - nice and easy pace.
InfiltrateIndustries 1 year ago
DUde awesome, now i understand how to move something left &right ^^ ty !
4kakiller 2 years ago
the listener code won't log most my keys. just the numbers, arrows and a few of the keys to the right of the keyboard. help anyone??
junkahoolik 2 years ago
awesome 5 stars. Thank you so much for this tutorial, REALLY really helped me a LOT
IndustryOfMagic 2 years ago 5
how many things I learned from you!!!!! thanks so much!
studyingflash 2 years ago 6
It's maybe buggy, but this will definitely help me :) Thanks alot... the simplest tutorial is best to understand :)
Tallos1 2 years ago 4
Amazing tutorial!
BTW: I removed the previous comment, because i found out other had the same problem:
Here is it online: "/livedocs/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00001136.html" Just put it after "adobe . com"
FlamingDuckStudios 2 years ago
Comment removed
FlamingDuckStudios 2 years ago
what s the problem with guy,, is he on crack or somethin
itofmayachev 2 years ago
No.
MarukashiX 2 years ago
"at the: var KeyCharCode:uint=event.charCod e;
it says: Access of undefined property event" Looks like you have a space in the second charCode variable...just my guess
sirlancerbots 2 years ago
key bood...key bood "hehe" key BORD lol
magic1995 2 years ago
I am 'key bored'!
DARKlilution 2 years ago
@DARKlilution bah dum tshhhh rimshot
swiftmpc 2 years ago
I am unable to get to the search box you used to access the code samples.
Peace
Joe
akinsvideos 2 years ago
you have cs4 right
Spuscartr 2 years ago
i have cs4 and when i click help it opens in a browser and there are no codes! what to do?
Spuscartr 2 years ago
I got to say thank you for providing this video, well conducted, very easy to follow through, you explain the purposes of the code very well and it is going to help me greatly in class, thank you once again.
adamdeangelo 2 years ago
I'm nearly positive that "anything you want to access" on the Keyboard isn't true. The class built into flash only allows arrow keys, backspace, space and some other not useful keys. The rest like letters and numbers are only available for AIR runtime. Keyboard.A will return an error unless its an AIR application. AIR isn't very practical imo and games like your attempting are made for the web... you should fix that, because it was kinda a bitch for me until I realized it's not allowed
bcapecci 2 years ago
Not sure what you mean, I programmed it in using the A key... D key... Space key or any other key I want... what are you talking about?
I proved it to you in the video, every bit of my programming is on screen for you to see... explain further please cuz that does not make sense to me.
flashbuilding 2 years ago 2
haha what are you talking about?
sirlancerbots 2 years ago
@bcapecci probably because you have to use a key code, not the actual key letter.
ZayLong 9 months ago
I dont know if you can still do this but could you paste all the commands in either the video info or in a reply. I have CS4 and when you open the "Flash Help" it opens a IE8 window which brings you to adobe help page. The page doesnt have the codes on them as far as I could find, so I would be erally greatful if you could paste them somewhere.
WhatsHisFace90 2 years ago
in flash cs4 the web browser opens with the results i am searching for!!!!!!!!!!!!!!!!!
nilabjo2008 2 years ago
great tut, very helpful thanx :D
as a side note, you can improve the code by combining the if conditionals with && and also just put -=, not -=+ (+= not +=+)
if (keycharcode==97 && theShip.x>leftBounds) {theShip.x-=shipSpeed;}
Cyphlix 3 years ago
Very true... good note man!
flashbuilding 3 years ago
great tutorial, not finished it yet but it is great, at 20:28 atm but I have a problem :(.
I checked for errors just like you said, but I have a syntax error at 'var laserBlaster.laser = new laser();
Syntax Error: Expecting semicolon before dot
what do i do?
btw great tut!
ZookanProductions 3 years ago
As the error suggests, you should have a semicolon, not a dot. You're telling Flash what type of object laserBlaster is...
var laserBlaster : laser = new laser();
Translation: "my variable, laserBlaster, should be a 'laser' object. Set it to the ID of a new laser."
DoppTivo 3 years ago
dude this is a great tutorial
but...
i want so make a game with a character
such as sonic the hedgehog(a 2d game)
good tutorial though
very good tutorial
5/5
KINGESSNE 3 years ago