Under rating threshold (hideshow)
onClipEvent(load){
speed = 10;
}
onClipEvent(enterFrame){
if(Key.isDown(Key.LEFT)){
_x -= speed;
}else if(Key.isDown(Key.RIGHT)){
_x += speed;
}else if (Key.isDown(Key.UP)){
_y -= speed;
}else if (Key.isDown(Key.DOWN)){
_y += speed;
}
}
Try this code i use it and it works
Under rating threshold (hideshow)
To all those using CS4, if it does not qork, go on your stage and look on the right of the screen. Check if the script is ActionScript 2.0, and not 3.0. Good luck!!
Under rating threshold (hideshow)
chasencharran I had the same problem but what you are doing wrong is typing in Ship with a capital S when you made the symbol you made it with a lowercase S. Change the symbol name or code to the same thing as the other.
Under rating threshold (hideshow)
The something somone died sometime ago, now that you have read this you will proceed not to repost anything in any game or forum or site for 1000 days or all of everything will get you at whatever time you are not looking. Goodbye.
Under rating threshold (hideshow)
Okay I fixed them, now, it just says it couldn't find the class or interface "Ship" but the ship is saved as class "Ship" and the actionscript is saved as Ship.as on my desktop same as the flash file.
Under rating threshold (hideshow)
i tried the coding and got 9 errors. i tried fixing it but they stayed there. i checked test movie but nothing happened.
Under rating threshold (hideshow)
Oh i've fixed it now, it's ment to be the same name in the fla as the as file sorry for the tut to be gay but it's 4/5
Under rating threshold (hideshow)
GIRL DIED IN 1993, A MAN BURIED HER IN HER OWN homewhen she was still alive. The murderer chanted, "Toma sota balcu" as heburied her. Now that you have read the chant, you will meet this littlegirl. In the middle of the night she will stand at the... harmon28: side of your bedstarring straight int your ey...es.......She will suffocate you like she was suffocated. This story is sadlytrue. Ifyou post this 5 differnt times she will not bother you Thanks for the comment! i hate chain lettes T_T
Under rating threshold (hideshow)
great tutorial, it took me a while to figure out why you have to subract velocity to go up and add to go down, then I realized that the rulers measure from the UPPER left hand corner, I still have no idea why that is.
Under rating threshold (hideshow)
This is how I got my ship to move...it is different what the tut says...I am using CS4
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.DOWN) )
_y = _y + velocity;
if( Key.isDown(Key.UP) )
_y = _y - velocity
}
}
Under rating threshold (hideshow)
My ship isn't working, but I supose it's because the FLA file isn't at right place. Can someone tell me where it might be ?
Under rating threshold (hideshow)
I figured out the reason why the ship won't move. When you save your flash project, not the actionscript, change the format to CS3 instead of CS4. You will have to click yes a few times and you should be good.
Under rating threshold (hideshow)
to people having trouble making the ship move, i was too, make sure you click ont he advanced button on the ship properties and define a class. Its easy to overlook.
Under rating threshold (hideshow)
sorry to take up coment room but...
i types this in the actionscript file
class Ship extends MovieClip
{
var velocity;
function onLoad()
{
velocity = 10;
}
function onEnterFrame()
{
_x = _x + velocity;
}
}
and i tested it like in step 9 but my ship didnt move. please respond
Under rating threshold (hideshow)
I can't get it to work due to the actionscript file won't load, I have CS3 and if you know how to fix it, whisper to me
Under rating threshold (hideshow)
wtf, i typed the code exactly, but it says The class or interface 'Ship' could not be loaded. WTF do i do is this just because i have cs4 not cs3 someone plz leave a whisper on my profile
Under rating threshold (hideshow)
I can't believe this but it's actually working for me so far :) and guys... remember to save the script each time you do something to it. And then that will affect the game itself!
Under rating threshold (hideshow)
I think toxicityj addressed the issue. Check to see if you're using actionscript 2 and not actionscript 3; there is a big difference between the two.