Thanks! But I thiiink Flash Professional 8 is so old it uses Actionscript 2, not 3 (That's the name of the script languages). So you'll have to either upgrade to Flash CS3 or newer, OR use a tutorial for Actionscript 2.
I had a problem with the braces and even if I fixed it flash kept telling me that I was missing one. I rage quitted thinking I would never touch flash again and then I realised I had to save it before testing it again >_<
mine walks up and down too lol now i'm going to see if by pressing a secret key I can make something weird appear from the library. (??)
also I swear I didn't know bob was a nickname for robert.
Thank you for the tutorial! I came up with a problem, though, which is that I simply don't know how to run the script or "play" my game. I followed all of your steps until the end and even checked if there are any syntax-errors I could have accidentally made. But there are none. Could you tell me a different way to open the game expect for pressing CTRL and ENTER? When doing this nothing happens, even though I have both the .fla and the .as file open. I know it's a kind of embarrassing question but after searching the internet for a solution, I think asking you directly for help would be easier. Thanks!
Weird! Ctrl+Enter is the shortcut for going to Control->Test->Test Movie, so you can use that instead. Ctrl+Enter is a lot faster though! Maybe you can go to Edit->Keyboard Shortcuts and assign a new shortcut for it.. Though I couldn't find it when I looked there :S
Thank you! Now it works. But I can only see my character sticking at the same spot and running without me clicking anything. And I can't control the character either. I guess I'm just too dumb for this. :_: (Sorry for bothering you.)
Don't give up! D: Did you get any errors? If not, Flash probably doesn't run through your .as-file.
To check if Flash even tries to read the code, try writing trace("writesomething"); in the RobertCode(or what you called it) function! When the game runs, your message should appear in a window.
If it doesn't, Flash doesn't read your .as-file and it should be easy to fix: Make sure both files are saved in the same folder. Also make sure the name of the class and main function in the .as-file is the same as the name of the class in the Properties-panel in the .fla-file. All names are case-sensitive, so beware of small and big letters.
So finally I figured out what has caused the problem: The class name in the .fla should be the same as the .as script file name - I didn't quite get that. Also I had to name the script file before putting in its name in the .fla document class field (or else it won't work o-o).
Now that it's working I came across another "problem" (sorry for bothering you again ;_. When I change the direction of my character (I press left left left and then press right), it doesn't turn around on the same spot I pressed "right" but it suddenly jumps further. And this looks weird. How do I tell it to turn around on (nearly) the same spot?
In your .fla, enter your characters symbol. You'll see a small black cross somewhere. That's 0x,0y. (Should've mentioned this in the tutorial) When you turn directions, everything in the symbol will flip horizontally over this cross. Simply move your character left or right to place it over the cross. : )
Awesome resource that I'm sure lots of people will learn something from!
Amusingly, nose-walker guy stays wherever you walk him to, if you get to the final step, make him walk outside the box, then go back to previous steps. Having him stand off to the side looks like he's sadly observing his own creation. xD