Games Achievements My Kong Sign In

Comments for Shootorial #2

« Back to Shootorial #2

lampy85

Aug. 02, 2010

Under rating threshold (show) i have this error as well Symbol=Background, layer=Layer 1, frame=1, Line 1 The class or interface 'Background' could not be loaded. i wonder if its becos my background file is jpeg.if so how do i change it to png? thanks

+ - !

(0)

lampy85

Aug. 02, 2010

Under rating threshold (show) i have this error as well Symbol=Background, layer=Layer 1, frame=1, Line 1 The class or interface 'Background' could not be loaded. i wonder if its becos my background file is jpeg.if so how do i change it to png? thanks

+ - !

(-1)

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)

twobees

Jul. 17, 2010

Under rating threshold (show) My Ship doesn't work.

+ - !

(0)

totoyamado

Jul. 15, 2010

Under rating threshold (show) nvm

+ - !

(0)

totoyamado

Jul. 14, 2010

Under rating threshold (show) my background and ship are moving together! but when i hide the ship layer the background is there, and when the background layer is hidden the ship is there! so why do they move together!

+ - !

(0)

VselwynV

Jul. 13, 2010

Under rating threshold (show) heeey all I have a cool code that definately works: 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; _x -= 1; if(_x < -2110) { _x = 0; } } } after that just double click the background in the libary then copy the background paste it twice then paste them left from each other so you have 3 times the background without gaps! after that just save it and test it! enjoy! (if this worked please press the +)

+ - !

(0)

jrvboffin

Jul. 07, 2010

Under rating threshold (show) AWESOME!!!! finally got my background scrolling by changing all of its names to bg1 and saving as a .PNG file to start with!! now for Shootorial #3 5/5

+ - !

(1)

jrvboffin

Jul. 07, 2010

Under rating threshold (show) @regerity: you siad you solved the error message by making the background a .png file... how do you do that?? (bit of a noob at all this coding stuff...)

+ - !

(0)

Scrooge_McDuck

Jul. 05, 2010

Under rating threshold (show) I noticed that there was a about a millisecond gap from the end of the background before it popped back in to repeat, meaning their would be a small jump. If you want it to really run seamlessly simply change the code to - _x -= 5; if(_x < -2110) { _x = -10; }

+ - !

(0)

icarly40000

Jul. 01, 2010

Under rating threshold (show)

+ - !

(-5)

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)

The_Red_Square

Jun. 30, 2010

Under rating threshold (show) NVM figured it out.....

+ - !

(0)

The_Red_Square

Jun. 30, 2010

Under rating threshold (show) I created my own background image and I have no clue how long it is... if someone could message me on a way to find out it would be greatly appreciated. I am using CS5. I used to know how to find it in CS3....

+ - !

(-2)

thisisatree

May. 30, 2010

Under rating threshold (show) Nevermind! It finally worked. I got the files.

+ - !

(0)

thisisatree

May. 30, 2010

Under rating threshold (show) I can't download the source files, is there any other way to get them? Other than that this is a great tutorial as far as I've seen.

+ - !

(0)

dudew

May. 29, 2010

Under rating threshold (show)

+ - !

(-25)

edheri

May. 26, 2010

Under rating threshold (show) Could anyone explain why using "class Background extends MovieClip { function onEnterFrame() { _x -= 7; if(_x < -2110) { _x = 2100; } } } " instead of the code provided in the tutorial actually makes it loop seamlessly? Where does that 2100 come from?

+ - !

(0)

iGreenPuffle92

May. 02, 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)

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)

MrBojangles528

Apr. 23, 2010

Under rating threshold (show) I am having trouble with this. My background image isn't scrolling correctly. I c/p it so it would loop seamlessly, but only the second instance resets and continues to scroll. Any ideas why the first image isn't repeating?

+ - !

(0)

duffman197

Apr. 22, 2010

Under rating threshold (show)

+ - !

(-7)

inthrees

Apr. 20, 2010

Under rating threshold (show) nevermind, i should finish the tutorial before commenting =p

+ - !

(0)

inthrees

Apr. 20, 2010

Under rating threshold (show) if(_x < -2110) { _x = 600; } repositions the background just off screen for a smooth looping effect instead of having it pop into being at 0 offset, but hooray these tutorials are great so far, thanks. =D

+ - !

(2)

iGreenPuffle92

Apr. 11, 2010

Under rating threshold (show) I finished my Game! Please Play it Here! http://www.kongregate.com/games/iGreenPuffle92/maxotonic

+ - !

(0)

OSCARMEYERWEINER

Apr. 08, 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)

masta0021

Apr. 06, 2010

Under rating threshold (show) @lareeh, the ship and background may be in the same symbol..

+ - !

(0)

SAM0095

Apr. 05, 2010

Under rating threshold (show) AS3 makes a difference doesn't it...

+ - !

(0)

RaymondSamuel

Apr. 02, 2010

Under rating threshold (show) having a small issue here, my background doesn't move. it gotta be a small issue somewhere. Any hints?

+ - !

(0)

apexrose

Mar. 31, 2010

Under rating threshold (show) um.... i have an odd little problem. it seems like the background moves with the ship. any help?

+ - !

(0)

mithrilbalrog

Mar. 30, 2010

Under rating threshold (show) I'm getting a gap the size of my scrolling speed after the second background. How do I fix this?

+ - !

(0)

Kizzi

Mar. 27, 2010

Under rating threshold (show) lareeh: 'Backround' that would be your problem

+ - !

(0)

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

+ - !

(40)

Regerity

Mar. 21, 2010

Under rating threshold (show) can someone tell me how to create a seamless loop with code?

+ - !

(0)

Regerity

Mar. 21, 2010

Under rating threshold (show) nvm i got it. the background has to be a png file

+ - !

(0)

Regerity

Mar. 21, 2010

Under rating threshold (show) I have the same problem as lareeh. Does anyone know why it keeps saying "symbol=Background, layer = layer1,frame=1,line 1 The class or interface 'Backround' could not be loaded"?

+ - !

(1)

Tegnano

Mar. 14, 2010

Under rating threshold (show) http://www.kongregate.com/games/Tegnano/tutorial-game

+ - !

(0)

Sutafuzz

Mar. 13, 2010

Under rating threshold (show) thecoolwolf: Drag your background layer under the ship layer.

+ - !

(0)

thecoolwolf

Mar. 13, 2010

Under rating threshold (show) my ship is behind the backround -_-

+ - !

(0)

Zetalight

Mar. 07, 2010

Under rating threshold (show) Would have been nice if they had sections for vertical shooters... To get it to scroll vertically, use _y += (input #) and for the loop, use (_y > (input #). Hope that clears things up!

+ - !

(0)

HighLordVin

Mar. 01, 2010

Under rating threshold (show) lol; make sure all the mentions of background have the "b" caped also, you may have to resave it

+ - !

(0)

kiwik

Feb. 24, 2010

Under rating threshold (show) bbatarai333 when you change simething save the script isnt an auto save

+ - !

(0)

ScaryFighter

Feb. 23, 2010

Under rating threshold (show) Oh what you need to do is you have to restart your computer. Then it should work.

+ - !

(0)

bhattarai333

Feb. 23, 2010

Under rating threshold (show) I'm getting the same 3 messages...

+ - !

(0)

bhattarai333

Feb. 23, 2010

Under rating threshold (show) I think I might have fixed it but I still get this message: The class or interface 'Backround' could not be loaded.

+ - !

(0)

bhattarai333

Feb. 23, 2010

Under rating threshold (show) No matter what I do I can't get the backround to scroll, I keep getting this message: The class 'Background' needs to be defined in a file whose relative path is 'Background.as'. and: Statement block must be terminated by '}' and:Syntax error. I have my backround code like this: class ackground extends MovieClip { function onEnterFrame() { _x -= 1; if(_x < -2110) { _x = 0; } } Could some one help?

+ - !

(0)

Squishybrick

Feb. 22, 2010

Under rating threshold (show) Well that's just mean, misleading us by properly spelling a commonly mispelled word...

+ - !

(0)

Huckebein

Feb. 21, 2010

Under rating threshold (show) Hmm, I put the background layer under the Ship layer, but it seems to go over the ship.

+ - !

(0)

Xirate

Feb. 21, 2010

Under rating threshold (show) I can't download it. Can someone help?

+ - !

(0)

Matiel_Migite

Feb. 20, 2010

Under rating threshold (show) It works every time however we are making trivial mistakes... Once you make it work by problem solving. If you cannot do that then go learn programming logic and come back. However, I will admit the tutorials are unclear, they make you learn flash by problem solving.

+ - !

(0)

  • add a comment
Developers Players Support YouTube TikTok X (Twitter) LinkedIn
Join the conversation Join Discord
Terms Privacy Code of Conduct
© 2024 Kongregate