Under rating threshold (hideshow)
this was no help at all for me. does not work i followed every direction and still nothing. make it easier to follow or make it right
Under rating threshold (hideshow)
What I missed, was on page 4, where It tells you to add linkage to your class file, and I bet everyone else missed it too, because it was an important part that I considered useless text that I could breeze through, because I thought I knew everything!
Under rating threshold (hideshow)
I am using "Adobe Flash Professional CS5" is that okay? an also when i try to test on page 9 it gives me an error saying " C:\Users\Jason\Documents\Jason Files\ Adobe game making\shootorial game\Ship.as, Line 1 Syntax error." any help???????
Under rating threshold (hideshow)
I'm stuck on page 9 and the Ship won't move. I have double checked the code and the linkage spelling/cases. Can someone please help.
Under rating threshold (hideshow)
Stuck on page 9 for a long time, using CS5.5. When you first convert to symbol, you NEED to click the tiny little "Advanced" options and copy the boxes such as "Export for Actionscript" AND name both fields as "Ship"... this was my problem.
Under rating threshold (hideshow)
great tutorials. unfortunately waaaay to many people have been abusing this amazing gift by copying exactly the same images and everything. atleast draw your own. or if your to lazy to do that atleast dont upload it to kongregate.
Under rating threshold (hideshow)
Okay so I got everything up to page 10 in the Class correctly, (spaces and typing) although my ship still won't move Right when I press the Right Arrow Key. And yes, I have saved all three files (game.fla, ship.as, and game.swf) together in the same folder. And when I converted the ship to a symbol I named all three areas Ship
I keep getting these same two Compiler Errors:
(Location) Ship.as Line 2 (Description) Statement block must be terminated by '}' (Source) {
(Location) Ship.as Line 16 (Description) Syntax error. (Source) }
Please help!
Under rating threshold (hideshow)
My error says "Symbol=Ship, layer=Layer 1, frame=1, Line 1 The class or interface 'Ship' could not be loaded." if anyone can figure it out, I bow down to you.
Under rating threshold (hideshow)
hi all, Just to let you know I'm a dev so if anyone encounters problems feel free to message me and i'll be happy to help
Under rating threshold (hideshow)
I am using Flash Cs 5.5, Action Script 2.0 and was having a problem getting my Ship to move as well (Page 9/10 of Shootorial), getting very frustrated reading all the comments with no answer. There was one mention of making sure the amount of open brackets needs to match the amount of closed brackets. So I looked at the code and played around with it, and eventually got it right. My ship now moves in all 4 directions. 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;
}
}
}
Hope it helps most of you having the problem!
Under rating threshold (hideshow)
If your ship only moves down and right no matter what key you press, make sure you used he minus (-) sign for velocity when pressing up and left, not the plus (+) sign.
Under rating threshold (hideshow)
Mine was stuck for awhile until I figured out that when I converted it to a movie clip, I did not change the class to "Ship". Make sure you click the advanced options buttons at this step to be sure that you set the class to "Ship".
Under rating threshold (hideshow)
@Hitandrun
1. Save!
2. Make sure your Ship.as is in the same folder with the Ship.fla
3. Make sure that the class Ship is the exact same (caps) as the .as file.
4. else, pm me
Under rating threshold (hideshow)
Stuck on page 9, I can't make the ship move. The code is perfect, the code and fla are saved in the same place, and the ship is a movie clip. What could I have done wrong? They're both capitalized Ship.... I'm using actionscript 2 like it tells me to
Under rating threshold (hideshow)
this is so exciting to me thinking "this is the same kind of coding that they used in GemCraft and Infectonator and all those games" and I am learning how. I dont think I will ever be able to make games like those, but still.
Under rating threshold (hideshow)
Extremely helpful! Thank you Kongregate! I have just learned something from this tutorial! Knowledge = power;
Kongregate = knowledge;
Under rating threshold (hideshow)
I've double checked the coding and everything is correct in the casing when I save but it just says at the bottom "COMPILER ERRORS - 1 REPORTED" then below "The class or interface 'Ship' could not be loaded."
On Flash CS4.
Under rating threshold (hideshow)
why my ship doesn't fly when i press the arrow keys? i done everything that the tutorial says and checked the names and they match, when i test movie it just don't move...
Under rating threshold (hideshow)
_x = _x + velocity; is correct, _x + _x = velocity; is wrong, dont do what i did, save you alot of time wondering why you have a syntax error.
Under rating threshold (hideshow)
Does this not work in CS5, because my code is identical to this one, but the interface in CS5 is different so im not always sure if im doing things correctly, but when i try to run it it just sits there but there are no errors or warnings
Under rating threshold (hideshow)
So what is wrong with my code?... Whenever I start the game, my ship automatically starts moving.
class Ship1 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;
}
_x = _x+velocity;
}
}
Under rating threshold (hideshow)
Be sure to check in the class. Make sure your "class Ship extends movie clip" and Ship save files are the same case. Having them in different cases will cause the ship not to move when the clip is tested.
Under rating threshold (hideshow)
If you guys want to use the WASD keys instead of the arrow keys, it's quite simple. You just need to input the keycode in the parentheses. For example if I wanted to use the W key to make the ship go up, I would use this code instead, "function onEnterFrame()
{
if( Key.isDown(87) )
{
_x = _x + velocity;
}
}
I haven't tried it yet, but it might be "key.87" instead of just 87. It's actually a lot different in AS3. If you want the other keycodes, this website has a list of them. http://www.aspdotnetfaq.com/Faq/What-is-the-list-of-KeyCodes-for-JavaScript-KeyDown-KeyPress-and-KeyUp-events.aspx
Under rating threshold (hideshow)
IF YOU ARE HAVING PROBLEMS:
Keep trying.
That feeling I got when I conquered the problem made it all worth while. And it will for you too. ;)
Under rating threshold (hideshow)
also had one hell of a time trying to get past page nine-- finally did it so here are some tips:
A- rather try writing the code yourself(i know that sounds ridiculous but it works)
B- check that when you are working on Cs 5, you work in actionscript 2 not 3
C- also when you make the .png a symbol be sure to set the class and identifier as Ship- note spelling and letter case
Under rating threshold (hideshow)
when i put the registration of the ship symbol as center it stays at the top right am i doing somthing wrong any ideas