@apple1123215 The instance name for the player is "player".In these lines of code what he is doing is that he is creating a new variable Player that will store the instance 'player' in it. To create a new instance he is using the keyword 'new'. Then he wants the x and y position of the player to be the same as x and y position of your cursor. thats what the second line of code does. The last piece of code "addChild(Player);" is used to display the player object on screen. Thats all
Oh man, I'm one of those people that collate many questions, so here is question number 1 and 2. At the time 1.35, is the class you are typing in the "main" class? I can’t seem to find your comments on this video in the tutorial blog . com. How do I access this.
How Ironic is this? I tried to get my bullets to work in a shooting game i made a few months ago as an assignment, and now I've found this? This could've helped me tremendously. Dang... now i'm gonna get 50% score now... :( and I had 100% attendance as well. I'm annoyed 'cos at Northumbria uni most people were slackers and I was one of the fewest ppl that cared about the course. I only managed to get 13/20 tasks done. Getting multiple bullets to shoot was one task.
@DuxRomanorum and the rest of you who did not get it to work.
it worked fine for me.
It's super importent that you write the code EXACTLY like the tutorial shows you, it looks like you forgot to capitalise some of your....ehm for the lac of proper code language... words... like player should be Player and bullet should be Bullet. I'm a noob at this but I got it(on my 3d try).
@DuxRomanorum You may have not given the instance names correctly. Open your fla file, select your object and then you should find Instance name somewhere in the properties panel. For player object enter 'player' as the instance name and for bullet enter 'bullet'. (without quotes)
@pramodkabadi24 You are facing errors because you are programming it directly in the frame. Try creating a new .as file and then programming it from scratch. The tutorial itself is not clear(I believe so).
But were have you learned all the commandos , scripting or what it is ''called''
I dont understand anything , examples ( ' goto and play , < on release, var enter and a lot of more things what do they mean ' were have you learned all the things plz tell if it's a website or in a book ?
Thank you so much... the "removeEventListener" had been haunting me for 3 months!!! Now I knew I need to add "remopveChild" after it... what a relieve now...
Is there a way of putting a button into this, so you can click on it? I've tried loading this into a .fla already, and works fine, just i can't click any of the other buttons.
Can you zoom out next time please? Also, at LEAST add music or something, it was deafeningly quiet.
Good video though! Thanks
MrAsianPersuasion824 1 month ago
you have a mac, we can relate
webbypictures 4 months ago
ty!!! it helped me alot! not so difficult but there are some code i didn't understood before,but now i know it... :)
TheMegalucian 5 months ago in playlist tutorial action script3
Gee, thank's for being so descriptive in your comments section of the code.
joshanator1 7 months ago
didnt worked for me since the symbol converter.. fuck my life...
arkchanger 7 months ago
May i ask a question???
What is the use of var Player:player = new player( ); Player.x = mouseX; Player.y = mouseY; addChild(Player);
??? THX
apple1123215 8 months ago
@apple1123215 The instance name for the player is "player".In these lines of code what he is doing is that he is creating a new variable Player that will store the instance 'player' in it. To create a new instance he is using the keyword 'new'. Then he wants the x and y position of the player to be the same as x and y position of your cursor. thats what the second line of code does. The last piece of code "addChild(Player);" is used to display the player object on screen. Thats all
utkarshakash321 1 month ago
Oh man, I'm one of those people that collate many questions, so here is question number 1 and 2. At the time 1.35, is the class you are typing in the "main" class? I can’t seem to find your comments on this video in the tutorial blog . com. How do I access this.
thechosen261 9 months ago
How Ironic is this? I tried to get my bullets to work in a shooting game i made a few months ago as an assignment, and now I've found this? This could've helped me tremendously. Dang... now i'm gonna get 50% score now... :( and I had 100% attendance as well. I'm annoyed 'cos at Northumbria uni most people were slackers and I was one of the fewest ppl that cared about the course. I only managed to get 13/20 tasks done. Getting multiple bullets to shoot was one task.
thechosen261 9 months ago
Flash CS5 as3:
Line 1: Type was not found or was not a compile-time constant:player.
Line 1: Type was not found or was not a compile-time constant:bullet.
Line 15: Call to a possibly undefined method bullet.
Line 23: Cannot assign to a non-reference value.
Line 23: Implicit coercion of a value with static type Object to a possibly unrelated type Number.
Line 1: Call to a possibly undefined method player.
DuxRomanorum 10 months ago
@DuxRomanorum and the rest of you who did not get it to work.
it worked fine for me.
It's super importent that you write the code EXACTLY like the tutorial shows you, it looks like you forgot to capitalise some of your....ehm for the lac of proper code language... words... like player should be Player and bullet should be Bullet. I'm a noob at this but I got it(on my 3d try).
Ikillboredom 10 months ago
@Ikillboredom
I know why it didn't work: I had not done the linkage of any object;
I didn't give the bullet and the player their own class, so actionscript
didn't know what to do by:' = new player(); '
DuxRomanorum 10 months ago
@DuxRomanorum You may have not given the instance names correctly. Open your fla file, select your object and then you should find Instance name somewhere in the properties panel. For player object enter 'player' as the instance name and for bullet enter 'bullet'. (without quotes)
utkarshakash321 1 month ago
its not working waste of ur time please remove this ugly clip
shekharchary 10 months ago
Anyone wanna tell me why I have the code for everything copied exactly but it won't work?
KingJeanLuc 1 year ago
where did u download this? Was it free?
NinjaCreater89 1 year ago
hello . i tried but not getting . m getting this error report :
Scene 1, Layer 'Layer 1', Frame 1, Line 21 1119: Access of possibly undefined property y through a reference with static type Class.
pramodkabadi24 1 year ago
@pramodkabadi24 You are facing errors because you are programming it directly in the frame. Try creating a new .as file and then programming it from scratch. The tutorial itself is not clear(I believe so).
utkarshakash321 1 month ago
GREAT.
I havent tried it yet. But it's so strait to the core of things! Wish there were more tutorials like that.
bullsquid42 1 year ago
Did what you showed but a whole bunch of errors pupped up.
Zutraxi 1 year ago
i am using flash cs4 action script 3, i get an error saying
"1086: Syntax error: expecting semicolon before new. "
and that is for the first line of the action,
"var Player:player new = player();"
i can't seem to find a solution to the error someone plz help me and thank you
cryptichaxed 1 year ago
@cryptichaxed
i think its:
var Player:player = new player();
AnewBANDareHERE 1 year ago
Firing Blanks? lol
CelticReject 1 year ago
I would aprecciate if you could do a detailed explanation of comment 5 :X
joaomspereira18 1 year ago
it took me forever to figure out why it wasnt working, he is using MACROMEDIA FLASH, im using adobe flash cs4. anyone know how to do this in cs4?
halofannatic 1 year ago
i dnt understand why u dnt just use an instance name instead of adding a child
blaizethefootylegend 1 year ago
this has an amazingly good result, while being stupendously simple.
the only new thing i learned was how to spawn an object from the library, and i was searching for that. so thanks
azelinus 1 year ago
Excellent! Exactly what I was looking for. Simple and to the point.
simranzenov 1 year ago
Thanks. Its a good example, and yes you do have to change the line 28 from:
e.target/y -=5;
to
to e.target.y -=5
neilaub 1 year ago
looks really gay, and i did not learn anything
elPurple0wnz 1 year ago
can i do this in flash 8?
MrAbbe800 2 years ago
flash 8 only goes up to actionscript 2.0 u need cs3 or cs4 flash for actionscript 3.0
JWebPro 2 years ago
Thanks so much!
Dummy1912 2 years ago
But were have you learned all the commandos , scripting or what it is ''called''
I dont understand anything , examples ( ' goto and play , < on release, var enter and a lot of more things what do they mean ' were have you learned all the things plz tell if it's a website or in a book ?
MrJezez 2 years ago
preach it
RichardJordan100 2 years ago
goto and play means go to a frame of ur choice and on release means the release of ur choice of key makes it do somthing
pudinthemushroomhead 2 years ago
@pudinthemushroomhead The onrelease part means on the release of the left mouse button!
beatallhalos 1 year ago
can you send me the code please because it says ive got problems
TheTimeLord903 2 years ago
So sorrry i accidentilly clicked 1 star i swear i meant to click 5 stars
xLILDxx 2 years ago 22
@xLILDxx
its a helpful tutorial you trolls
MrPixelizedPerson 1 year ago
@xLILDxx Dont worry its now just like XD
iphoneandnick 2 months ago
@iphoneandnick Lol man I posted that comment soo long ago XDD
xLILDxx 2 months ago
@iphoneandnick Liked btw :)
xLILDxx 2 months ago
when creating the linkage you should use the fist letter capital by convention
metmou 2 years ago
Thank you so much... the "removeEventListener" had been haunting me for 3 months!!! Now I knew I need to add "remopveChild" after it... what a relieve now...
Juggernaughty824 2 years ago
Is there a way of putting a button into this, so you can click on it? I've tried loading this into a .fla already, and works fine, just i can't click any of the other buttons.
Any help would be appreciated!
Thanks - funny game btw.
Jo123Jo 3 years ago
what the hell is the point with this game? :P
Jkkt1 3 years ago
he doesnt follow the mouse or shoot? i didnt get errors.
AwesometacularDesign 3 years ago
OMG the line
e.target/y -=5; give me errors
can someone help me plz
sp0pp0 3 years ago
Not without knowing the error.. no.
championchap 3 years ago
do e.target.y not e.target/y
aznargo 3 years ago
its e.target
964247 3 years ago
The mistake is so obvious... Of course it is e.target.y ...
An3ID 2 years ago
how did you make the player disapear
Dylanfan66125889 3 years ago
i have 6 errors and i have cs4 but it is as3 so it needs to work? strange
1120: Gebruik van niet-gedefinieerde eigenschap event.
1046: Type niet gevonden of geen constante bij compilatie. bullet.
1046: Type niet gevonden of geen constante bij compilatie. player.
and al of that
simonlive12 3 years ago
Dat is faking nederlands, stomme debiel.
SLiDEnl 2 years ago
b'naan
gassiej 2 years ago
@gassiej B'hanger
PlatiumGauntlet 2 years ago
Every time I test my movie, I get this:
1046: Type was not found or was not a compile-time constant: Player.
I also get it twice. The other one points towards the bullet.
Apparently, this is the source:
var Player:Player = new Player();
I'm using AS 3.0. Any comments?
aznargo 3 years ago
In the linkage of the player mc, change it from Player, to player, with a lowercase "p", here is what you need to type in:
var Player:player = new player();
As3 and as2, also as1, is case sensitive, the rest of the code when you type in the word player, make sure it has a capital "P", okay?
FlashFuel 3 years ago
e.target/y -=5; ummmmm nO!
sk984 3 years ago
I get this when I test the movie:
1180: Call to a possibly undefined method addCild. (twice)
source: addChild(Player) & addCild(Bullet)
Any ideas why?
dieterjandriessen 3 years ago
It could be because you had "Cild" and not "Child".
aznargo 3 years ago
what is the //comment 1 for?
Turtleboy28 3 years ago
probably to divide up the actionscript so it isnt so overwhelming for new ppl
PhyrePhenix 3 years ago
its for comments, it means nothng in programming terms, its so u can keep note on ur script n for stupid peolpe like us
madbeatstu 3 years ago
I think they were using 2.0. I agree with Pivoty.
AntiTPG 3 years ago
it didnt work for me
PhyrePhenix 3 years ago
What didn't work?
Did you get any errors?
Katocan 3 years ago
i got like 10. a lot of words that you typed in here didnt turn blue for me even tho its exactly what you typed. i have flash 8 pro
PhyrePhenix 3 years ago
probably cause it's actionscript 3.0 and your using 2.0
PivotyPivoty 3 years ago 3
@Katocan On line 28 I had to change it from "e.target/y -=5;"
to "e.target.y -=5;"
Once I did that, it worked fine. Thanks for posting.
b0t0ncandy 1 year ago
@Katocan
didn't work for me either
1046: Type was not found or was not compile-time constant: bullet.
1180: Call to a possibly undefined method: bullet.
Mintish 2 months ago
This comment has received too many negative votes show
its POOR
ToMiTzZzA 3 years ago
Nice but where is the VOICE !!!!
HappyYemennet 3 years ago 19
This is really clear and easy to follow and helped me a lot, when will part 2 be available?
stinkoid 3 years ago