Comments for Shootorial #2

avatar for AlphaOmegaTroll
AlphaOmegaTroll

Apr. 23, 2011

Under rating threshold (show) Less and less people continue, it's like the shootorials are a dungeon RPG. Get past level 1 and understand it you can move on to level 2. If you don't try again. Conquer all 8 levels and you are a potential developer :)

+ - !

(65)

avatar for garm29
garm29

Mar. 22, 2010

Under rating threshold (show) here is a way I found for the code to make it even better, the background will go faster if you go foreward, and will go slower if you go backward class Background extends MovieClip { function onEnterFrame() { if( Key.isDown(Key.RIGHT) ) { _x = _x - 3; } if( Key.isDown(Key.LEFT) ) { _x = _x + 1; } _x = _x - 2; } } by the way this is not including the loop code

+ - !

(39)

avatar for EricPower
EricPower

Feb. 19, 2011

Under rating threshold (show) ploopy if your ship lags try increasing/decreasing fps. too high can cause lag and too slow can make your ship jump from place to place and appear laggy while not being laggy

+ - !

(21)

avatar for rayhon
rayhon

Dec. 27, 2013

Under rating threshold (show) Im haveing some issues with this one, I keep getting error 5007: An ActionScript file must have at least one externally visible definition. on my Background.as Any help would be greatly appreciated

+ - !

(4)

avatar for Cozythrias
Cozythrias

Jun. 4, 2011

Under rating threshold (show) not being able to understand the codes in this tutorial, you won't be able to troubleshoot your way out of your problem, make your own background make your own ship don't use the same width and height and you will find yourself troubleshooting and learning at the same time.

+ - !

(19)

avatar for 12sea21
12sea21

Aug. 23, 2010

Under rating threshold (show) EVERYONE: If it says that the class or interface could not be loaded, save the AS into the folder.

+ - !

(26)

avatar for currosonido
currosonido

Jan. 2, 2012

Under rating threshold (show) I´ve learned to develop my own games with this!!! Understand all 8 levels and you will have a great knowledge about actionscript programming. This is a full example:"http://www.kongregate.com/games/currosonido/ornithophobia"

+ - !

(3)

avatar for zeth415
zeth415

Oct. 14, 2011

Under rating threshold (show) I have just came to love these tutorials. Almost every other tutorials assumed that everybody had studied programming before... really, really, thank you

+ - !

(7)

avatar for MrDruidek
MrDruidek

Jan. 17, 2014

Under rating threshold (show) gg

+ - !

(2)

avatar for assassin153
assassin153

Apr. 29, 2012

Under rating threshold (show) I got it working for the most part but I got one major error......If I move my ship right the ship goes right but the camera goes left...if I go left camera goes right and ship goes left?

+ - !

(2)

avatar for c3bp
c3bp

Sep. 12, 2013

Under rating threshold (show) what do i do if i want the background to move vertically using _y? i tried changing _x to _y but it wont loop. help.

+ - !

(2)

avatar for classicangel831
classicangel831

Jun. 7, 2013

Under rating threshold (show) If you're having issues with the background looping (get the white space between the two), make sure you've done Step 3 on page 8.

+ - !

(2)

avatar for squint95
squint95

Oct. 2, 2009

Under rating threshold (show) IF YOUR BACKGROUND DOES NOT MOVE GOTO THE LIBRARY CHOOSE YOUR BACKGROUND Rightclick->Properties and rename all"Backgrounds" to "bg" then rename also the class to : class bg extends MovieClip and the file name: bg.as hope it works

+ - !

(4)

avatar for livew1r3
livew1r3

Apr. 27, 2010

Under rating threshold (show) The only thing I would change is to not name everything the same. The layer is named ship, the class is named ship, the identifier is ship... it would be useful to change it up to make it clearer WHICH ship object you're referring to when you say ship. Say, call the layer 'shipLayer'

+ - !

(13)

avatar for Fishdawg
Fishdawg

Mar. 8, 2012

Under rating threshold (show) Why did the ship movieclip have to be registered with the dot in the middle but the background has the dot registered at the top left. What does that do?

+ - !

(3)

avatar for MoNstERs
MoNstERs

Sep. 14, 2012

Under rating threshold (show) If your ship flying off the screen bothers you, try this: You can put in this little line of code to your "Ship.as" file anywhere in the "onEnterFrame" function. Type: if(_x<20) { _x = 20; } ....for example, this will prevent your ship from flying off the stage on the left side. You can do other ones too (replace x with y to prevent flying off the top and bottom) play with the numbers till you get a boundary you are happy with :]

+ - !

(3)

avatar for thunbear
thunbear

Feb. 12, 2012

Under rating threshold (show) For some reason I can not get a seamless loop. When I set if (_x < -2110) { _x = 0; } It sill waits till it gets to the end of the backround before resetting. I even tried putting 4 backrounds next to each other, so it continues to 8440 pixles, but it still does not reset at 2110. It scrolls through the whole backround getting to the end and going blank before resetting _x = 0; no matter how I try and tweak it.

+ - !

(3)

avatar for Tiger99
Tiger99

Sep. 1, 2011

Under rating threshold (show) FUN LOLOLOLOLOL :D

+ - !

(3)

avatar for SupremeBeing
SupremeBeing

Dec. 14, 2008

Under rating threshold (show) If you background isn't seemless, change step 7 too: function onEnterFrame() { _x-=1; if (_x < -2109) { _x += 4220; } }

+ - !

(3)

avatar for Shad0wriderz
Shad0wriderz

Jun. 30, 2010

Under rating threshold (show) Ok im really confused. I have a decent understanding of the codes, but in if(_x < -2210. So 2110 is th width of the BG. Mine is custom made and I made the width of the custom 2110 as well. I have all the codes down correctly. But when I play it, the BG only loops once. What am I doing wrong. My full BG code is: ---------------------------------------------------------------------------- class Background extends MovieClip { function onEnterFrame() { _x -= 1; if(_x < -2110) { _x = 0; } } } -------------------------------------------------------------------------- Help anyone???

+ - !

(5)

avatar for benoz11
benoz11

Oct. 10, 2011

Under rating threshold (show) Brilliant tutorial for the absolute basics. I was struggling to find a tutorial that actually explained each command instead of just telling me what to write, but this is perfect for the beginner to learn not copy :D

+ - !

(2)

avatar for Jawburger
Jawburger

Jun. 24, 2011

Under rating threshold (show) Also, i am trying to make it use WASD in stead of the arrow keys, i know, that was last shootorial but i dont care. Instead of the "LEFT" keycode, i put A, but it doesn't work, says "A is not a valid keycode" and doesnt work. What ore the keycodes for letters? KEYW? KEYA? or just W? A?

+ - !

(1)

avatar for Cozythrias
Cozythrias

Jun. 4, 2011

Under rating threshold (show) nah reading is the only thing you need to do, understanding the whole codes from the start from zero knowledge ain't that easy. this site just need more people that READS

+ - !

(2)

avatar for Emilade
Emilade

May. 23, 2011

Under rating threshold (show) I got all the way through frame 5 of the tutorial, and when I tested the movie as suggested my ship flew to the left instead of the background. I still have full control of the ship with the arrow keys, though. I'm sure there's something I've missed or not done right, but for the life of me I can't figure out what it is. The code that I have is exactly the same as in the tutorial. Can anybody help me?

+ - !

(1)

avatar for Pengisimo
Pengisimo

Apr. 8, 2011

Under rating threshold (show) less and less people make it to the next tutorial lol

+ - !

(3)

avatar for JWRabbit
JWRabbit

Mar. 10, 2011

Under rating threshold (show) Ok, fixed the ALL (ship and background) moving stuff. My error was a question of hierachy. Layer1 -> ship /background (both inside layer1). The right way is 2 DIFFERENT Layers from the root and NOT both Inside the Root. In case of doubt, click on the Scene 1 title if u see only 1 layer ... thats the problem, u need to see 2 layers (ship and background) as unique items.

+ - !

(2)

avatar for SinSippo
SinSippo

Feb. 23, 2011

Under rating threshold (show) @tyugn did you made sure the framerate is 30 FPS? Other wise come check the Game Development Room (GDR) once in a while, people will help you there.

+ - !

(2)

avatar for tyugn
tyugn

Jan. 29, 2011

Under rating threshold (show) My ship isn't moving when I try to test. Here is my code. class Ship extends MovieClip { var velocity; function onLoad() { velocity = 10; } function onEnterFrame() { if (Key.isDown(Key.RIGHT)) { _x = _x + velocity; } if (Key.isDown(Key.LEFT)) { _x = _x - velocity; } if (Key.isDown(Key.UP)) { _y = _y - velocity; } if (Key.isDown(Key.DOWN)) { _y = _y + velocity; } } }

+ - !

(1)

avatar for iGreenPuffle92
iGreenPuffle92

May. 2, 2010

Under rating threshold (show) @bhattarai333 I know how to fix your problems, First, the Background.as file must be where your .fla file and Ship.as file are! Second, your background code should be: class Background extends MovieClip { function onEnterFrame() { _x -= 1; if(_x < -2110) { _x = 0; } } } the "Statement block must be terminated by '}'" error comes because you didnt put a '}' at the end of the code. and the "The class 'Background' needs to be defined in a file whose relative path is 'Background.as'" message comes because the Background.as isn't in the same place as the .fla file or in the code you put ackground instead of Background! AND you get the "The class or interface 'Backround' could not be loaded." error because in the Background Movie Clip Properties, you put the Linkage Identifier: Backround and the Class: Backround instead of Background. There you go!

+ - !

(2)

avatar for OSCARMEYERWEINER
OSCARMEYERWEINER

Apr. 8, 2010

Under rating threshold (show) If you want the background to loop properly, here is the code. class Background extends MovieClip { function onEnterFrame() { _x -= 7; if(_x < -2110) { _x = 2100; } } } The tutorial only makes it loop once.

+ - !

(2)

avatar for SammyZ
SammyZ

Sep. 9, 2010

Under rating threshold (show) I cannot get the bg to scroll (stuck on p.5) 'the class and interface could not be loaded'. Followed everything in the tutorial paying attention to CAPS LOCK and s p a c i n g , and everything is stored in the same folder. When the ship moves, ther background moves with it.

+ - !

(2)

avatar for Krosa
Krosa

Jul. 21, 2010

Under rating threshold (show) Myself I did something simple - instead of adding extra graphic into the already created background i just made a change in "if" function so it moves to "_x = 600" instead of "_x = 0" - still looped, however with a white break, but the city appears in normal way.

+ - !

(2)

avatar for PressTiege
PressTiege

Feb. 22, 2014

Under rating threshold (show) ☺ ☻ ♀ ♂ ♥ ♫

+ - !

(1)

avatar for 12sea21
12sea21

Aug. 23, 2010

Under rating threshold (show) PM Me for help!!!!!!!!!!!!

+ - !

(3)

avatar for legomyhobo
legomyhobo

Aug. 9, 2011

Under rating threshold (show) like in the last tutorial, make sure the B in the class background is the same as the saved background.

+ - !

(1)

avatar for lego_pi
lego_pi

Jul. 10, 2011

Under rating threshold (show) To those whose backgrounds don't scroll: When you first set the background as a symbol, did you move the registration to the top left corner? The center is the default, and it's wrong. Redo the symbolizing but make sure that when you see the 3x3 grid of tiny squares, the top left is black. If not, click it. When you copied the background image, did you do it right? Make SURE you followed page eight (step 1) very closely. Simply adding another instance of Background doesn't work, for some reason. Hope this helps!

+ - !

(1)

avatar for Jawburger
Jawburger

Jun. 24, 2011

Under rating threshold (show) okay, i've been doing well in all fo the other shootorials except this. First: I have CS5.5 because CS3 is old and cant be downloaded anymore, and i think that might be a cause to my troubles My problems are: My background moves with my ship. I press left, it goes left too, press up, it goes up too etc. It still scrolls but it also follows my ship. Second, I cant get the Background to get the seamless Background, it gets the white area on the left of the screen after the picture is done. I did all the things the tutorial said, but as i said, i have CS5.5 so i think thats the problem.

+ - !

(1)

avatar for metalmatt
metalmatt

Dec. 19, 2010

Under rating threshold (show) Mine only scrolls once. I even tried OSCARMEYERWIENER's code, but still no luck. Any help guys?

+ - !

(1)

avatar for jammed
jammed

Dec. 9, 2010

Under rating threshold (show) Symbol=Background, layer=Layer 1, frame=1, Line 1 The class or interface 'Background' could not be loaded. if you're having this kind of error. check the name of your Action Script files. in this tutorial all of it start with a capital letter.

+ - !

(1)

avatar for SammyZ
SammyZ

Sep. 10, 2010

Under rating threshold (show) TIP: if there is a star near the title, SAVE!! Remember to save regularly.

+ - !

(1)

avatar for calimbaking
calimbaking

Sep. 1, 2010

Under rating threshold (show) I can't get my background to loop. It just scrolls and leaves. Help someone please? Tell me what I'm doing wrong. And please don't just comment me here. I won't see it. Message me or email me. My e-mail is gamer_addict_for_life@yahoo.com. Thanks.

+ - !

(1)

avatar for aczom
aczom

Aug. 15, 2010

Under rating threshold (show) uhh, my ship doesnt have a transperent back... it is a PNG but its got a white rectangle surrounding it. how do i get rid of that part?

+ - !

(1)

avatar for kikasu
kikasu

Apr. 27, 2010

Under rating threshold (show) Guys I have a problem. The code for looping works fine, but my background doesn't work "seamlessly" as mentioned in the Shootorial. Basically, there's a gap of about the entire scrolling screen between the second, copied background and the 1st one that's meant to loop there. HELP!!!

+ - !

(1)

avatar for hamuka
hamuka

Jul. 30, 2011

Under rating threshold (show) My background won't scroll... :(

+ - !

(0)

avatar for Eddiechen
Eddiechen

Mar. 13, 2011

Under rating threshold (show) Is it have to be that my ship can't move or it is a mistake???

+ - !

(-1)

avatar for hamuka
hamuka

Jul. 31, 2011

Under rating threshold (show) @hamuka: I refreshed Flash, then the background could scroll. So never mind my first comment.

+ - !

(0)

avatar for chumponimys
chumponimys

Jul. 19, 2011

Under rating threshold (show) Here's a quick upgrade to the code that will make the background a bit more interactive. Just make sure to move the background down a few pixels first (you'll see why): class background extends MovieClip { function onEnterFrame() { _X -= 2 if (_x < -2110){ _x = 0 } if (Key.isDown (Key.RIGHT)){_x -= 3 } if (Key.isDown (Key.LEFT)){_x -= 1} if (Key.isDown (Key.UP)){_y += 1} if (Key.isDown (Key.DOWN)){_y -= 1} } }

+ - !

(0)

avatar for XAXA
XAXA

May. 12, 2011

Under rating threshold (show) Have you tried reading?

+ - !

(0)

avatar for PiromancerFreak
PiromancerFreak

Jan. 29, 2011

Under rating threshold (show) i wonder if this code will work for GM8 :P i hope so

+ - !

(0)

avatar for Foreign
Foreign

Nov. 23, 2010

Under rating threshold (show) @narfnin make sure you didnt group the backgruond with the ship lol also make sure the background scroll speed is diff than the ship scroll speed XD hope dat helps!

+ - !

(0)

  • add a comment