Under rating threshold (hideshow)
if these codes don't work for any of you (because you don't have the right flash version) use these, these should work fine:
onClipEvent(load) {
moveSpeed=10;
}
onClipEvent(enterFrame) {
if(Key.isDown(Key.RIGHT)) {
this._x+=moveSpeed;
}else if(Key.isDown(Key.LEFT)){
this._x-=moveSpeed;
}
if(Key.isDown(Key.DOWN)){
this._y+=moveSpeed;
}else if(Key.isDown(Key.UP)) {
this._y-=moveSpeed;
}
}
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
Under rating threshold (hideshow)
it won't work for me. ship doesn't move. just says 'The class ship.png needs to be defined in a class whose relative path his ship/png.as' in the errors box thing.. what does this mean
Under rating threshold (hideshow)
I did manage to get the ship roll across the screen but when i added the control text thingy for right arrow my ship didnt react at all, whats wrong. Heres the scrip ive written there so far:
class Ship extends MovieClip
{
var velocity;
function onLoad()
{
velocity = 10;
}
function onEnterFrame()
{
if( Key.isDown(Key.RIGHT) )
{
_x = _x + velocity;
}
}
{
_x = _x + velocity;
}
}
Under rating threshold (hideshow)
I'm stuck on page 11, I've followed the code and made it exactly the same, however my ship keeps flying to the right...
Under rating threshold (hideshow)
I have a problem it says
C:\Documents and Settings\Owner\Desktop\Flash Stuff\Shootorials\Ship.as, Line 2 Statement block must be terminated by '}'
C:\Documents and Settings\Owner\Desktop\Flash Stuff\Shootorials\Ship.as, Line 16 Syntax error.
My code looks like
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;
}
}
What is wrong?
Under rating threshold (hideshow)
could anyone help me out here? When on page 9 and i'm suppose to see a ship when doing a control-test movie, and dont see anything. I believe it is that i'm saving the files all wrong, as in wrong folder. What folder is the FLA (flash source file) And just save it randomly inside Adobe/Adobe Flash CS5 ? Reply would be really really nice, either here or on mail on this site. THANKS!
Under rating threshold (hideshow)
check out my shooturial inspired game at
http://www.kongregate.com/games/rosslyn568/planet-defender
suggestions appreciated. thanks
Under rating threshold (hideshow)
I haven't seen this said in the tutorial.
But you have to make sure you don't use capital letters in the wrong places.
And that probably needs to be put in this tutorial somewhere.
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)
My ship wouldn't move until i putted a motion tween in the action script. Do i need to do that or should it move by itself?
Please answer...
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)
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)
Yeah my ship isnt going anywhere, ive started over a few times and still nothing. It is saved as Ship, everything is corresponding. There are no errors apparently either
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)
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)
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)
i got stuck on page 9.
my ship dosent move
i debug and it says
an actionscript file must have at least 1 externally visible definition
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)
Okay, so I uploaded the ship file and It wouldn't let me save it as Ship. Because of this, nothing works. Can anybody help me?
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)
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)
I couldn't get my ship to move on stage 9, I had saved my all my files the same, I had the same exact code as in the picture, but then I realized that I hadn't clicked on "export to action clip" when I had made the ship into a movieclip.
Under rating threshold (hideshow)
I was soooooooo happy to see my ship move across the stage but one pro tip it doesnt tell you to save after u have done the programming i was about rdy to throw my computer across the room when that thought hit me XD
Under rating threshold (hideshow)
I was also stuck on page 9. I found another essential thing is to make sure everything is saved up to date in the same folder.
Under rating threshold (hideshow)
my ship wont move and i get the message "The class of interface 'Ship' could not be loaded"
and i have remaked it 3 times!
Under rating threshold (hideshow)
This is a great tutorial! YAY! I was (so) happy when my ship could actually move around the background (I drew dead people all over the scene).
Under rating threshold (hideshow)
sethia, it means you already have a class/identifier with the same name, so you need to delete that one or choose a different name