Games Achievements My Kong Sign In

Comments for Shootorial #6: ActionScript 3

« Back to Shootorial #6: ActionScript 3

asgerregsa

May. 11, 2013

Under rating threshold (show) I have a problem with the game over menu. I called it "GameOverMenu" and its export is "GameOverMenu" - just like in the tutorial. Now when I try to run the game, I get this error: "1120: Access of undefined property gameOverMenu." I get that error 8 times - the number of times "gameOverMenu" is written in my Game.as file. I tried changing "gameOverMenu" to "GameOverMenu" but that didn't help. Can someone please explain what the problem is?

+ - !

(3)

Pengisimo

Jun. 30, 2011

Under rating threshold (show) For score format, the code is correct, but the score format code has to be before the score text code because if you are defining a default text format, you need to define it before drawing the text. ALSO, in order to define scoreText's text format, you have to create it first, so replace this line: static var scoreText:TextField; with this:static var scoreText:TextField=new TextField(); in your variables spot. Take that Cantor.

+ - !

(6)

Cantor

Mar. 08, 2010

Under rating threshold (show) To answer the one question most people have for this tut, defaultTextFormat is WRONG! instead use: scoreText.setTextFormat(scoreFormat); Quite a simple little error but causes so much frustration :P

+ - !

(20)

damiller

Oct. 09, 2011

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

+ - !

(1)

polkadex

Nov. 11, 2010

Under rating threshold (show) ty very much, :D, I really was in need of a way to show score on the screen. this works great for me. 5/5

+ - !

(2)

The_Dreamer

Nov. 19, 2010

Under rating threshold (show) for the undefined thing when you create your own HeathMeter, i got mine to work by creating a new .as file saved it as HealthMeter.as with this code in it package{ import flash.display.*; public class HealthMeter extends MovieClip{ } } and no more errors with the custom made HealthMeter. also the bar on the inside needs to have the instance name bar in the properties as in this screenshot http://i180.photobucket.com/albums/x64/shadowrider189/flashhelp.jpg

+ - !

(0)

tonechild

Nov. 14, 2010

Under rating threshold (show) I couldn't make my own bar. Even though I made a separate symbol and named it HealthMeterBar and put it inside the HealthMeter symbol. the script couldnt find healthMeter.bar until I copypasted yours. Trying to figure out where you defined "bar" plz enlighten me? :)

+ - !

(0)

thegamemaker777

Jun. 24, 2010

Under rating threshold (show) Im getting this error on page 8: 1119: Access of possibly undefined property healthMeter through a reference with static type Class. why is this? anyone?

+ - !

(-1)

LordOfPi13

Jul. 25, 2010

Under rating threshold (show) Hmmm, now where's the source ?_?

+ - !

(0)

goldleader23

Mar. 18, 2010

Under rating threshold (show) For anyone having trouble with the text format part, It worked for me (as written) only after I got through page 5 of the tutorial. Hopefully that helps. :)

+ - !

(2)

Cantor

Mar. 08, 2010

Under rating threshold (show) *facepalm* until you try to update the text that is :/

+ - !

(0)

Waraslt

Sep. 08, 2015

Under rating threshold (show) just add score text on stage from toolbar and problem solved. Make it Dynamic text, choose your own font, size etc, click embed, name it ScoreText, choose numerals only, export for ActionScript /export in frame 1 and click ok, then give it a name of the text you added on stage "scoreText" and thats it, you can use it in your game

+ - !

(0)

andrew_ortega

Aug. 02, 2015

Under rating threshold (show) To apply default text format to the text, you should set the default text format first and then set the text which must inherit this format. Also, if you want the text to look glowing and to cast a shadow (like in the example), add the following to your code: scoreText.filters = [new DropShadowFilter(), new GlowFilter(0x000000)];

+ - !

(0)

MCA3

Oct. 10, 2014

Under rating threshold (show) Formating of scorebord is not working , and i think is not my fall and this code not works in CS6... and what i must to do i have no idea ... :/

+ - !

(0)

NexusBlast

Apr. 09, 2013

Under rating threshold (show) I'm having a lot of trouble with the health bar. I don't understand the "movie clip inside a movie clip" thing...

+ - !

(0)

falariem

Aug. 05, 2012

Under rating threshold (show) Great series. I thank you, Moly. One question, though. When my ship dies via crashing into an enemy, I get an error message a "reference to a null object" when it's going through the code that removes all enemies from the screen. This ONLY happens when I die from crashing. Anyone have any idea about that?

+ - !

(0)

casMn

Jul. 06, 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)

casMn

Jul. 06, 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)

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)

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)

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)

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)

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)

TukkoRauta

Nov. 17, 2010

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

+ - !

(-1)

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)

2640ICSx

Aug. 10, 2009

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

+ - !

(-2)

Whitellama

Feb. 03, 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)

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)

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)

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)

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)

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)

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)

ShadoWolf00

Sep. 18, 2009

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

+ - !

(0)

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)

Tukkun

Aug. 13, 2009

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

+ - !

(0)

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)

Solice

Dec. 19, 2009

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

+ - !

(-1)

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)

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)

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)

2640ICSx

Aug. 10, 2009

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

+ - !

(-2)

falaki

Nov. 13, 2010

Under rating threshold (show)

+ - !

(-4)

Neosano

Aug. 11, 2009

Under rating threshold (show)

+ - !

(-4)

2640ICSx

Aug. 10, 2009

Under rating threshold (show)

+ - !

(-6)

setheral

Aug. 10, 2009

Under rating threshold (show)

+ - !

(-7)

  • add a comment
  • « First
  • -35 - 10 from the end
  • Last »
Developers Players Support YouTube TikTok X (Twitter) LinkedIn
Join the conversation Join Discord
Terms Privacy Code of Conduct
© 2024 Kongregate