Comments for Shootorial #6: ActionScript 3

avatar for MrRudy
MrRudy

Jan. 29, 2012

Under rating threshold (show) remove this line on Ship.as to keep the ship from disappearing on the keyboard press. parent.removeChild(this); then it works without any bugs. The next Ship.as file does not have this line so it is surplus to requirements.

+ - !

(0)

avatar for damiller
damiller

Oct. 9, 2011

Under rating threshold (show) TypeError: Error #1009: Cannot access a property or method of a null object reference. at Game()

+ - !

(0)

avatar for casMn
casMn

Jul. 6, 2011

Under rating threshold (show) Please disregard this:"The source file downloaded from the 1st page is not working i.e. the game.fla when 'Test Movie' produced only a static page with no button interactions." What I meant was : The source file downloaded from the 1st page is not working properly i.e. the game.fla during 'Test Movie', when spacebar is pressed, the ship disappeared, and the error messages appeared in the output window >> TypeError: Error #1009: Cannot access a property or method of a null object reference. at Ship/move() TypeError: Error #1009: Cannot access a property or method of a null object reference. at Ship/kill() at Ship/takeDamage() at EnemyShip/enterFrame() TypeError: Error #1009: Cannot access a property or method of a null object reference. at Ship/kill() at Ship/takeDamage() at EnemyShip/enterFrame() TypeError: Error #1009: Cannot access a property or method of a null object reference. at Explosion/enterFrame() TypeError: Error #1009: ...............

+ - !

(0)

avatar for casMn
casMn

Jul. 6, 2011

Under rating threshold (show) The source file downloaded from the 1st page is not working i.e. the game.fla when 'Test Movie' produced only a static page with no button interactions.

+ - !

(0)

avatar for gta0004
gta0004

Sep. 16, 2010

Under rating threshold (show) it seems if i have the resetscore(); thing up the score box doesnt even show up… if i dont the score doesnt update when it is called to but just disappears.

+ - !

(0)

avatar for thegamemaker777
thegamemaker777

Jun. 24, 2010

Under rating threshold (show) I got mine to work(YAY!!!) the problem was the .fla wasn't saved there for is was like not having the healthMeter in the library when I tried to change its scale.

+ - !

(0)

avatar for VBCPP
VBCPP

Jun. 15, 2010

Under rating threshold (show) milkonmonday, you're getting NaN because you never set score =0; It has to be initliazed. before you can use it. Thats why changing it to score =points works.

+ - !

(0)

avatar for milkonmonday
milkonmonday

May. 29, 2010

Under rating threshold (show) I really hope someone can help me with the score. If I shoot an enemy the score changes from 0 to NaN (Not a Number???). I did it exactly as in the tut but it seems I did something wrong and have no clue where t look. If I change this part in the Game.as "score += points;" to "score = points;" It adds up the 50 points for killing a ship but doesn't change when killing a second. But when I leave the "+" it gives met NaN in the score... :(

+ - !

(0)

avatar for falaki
falaki

Nov. 26, 2010

Under rating threshold (show) well now i've got a null object reference at Key(d(because i tryed changing the class name))$/initalize i even changed the class name to Keyd

+ - !

(-1)

avatar for TukkoRauta
TukkoRauta

Nov. 17, 2010

Under rating threshold (show) i got the same problem with making healthmeter.bar and gameovermenu.playagainbutton

+ - !

(-1)

avatar for falaki
falaki

Oct. 26, 2010

Under rating threshold (show) Good it was a unreparible problem of the file i copyed the code put it into a new script deleted the old one and it worked

+ - !

(-1)

avatar for 2640ICSx
2640ICSx

Aug. 10, 2009

Under rating threshold (show) cool i love it it's awesome =)

+ - !

(-2)

avatar for Whitellama
Whitellama

Feb. 3, 2010

Under rating threshold (show) I'm still stuck on slide 3. I tried testing it exactly like the tutorials way but it didn't work. I then tried it like ThinkLikeMike said, but that didn't work either. Can someone tell me what's wrong if there is an error in the tutorial? Or if there is something I probably did wrong?

+ - !

(0)

avatar for Tryzx
Tryzx

Jan. 26, 2010

Under rating threshold (show) ye, like Orangatang, I don't understand why we have to put static var healthMeter:HealthMeter; Can someone explain it plz? And btw, very good tutorial, thx

+ - !

(0)

avatar for Orangatang91
Orangatang91

Dec. 27, 2009

Under rating threshold (show) What is the difference in declaring static var healthMeter:HealthMeter; and static var healthMeter:MovieClip; What is the difference and when should they be used?

+ - !

(0)

avatar for Fel_Demon
Fel_Demon

Oct. 28, 2009

Under rating threshold (show) ... why does it not work? I spend 5 minutes typing and 55 minutes puzzling. Are you trying to keep it a secret?

+ - !

(0)

avatar for thinklikemike
thinklikemike

Oct. 25, 2009

Under rating threshold (show) The AS3 versions your doing are pretty helpful! One note, I don't know if its me but I was having issues with the score formatting on page 3. Instead of the code that is suggested I went with: var scoreFormat=new TextFormat(); scoreFormat.color=0xffffff; scoreFormat.font="Helvetica"; scoreFormat.size=20; scoreText.defaultTextFormat = scoreFormat;

+ - !

(0)

avatar for Pacmanno
Pacmanno

Sep. 26, 2009

Under rating threshold (show) i know it works and all but. when u declare the healthBar variable, shoudn't it be a MovieClip type.( im used to as2)

+ - !

(0)

avatar for ShadoWolf00
ShadoWolf00

Sep. 18, 2009

Under rating threshold (show) and on slide 4 you have to change scoreText.text = score scoreText.text = String(score) for it to work

+ - !

(0)

avatar for ShadoWolf00
ShadoWolf00

Sep. 18, 2009

Under rating threshold (show) nevermind, i got it. i didn't make the score variable static...

+ - !

(0)

avatar for ShadoWolf00
ShadoWolf00

Sep. 18, 2009

Under rating threshold (show) i cant get the score text format to change, and the updateScore function keeps coming back saying im trying to put a number in a string. Does anyone know what im doing wrong?

+ - !

(0)

avatar for Tukkun
Tukkun

Aug. 13, 2009

Under rating threshold (show) scoreText will not ruin the code...

+ - !

(0)

avatar for SimpleOrc
SimpleOrc

Aug. 10, 2009

Under rating threshold (show) The other tutorials were made explaining it in Actionscript 2 (the code language) and these are in Actionscript 3. Nothing was stolen, it's just updating it.

+ - !

(0)

avatar for Solice
Solice

Dec. 19, 2009

Under rating threshold (show) lol 0x000000 =/= white.

+ - !

(-1)

avatar for tonechild
tonechild

Nov. 14, 2010

Under rating threshold (show) Not sure what I'm missing, but the healthMeter.bar is undefined. It seems like it can't access it.

+ - !

(-2)

avatar for falaki
falaki

Oct. 25, 2010

Under rating threshold (show) Great now i have it start all of shootorial again all my codes such as new game gameover takedamage(ship class) explosion(ship class) is null ive ttryed debug and its all to do with linking the functions for instance on explode you have to call gameover()

+ - !

(-2)

avatar for 2640ICSx
2640ICSx

Aug. 10, 2009

Under rating threshold (show) I'm wrong what did I say that was wrong? really i just said it's awesome and thats almost it really. =\

+ - !

(-2)

avatar for 2640ICSx
2640ICSx

Aug. 10, 2009

Under rating threshold (show) 5 plays (O O)

+ - !

(-2)

avatar for falaki
falaki

Nov. 13, 2010

Under rating threshold (show)

+ - !

(-4)

avatar for Neosano
Neosano

Aug. 11, 2009

Under rating threshold (show)

+ - !

(-4)

avatar for 2640ICSx
2640ICSx

Aug. 10, 2009

Under rating threshold (show)

+ - !

(-6)

avatar for setheral
setheral

Aug. 10, 2009

Under rating threshold (show)

+ - !

(-7)

  • add a comment