Under rating threshold (hideshow)
blackapex - you need the virtual keycodes. Look at this example:
if( Key.isDown(01) )
that will do event if mouse is pressed. Mouse has VKC of 01. search google for list of virtual keycodes and you'll find all these values e.g. P=80
Under rating threshold (hideshow)
Does anyone know how to make the controls into WSAD? I do if( Key.isDown(Key.D) ) and i get an error that says W S A D are not properties.
Under rating threshold (hideshow)
Sorry for multiple posts, no edit button.
Seems it doesn't matter about the .as file ending with a '}' so to me it just looks like it might be a bit random if it works or not.
Under rating threshold (hideshow)
Actually i don't know what flash is doing. Just ran my script again after changing nothing and again it wouldn't move. Closed flash, re-opened the files and ran it and then it worked. Is there some sort of problem with CS4?
Under rating threshold (hideshow)
Was having trouble with the ship not moving for me in CS4. Finally found out the problem....
It seems flash is case sensitive so 'ship' and 'Ship' are treated differently. Make sure then that you type everything EXACTLY as it is in the tut. Class names, file names, etc. Everything.
One more important thing that i (finally) figured out is that the .as files have to end with the final '}'. If you end with a blank line the script won't work.
Hope this helps ppl out :) Good luck
Perhaps these things should be mentioned in the tutorial as it seems to me flash's actionscript can be very picky.
Under rating threshold (hideshow)
First of all, you have to save the actionscript file as Ship.as and name the movieclip's class Ship. Also, just do what the errors say to do. And, you have to double check your coding to see that it is exactly the same as kongregates other than the indents
Under rating threshold (hideshow)
Line 1: The class 'Ship' needs to be defined in a file whose relative path is 'Ship.as'.
class Ship extends MovieClip
Total ActionScript Errors: 1 Reported Errors: 1
what do i do???
Under rating threshold (hideshow)
Is anyone using 'FlashDevolper 3.0'? --- I couldn't get the CS3 trial for some reason so I got some free software (yes I created an account on the adobe site!)
Under rating threshold (hideshow)
I need some help please...
My code is the exact same as in page 11, but the ship always moves from left to right no matter what i do!
Help would be greatly appreciated, Thanks
Under rating threshold (hideshow)
EVERYONE WHO SAYS THE SHIP WON'T MOVE go back to the fla file. right click Ship in the library and go to linkage. UNCHECK EXPORT IN FIRST FRAME. if you test it again it should work. Hope this helps...
Under rating threshold (hideshow)
I need help.
Whenever I try testing it says in compiler errors
"The class or interface 'Ship' could not be loaded."
All the ship class is right(I checked 3 times)the ship movie clip has all the right stuff(name,identifier,class)are all set to ship.
Im using cs4 help?
Under rating threshold (hideshow)
I just started picking up flash again after many years off since I last used it (Flash 3). This tutorial (and the subsequent 7 as well) are hands down the best programming tutorial i've EVER seen. In addition, as of March 5, 2009, I got all the tutorials to work exactly as advertised using CS4 so to those who are having troubles, try FOLLOWING THE DIRECTIONS. 5/5. Favorited. Terry S
Under rating threshold (hideshow)
I know what to do now!After each time you change something in the script you save it and yes everything has to be the same name, for me its ship1 next time it will be different but YES I GOT IT!!Good luck fellow developers
Under rating threshold (hideshow)
*sigh* i downloaded cs4 it didnt work, downloaded cs3 and got up to the actionscript. I put in the codes according to how its supose to look untill the function code. It started looking different, and when i tryed it, it didnt work and i tryed making it look like its supose to and it still didnt work. Need help bad pleasee :D.
Under rating threshold (hideshow)
heater, have you first made the flash(named the ship Ship) and then done the AS named Ship and then published it
i by mestake published halfway through and it didnt work, did this and then it did
Under rating threshold (hideshow)
part of:
Class ship extends MovieClip
var velocity;
function onLoad()
{
var velocity=10
}
is completely useless in cs4
Under rating threshold (hideshow)
@ryalane and FluffyPker
Check and make sure your symbol, class declaration and class file are named the same and referenced the same.
For example if your class file is named "ship.as" your class declaration must be "ship" and not "Ship", the same is true with your symbol.
Thats what I think is screwing you up, but I may be wrong!
Hope this help.
Under rating threshold (hideshow)
I've created my own ship and saved it as a .png. I've already imported it into my movie and converted it into a movie clip, but the background isn't transparent.
Does anyone know how I can change the background from white to transparent?
Help would be greatly appreciated.