Under rating threshold (hideshow)
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 :)
Under rating threshold (hideshow)
How do I delete a symbol I can not find? I accidentally duplicated my background and it won't show up since it has the same identifier. It's not actually messing it up it just says the linkage won't work but the video still plays. I'm just worried about the future and Background Copy must be ELIMINATED.
Under rating threshold (hideshow)
I had a small problem with the background. Really really easy fix that even I (non-computer genius) figured out. It just seems so obvious... My ship was disappearing behind the background: Just put layer "ship" on top of layer "background" (swap their places) and it sends background to the... well, back.
Under rating threshold (hideshow)
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.
Under rating threshold (hideshow)
need badges :D
lol :)
i'm starting this tutorials :) thx a lot very useful ... not detailled but it is a good start and a push to search more on the net thx a lot :D
Under rating threshold (hideshow)
@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.
Under rating threshold (hideshow)
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
Under rating threshold (hideshow)
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;
}
}
}
Under rating threshold (hideshow)
Does anyone know how to set the y position of the background to zero plus the y position of the ship? I tried using "_y = _y + Ship._y" but it says C:\Users\mman2112\Desktop\Shoot flash\Background.as, Line 10 "The property being referenced does not have the static attribute."
PM me with the answer
Under rating threshold (hideshow)
@euanstevenson
I have the exact same problem. I'm using CS5 and whenever the ship moves so does the background. All of my code is right and I can't figure it out.
Under rating threshold (hideshow)
i Don't understand i try to put the background but it says i need it to put it in an another file that has 3.0 but when i tried it made many erros...... -Help anyone..
Under rating threshold (hideshow)
Lol. Go to the next page and it explains it all. Pages 7 & 8 shows you two ways of doing it..
But I have to admit; I spent 30 minutes trying to figure out how to do it :P
Under rating threshold (hideshow)
HALP? My background scrolls just fine, but theres this dreaded big white space after the second go that everyone is talking about. I've tried a few of the suggestions and none of them have worked. My code is class Background extends MovieClip
{
function onEnterFrame()
{
_x -= 2.5;
if(_x <= -1322.40)
{
_x = 0;
}
}
}
i made my own background, which is why the numbers are different
Under rating threshold (hideshow)
Problem please pm if you got a solution, ship moves, backgrounds scrolls, when ship moves background moves with it.....
Under rating threshold (hideshow)
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.
Under rating threshold (hideshow)
@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!
Under rating threshold (hideshow)
I'm guessing its an AS2 thing, but I set this.x to 0, and it scrolls just fine.
package {
import flash.display.MovieClip;
import flash.events.Event;
public class Background extends MovieClip {
private var scrollSpeed;
private var scrollWidth;
public function Background() {
scrollSpeed = 1;
scrollWidth = 2110;
addEventListener(Event.ENTER_FRAME,EnterFrame);
}
function EnterFrame(e:Event):void {
this.x -= scrollSpeed;
if (this.x < -1 * scrollWidth) {
this.x = 0;
}
}
}
}
Under rating threshold (hideshow)
By the way people, this tutorial is wrong on making infinite scrolling, both your backgrounds will eventually crawl to the same position. The way to fix it is, either drop _x to +2110 instead of zero when it reaches -2110, or remember the initial _x in onLoad and return to initial when _x < initial-2110.
Under rating threshold (hideshow)
This looping is not enough smooth. You need to change condition from (x < -2110) to (x < (-2110 + step_of_looping)) or (x <= 2110) because it makes a step before checking the position of background.
Under rating threshold (hideshow)
check out my shooturial inspired game at
http://www.kongregate.com/games/rosslyn568/planet-defender
suggestions appreciated
Under rating threshold (hideshow)
nvm I got it.
Original Post
--------------
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.
Under rating threshold (hideshow)
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.
Under rating threshold (hideshow)
use this:
class Background extends MovieClip
{
function onEnterFrame()
{
_x -= 1;
if(_x < -2110)
{
_x = 0;
}
}
}
it is on the screen there, but it works better than making tiny mistakes and having the error box yell at you. And now you don't need to write or copy from up there.
Under rating threshold (hideshow)
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?