Announcement

Basic LiveSwif Classes

nothing's Classroom- Basic LiveSwif================================Okay, I know many of you need help with LiveSwif for making games, so, my response is to bring you all up.

Questions to be answered:How do I make buttons?How do I make level codes?How do I make an HP bar?How do I make a sprite move? CompletedWhat is this timeline thing? CompletedHow do I make multiple levels withought it freaking out and going back to the first frame? CompletedHow do I use external images? Completed

Chapter One: The Workspace, and Basic Codes.Look up and see the big bar with a green line, and numbers? This is the timeline, and the numbers are the frames.Now, the white space is called the stage, and that is where you "build" your game.The Actions panel is where you put in actionscript (Now called AS)the Library hold EVER image in the game.

Q: How do I add an image to the stage from the library?A: Drag the icon in the library to the stage.

Q: How do I make a sprite/charcter?A: Go to Insert -> Sprite.

Q: Did that, and woah, what happened to the "stage"?A: Now, you are in drawing mode. Draw or paste your character in here. Now click the little tab that says "Scene 1" on it to go back to the stage.

Q: I pasted a picture of mario in there, but when I put a background on the stage, he has a white box. How does i getz rid of it?A: Download Photofiltre (Link at the end) and make a new picture (File -> New). Now paste the picture of mario in there. click the checkered button with a man on it towards the top. it says something about 256 colors at max. Click ok, then okay again, now save as a .gif or a .png. Now just put it into LiveSwif.

Q: Great, looks good. How do I make him move?A: Click on him and in the dropdown box in the Actions Panel, select onClipEvent(enterFrame)Type (Just copy...):

Great. Now, you probably have by now a background and stuff. Hit F12 to preview. Move him with teh arrow keys. Hmmmm.....that's weird. He stays in the same, and his sprites don't change! Don't worry, I'm working on figuring this out too. I think I have it down though. But, you don't learn it now! MWAHHAHAHAHAHA! Okay. How does he jump?copy and paste fellow:onClipEvent(enterFrame)

Hey jfig111, if that looks familiar, it's what I use in all my engines, and what you used in Moovlin 1! Lol, this is your credit.

Alright, F12 it.

Q:MARIO FALLS OF TEH SCREEN! :cries:A:...not much of a question, BUT, make a new sprite and put the floor that you undoubtly stole w/o credit from a sprite sheet. Now click the little tab that says "Scene 1" on it to go back to the stage.

Q: He still falls!A: Not done yet. See the little box that says instance name? Click on mario, and go to that box. Now type "player" in it. Do the same for the ground sprite, and type "ground". Neither with quotes, or caps. NOW F12 it.

Q: Yes, you are teh awesome! He moves when i tell him to, and he jumps too.So, I saw in the code "platform"?A: Ah yes, the main part of a platform game. Well, can you figure it out? Probably not. Make a new sprite and put some blocks in there or something. Get back to the stage, and drag it on. Give it the instance name of platform. F12.

Q: Cool, a level! Now, I already put the goal sign in, made it a sprite, and made it's instance name "goal" because you taught me well. What now?A: Well, put in this code:onClipEvent(enterFrame)

if(this.hitTest(_root.player)){ gotoAndPlay(2);}

Make a level on frame two. on when the action panel dropdown says On Frame, just type "stop();" withought quotes. MEMORIZE THIS, and do the same to the first frame. This stops the frame, because if you were too impatiant and made the level and F12'd it already, you noticed it was screwed up. Yep. Now try it.Amazing, huh?

Note, when adding platforms, copy and change the code for your sprite, and make sure that the diferent platforms have different names.Ex.

If this confuses you, download the Moovlin source and study it like a textbook. It for now is your holy grail.

Q: Sweet! Now, how do I make a main menu and code flash DOOM and code flash HALO and code linerider and code tactical assasin--A: stop(); there! Tactical Assasin....sounds good for my button and cursor tutorial. Next edit! Enjoy! I hope this helps.

Re: Basic LiveSwif Classes

How far did you get before you got lost? I barely understand the coding by itself, I'm just memorizing bits and pieces of flash. Works pretty good for me. If you read through it carefuly and follow along, I'm sure you'll have what I talked about in no time.

Re: Basic LiveSwif Classes

Oh, you're right! Oops. I wrote it at like 3am so of course I'd mess up. I expected more replies though, like desperate thank yous and cries for the next chapter...hmmm. So did any new flasher use this?

Re: Basic LiveSwif Classes

Can you help me?Im making a game and I'm stuck...I have a few movie clips.One is an attack clip which is a sword.Another is a clip with an enemy called evil.The last one is a player called player.Please give me codes to attack the enemy with the up key. I want the enemy to die when it touches the attack clip. Please help!

Re: Basic LiveSwif Classes

Breakeraj wrote:

Can you help me?Im making a game and I'm stuck...I have a few movie clips.One is an attack clip which is a sword.Another is a clip with an enemy called evil.The last one is a player called player.Please give me codes to attack the enemy with the up key. I want the enemy to die when it touches the attack clip. Please help!

Alrighty then. On your player MC, drag the attack clip (the sword) on to frame 2 or 4 or 6 or whatever. Lets call it frame x. Now, on the player type the movement code and so on. Next, follow along:

Code:

if(Key.isDown(Key.UP)){
gotoAndPlay(frame x);
}

Now, go back into the player, and click on the sword. Give it an instance name of "sword" without quotes. Then drag the player and enemy onto the screen. Then, instance name the enemy "enemy", withought quotes. Make sure that there is an empy frame on frame 2 of the enemy with a stop(); command. THEN, go back into the player and put this on the sword:

Re: Basic LiveSwif Classes

Re: Basic LiveSwif Classes

cowwer6 wrote:

do i need flash for this lol and the rest is nonsense

Wow, man. You have posted many posts in this forum, but don't know even basics about flash! No offense man, but when I registered I knew something about this, you can even find my first post in which i introduced me and Nothing suggested me to check out this post about Liveswif!

Re: Basic LiveSwif Classes

lilmb wrote:

Wow, man. You have posted many posts in this forum, but don't know even basics about flash! No offense man, but when I registered I knew something about this, you can even find my first post in which i introduced me and Nothing suggested me to check out this post about Liveswif!

wow im not fortunate enuf to be blessed with flash. and yea i dont know anything about flash exept how to animate plus i am dislecix and cant code well. yet i can read not code tho 2 muny letrs and numbers

Re: Basic LiveSwif Classes

cowwer6 wrote:

wow im not fortunate enuf to be blessed with flash. and yea i dont know anything about flash exept how to animate plus i am dislecix and cant code well. yet i can read not code tho 2 muny letrs and numbers

I found a program i can use called Game Maker and i don't need to be able to code I'm so happy!!!!!!!!!!!!!!!!!!!!!!!111111!!!!!!!!!!!!!!!!!!!!!!!!1111!1!1!!1!1!!!!!!!!!!!!!!!