Under rating threshold (hideshow)
Okay! Today I decided, after playing on Kongregate, that I wanted to learn how to create my own game in Flash. So I just downloaded CS3. I have a 30 day free trial. Which is good, as I know nothing.
Attempted to do the “Shootorial” series. It took me about 4 hours to get through a 5 minute tutorial, because I did not realize that ‘velocity=10’ is different from ‘velocity= 10’. Apparently Flash is both case-sensitive and spacing-sensitive. Good to know.
Anyway, I drew my own little spaceship and got it to move around the screen! I feel very accomplished now, and figure that another 36 years at this rate and I'll be cranking out "Cursed Treasure" and "Epic War" and games like that.
Under rating threshold (hideshow)
Ok, i was stuck on page 9 fora a long time, and couldn't find any answer as to why my ship stood still, but then i realized that my class was named Ship, but my code was saved as ship.as. So yeah, you need to match the casing as well. Hope this helps someone.
Under rating threshold (hideshow)
For whom the ship doesn't move, make sure you're: using ActionScript 2.0 not 3.0, saving both files into the same folder, watching for case when naming files and properties.
Under rating threshold (hideshow)
All right, i got this code:
class Ship extends MovieClip
{
var velocity;
function onLoad()
{
velocity = 10;
}
function onEnterFrame()
{
_x += velocity;
}
}
Note that the _x is += (adding) velocity, and not becoming itself + velocity,
Try this. then try to make the ship as an instance name (SHIP).
If nothing works. pm me.
Under rating threshold (hideshow)
When doing the tutorial, make sure you save the file the same name as the "class" name. Sample Line 1: "class Ship extends MovieClip {" you would save the file as "Ship".
Note: You cannot "test movie" unless your script files have been saved already.
Also Note: make sure the name of the actual MovieClip is the same as the class name.
2nd Note: Make sure when you start, you use "Flash File (ActionScript 2.0)"
Last Note: Read the tutorial carefully and click on the pictures to make them larger. If you get any errors, make sure your script looks like the tutorial's and that all script files have been saved.
P.S.: Make sure all Brackets "{" pair up with an end Bracket "}" somewhere in the script. The number of brackets and end brackets should be the same.
Under rating threshold (hideshow)
I had alot of the problems people are commenting about, and here are my solutions:
1.Start with actionscript 2.0, because 3.0 wont work
2.If you ship stands still, then make sure your code is the same as the one in the pictures, right down to every TAB, ";" and "{" / "}" even capital letters matter!
3.you must save both he script and the flash in the same place before it will work.
3.
Under rating threshold (hideshow)
Current Version of the Flash program i use only supports ActionScript3.0 . so you cant use onLoad() or onEnterFrame() function but you have to do it with EventHandlers. I had to consult other tutorials to get this working.
Under rating threshold (hideshow)
I keep on getting 5007: An ActionScript file must have at least one externally visible definition. I guessing it's because I'm using AS3 instead of AS2. Could someone verify and if this is true explain to me why.
Under rating threshold (hideshow)
Wow, spent over an hour from pages 1 to 9 and reading the top comments only to find that the ship still isn't moving. Read a thumbed down comment about saving before testing and it moved.
Under rating threshold (hideshow)
Make sure you save. Then save again. Everytime you change something, and before you test, save. It's impossible to stress enough. Save!
Under rating threshold (hideshow)
All right, i got this code: class Ship extends MovieClip { var velocity; function onLoad() { velocity = 10; } function onEnterFrame() { _x += velocity; } } Note that the _x is += (adding) velocity, and not becoming itself + velocity, Try this. then try to make the ship as an instance name (SHIP). If nothing works. pm me.
KEEP THE COMMENT ALIVE! [+].
PM me for help ^^
Under rating threshold (hideshow)
I'm stuck. I put in the code, and when I go to Test Movie, the ship stays where it is. I get a compiler error saying that "The class of interface 'Ship' could not be loaded." What am I doing wrong?
Under rating threshold (hideshow)
(ATTENTION!!!!)Ok who ever is stuck on Page 9 thanks to another player, if the ship is not moving, go to your action script and save it! The .swf runs on the action scipt you saved first, so please, if your ship wont move SAVE THE ACTIONSCIPT FILE!
Under rating threshold (hideshow)
I am stuck on page 9 I am having the same problem that I had last time, there is NO ship whatsoever on my test. Nothing, just a blank page. This needs to be updated cause the current version of flash is CS5, not CS3. And really, basically everyone is getting stuck on this thing.
Under rating threshold (hideshow)
Many thanks for your very helpful tutorial, so far, this is my first game made in flash as2 http://browse.deviantart.com/art/Flash-game-study-AS2-276658706 of course, i could not have done that without this helpful, easy-to-folow tutorial. I wonder if you already have an offline version of this shootorial in AS3? i am an (aspiring) artist and i dont have any background in programming.
Under rating threshold (hideshow)
Oh man, i made this in AS3 and its hella lot different and a bit harder. and now the ship cant go diagonal-ways, because AS3 uses Event Callbacks. It was way simpler and better with checks man, they could put their new stuff in(Event Callbacks for keyboard pressing and releasing) but why delete Key.isdown? That sucked.
Under rating threshold (hideshow)
Taxi: You have to use an image-editing tool to "delete" pixels around your pixel art, which is not MS Paint. I recommend Paint.NET because of its easy-to-use interface and extended features. If you do decide to use it, use the magic wand, click on your ship and press delete. Should fix it. Nexus: The tutorial is outdated, therefore you must use the outdated software that was available at the time. You need CS3, not CS5(at least I think).
Under rating threshold (hideshow)
I managed to get to page 10. My ship moved from left to right on page 9, but when I change onenterframe function it won't budge.
Under rating threshold (hideshow)
I DONT GET IT i tried to make the ship thing move but it wont let me it stays the same and it says error message Symbol=Symbol 1, layer=Layer 1, frame=1, Line 1 The class or interface 'Ship' could not be loaded.
Under rating threshold (hideshow)
Im stuck on step 9, just as many other people are/were. I followed all the instructions very carefully, and even redid the whole thing twice but it still doesn't move.. i've made sure the caps, and spacing is correct, and that im using AS2 instead of AS3. Can anyone help please?? pm if you can
Under rating threshold (hideshow)
YES I GOT it i got past page 9 wat i did: saved the action script into a folder on its own(make sure same letters and case etc) and then i saved the flash file to the same folder
Under rating threshold (hideshow)
I had a big problem on page 9 too. It was because I created my own image, and didn't link it to a class, meaning good code wasn't affecting anything. caps matter, spaces and empty lines not a whole lot.
Under rating threshold (hideshow)
Too bad the shootorials aren't made for AS3. It would be great if they were: it's hard to find good tutorials for AS3.
Under rating threshold (hideshow)
Yay! My Ship can do the fly!
The Script could be shorter though:
I.e.:
foobar = foobar + 6
Is the same as
foobar += 6
Just sayin' :D
PS: I see you are using a Mac....
I iz not Amused! >:3
Besides from that:
5/5 for the easy tutorial even a random Techno-phobe could understand.
Under rating threshold (hideshow)
I have a problem, i have EXACTLY what i was suppose to, this this came up: Symbol=Ship, layer=Layer 1, frame=1, Line 1 The class or interface 'Ship' could not be loaded.
please help me :( message me or something