February 09, 2012, 04:55:56 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Prowlie Welcome back! The site migration is complete and normal service resumed.
Advanced search
Pages: 1 [2]   Go Down
Print
Author Topic: Katatafisch needs someone to teach him basic actionscript  (Read 5286 times)
0 Members and 1 Guest are viewing this topic.
brettamatowski
You have 934,901 messages, 934,901 are new.
MotM
Senior Member
**
Offline Offline

Gender: Male
Posts: 558


Character design for next game in progress.


WWW
« Reply #15 on: June 09, 2009, 08:20:16 AM »

I don't even know where to start...

Sorry for being actionscriptretardant.  Fatsack
Logged

adzy-2k6
Senior Member
****
Offline Offline

Posts: 717


« Reply #16 on: June 09, 2009, 09:42:52 AM »

Dont worry, practically every one starts off like that. The basics of programming is knowing how to use maths to acheive a goal (well, in game based programming atleast). You should start by learning to add and compare variables etc. If you know some advanced maths (differentiation, integration, etc), you can even try to program something to be able to carry out those functions (Ive never attempted this yet though Tongue, and i cant see any usefull purpose for it). Well, my exams finish thursday, and i have that project myst to do, so it might be a while befor i get too involved Smiley
Logged

boundless
MotM
Heroic
**
Offline Offline

Gender: Male
Posts: 2464



« Reply #17 on: June 09, 2009, 10:18:43 AM »

I haven't used it, but I know kongregrate has actionscript tutorials here:
http://www.kongregate.com/labs
Logged

<a href="http://img.photobucket.com/albums/v661/Vector88/motm.swf?vTitle=May%2008.swf" target="_blank">http://img.photobucket.com/albums/v661/Vector88/motm.swf?vTitle=May%2008.swf</a>
Cel
Senior Member
****
Offline Offline

Gender: Male
Posts: 967


« Reply #18 on: June 09, 2009, 01:55:31 PM »

Guys, you can't just jump into making a game without knowing a thing about programing. You need to start off with simple exercises to learn the basics of programing. Seriously, you're making the learning curve much harder than it should be. Copying code for character movement from here won't teach you a thing. The ONLY way to learn is by fixing errors you've made in your code.

If you'd like to actually learn some basic programing, I recommend you do some simple exercises and post your code here for review.
I'm sorry, but that's the only way to actually learn something. Here are a few exercises for you to do, if you're up for it. This should cover the basics of Loops, Conditions and Variables. The last one involves a little work with angles. And do not copy code from google, Flash documentation has more than enough information. Trial and error all the way, boys and girls. (You can always ask specific questions if you get stuck, obviously)

1. Reverse a string manually (without using the built in functions for it)
2. Remove all occurrences of the letter 'a' from a given string.
3. Make a pyramid such as this one (with code)
Code:
   *
  ***
 *****
*******
4. Make a simple calculator.
5. Make an arrow that will always point at the mouse.
Logged

My DeviantArt

<a href="http://img.photobucket.com/albums/v661/Vector88/sfx_3.swf" target="_blank">http://img.photobucket.com/albums/v661/Vector88/sfx_3.swf</a><a href="http://img.photobucket.com/albums/v697/Espengenin/banner1star-1.swf" target="_blank">http://img.photobucket.com/albums/v697/Espengenin/banner1star-1.swf</a>
Katatafisch
MotM
Veteran
**
Offline Offline

Gender: Male
Posts: 1128


answer my riddle n the esophagus will let you pass


« Reply #19 on: June 09, 2009, 06:13:50 PM »

totally true, i will try that when i have more time, next week so to say...thanks for the tasks cel....
playing with mathematics should be no problem, still there must be some sort of basic list of commands to use... like the ";" at the end or the  if....then...otherwise...  clauses...i had some basic programming but not witch actionscript...i really want to know how to set up variables, setting up conditions with if..then relations or other ways...but i have no idea where to start or to read...

copying codes must not be a bad thing..saves time...and if youre able to understand whats written there and finding possible mistakes mustnt be a bad thing...there is a difference in being able to read and understand to writing it all by yourself...i dont want to copy though, i want to know what im doing...just dont know where the hell i should start...isnt there a list of basic commands out there...

thanks alot for the input and the help you as pros Tongue
Logged

my blog
my deviant

<a href="http://img.photobucket.com/albums/v697/Espengenin/banner1brownstars.swf" target="_blank">http://img.photobucket.com/albums/v697/Espengenin/banner1brownstars.swf</a>
<a href="http://www.humbleego.com/iaward/iaward_1.swf" target="_blank">http://www.humbleego.com/iaward/iaward_1.swf</a>
Cel
Senior Member
****
Offline Offline

Gender: Male
Posts: 967


« Reply #20 on: June 09, 2009, 08:55:34 PM »

It's all in the help. Syntax and samples and everything. Just search for it. Type "if" and it'll show you how to do it.
Logged

My DeviantArt

<a href="http://img.photobucket.com/albums/v661/Vector88/sfx_3.swf" target="_blank">http://img.photobucket.com/albums/v661/Vector88/sfx_3.swf</a><a href="http://img.photobucket.com/albums/v697/Espengenin/banner1star-1.swf" target="_blank">http://img.photobucket.com/albums/v697/Espengenin/banner1star-1.swf</a>
brettamatowski
You have 934,901 messages, 934,901 are new.
MotM
Senior Member
**
Offline Offline

Gender: Male
Posts: 558


Character design for next game in progress.


WWW
« Reply #21 on: June 10, 2009, 05:58:21 AM »

Ok, so I read up on some code last night and tried to do it from scratch on a character of mine.  I just tried out gravity but established other variables, too.  Below I posted my code, and I compiled the gravity.  But it's giving me an error:

1087: Syntax error: extra characters found after end of program.

I might be overlooking something in my code, but I can't seem to fix my mistake. Can you guys help?

Code:
onClipEvent(load) {
var speed:Number=0;
var walk:Number=3;
var grav:Number=0;
var falling:Number=0;
var jumped:Boolean=false;
var jumpHeight:Number=15;
var touchingGround:Boolean=false;
var scale:Number=_xscale;
}
onClipEvent(enterFrame) {
if(!touchingGround) {
grav++;
this._y += grav;
}
else {
grav = 0;
}
if(_root.ground.hitTest(_x,_y,true)) {
touchingGround = true;
}
else {
touchingGround = false;
}
}
Logged

Jaehl
Mobal Gloderator
Global Moderator
Veteran
***
Offline Offline

Gender: Male
Posts: 1417


/* No comment */


WWW
« Reply #22 on: June 10, 2009, 06:03:06 AM »

The problem is you're using ActionScript 2, but trying to export it as AS3. To switch to AS2, go to File -> Publish Settings, and change ActionScript version to "ActionScript 2.0".
Logged


<a href="http://i17.photobucket.com/albums/b90/Jaehll/Actionscript_Banner.swf" target="_blank">http://i17.photobucket.com/albums/b90/Jaehll/Actionscript_Banner.swf</a><a href="http://img.photobucket.com/albums/v661/Vector88/motm.swf?vTitle=oct%2Fnov%2007.swf" target="_blank">http://img.photobucket.com/albums/v661/Vector88/motm.swf?vTitle=oct%2Fnov%2007.swf</a>
Sarus translator:
<a href="http://www.jaehl.com/files/progress.swf" target="_blank">http://www.jaehl.com/files/progress.swf</a>
brettamatowski
You have 934,901 messages, 934,901 are new.
MotM
Senior Member
**
Offline Offline

Gender: Male
Posts: 558


Character design for next game in progress.


WWW
« Reply #23 on: June 10, 2009, 06:06:37 AM »

The problem is you're using ActionScript 2, but trying to export it as AS3. To switch to AS2, go to File -> Publish Settings, and change ActionScript version to "ActionScript 2.0".

Oh wow, I totally didn't realize I was in AS3...

Thanks, Jaehl.

EDIT:

I found an AS3 manual to hopefully help all of us "non-actionscripters".
http://livedocs.adobe.com/flex/3/progAS_flex3.pdf
« Last Edit: June 10, 2009, 11:02:37 AM by brettamatowski » Logged

Juggleballz
Funk Junky
MotM
Heroic
**
Offline Offline

Gender: Male
Posts: 4924



WWW
« Reply #24 on: June 10, 2009, 08:45:29 PM »

Hey there peeps,

Check this link out:
http://www.kongregate.com/labs

It contains some nifty tutorials for a side scrolling shooter, and also explains the terminology along the way. Definitely worth a look. Easy to follow and easy to learn!

Peace out
Logged

The value of life lies not in its length, but in its depth and breadth.
Brackenwood
   

 Logged
Pages: 1 [2]   Go Up
Print
Jump to:  

Theme by Pieter, based on Black Rain by Crip Powered by SMF 1.1.15 | SMF © 2011, Simple Machines XHTML | CSS

Page created in 0.076 seconds with 24 queries.