Play the games, create the levels

Topic, Flash CS4 Help

Checkout our iPhone & iPad games!

You must register or log in to post a message.

Hexicube 14 years ago
  I put it at the bottom, not top o.O
Im 14 years ago
  I dragged it down to where timeline and motion editor is. o_O
Hexicube 14 years ago
  uh press F9
allyally 14 years ago
  So it doesn't really matter? Then where the coding area?
Hexicube 14 years ago
  uh AS3 is not easier than AS2, it's stricter...it's overly strict quite frankly, almost as bad as the fact C++ needs ; at the end of most lines but it's a core language so it needs to protect itself from making your computer explode...
[edit] I made a custom one by re-arranging everything...
Im 14 years ago
  I prefer Essentials.
allyally 14 years ago
  So which Layout do I want?
(aminator, Development, ect)
Im 14 years ago
  "As2 was much more different then as1, comparing to that, as3 is quite easy, more powerfull, and that I think is what makes people to afraid it."

Copied from some forum.. xP
Hexicube 14 years ago
  and so was AS3, anyway, I find it overly-strict, you have to create values using var it SUCKS!
it made too many disadvantages for me to consider it progress with it...
Im 14 years ago
  AS1 inspired AS2. AS2 was inspired by something OUTDATED. XD
Hexicube 14 years ago
  um...AS2 inspired AS3! :P
Im 14 years ago
  Wtf, that's just because you're OUTDATED. xD
Hexicube 14 years ago
  yeah I hate AS3, WAY too strict XD
[edit] operators are basic math
they are:
+ plus
- minus
/ divide
* times
^ power, for root do: a^(1/b) like you would a^b for power
% modulo, gets the remainder of a divide
there are some other ones but they are binary operators and make my head explode, and are also pretty much useless...
Im 14 years ago
  Umm.... AS2? xD
Hexicube 14 years ago
  perhaps the most important aspect of any game is this:
onEnterFrame=function()
{
}
within the {} goes code that is run EVERY SINGLE TIME BEFORE IT UPDATES THE SCREEN, and is probably used in every game...there are basic functions:
if()
you can put equality checks, calls to functions, anything that returns a value in there, if it's true it runs the code in the {}, or if there isn't any {} the next line of code doesn't execute if it's false
else
this runs if the 'if' before it returned false
paired with 'if' you get 'else if()' which you can guess what does
for(start,check,loop)
{
}
start: code run when beginning for loop
check: like an if, returns true/false for code within
loop: code run after the code in {}
the code in {} is ran until the check parameter is false
(may have names parameters wrong lol)
example:
for(a=0;a<10;++a)
{
trace(a*a)
}
output panel shows:
0
1
4
9
16
25
36
49
64
81
trace(text)
sends text to the console
while()
{
}
like an 'if', but runs code over and over until the comparison within the () is false
Im 14 years ago
  Idk how to say this, so I'll come with an example. xP
var varRight:Boolean = false;
var varLeft:Boolean = false;
var varUp:Boolean = false;
var varDown:Boolean = false;
var xspeed:Number = 5
var yspeed:Number = 5

function checkKeys(event:KeyboardEvent) {
if (event.keyCode == 39) {
//Right key is down
varRight = true;
}
if (event.keyCode == 38) {
//Up key is down
varUp = true;
}
if (event.keyCode == 37) {
//Left key is down
varLeft = true;
}
if (event.keyCode == 40) {
//Down key is down
varDown = true;
}
}
function keyUps(event:KeyboardEvent) {
if (event.keyCode == 39) {
event.keyCode = 0;
varRight=false;
//Right key is not down.
}
if (event.keyCode == 38) {
event.keyCode = 0;
varUp=false;
//Up key is not down.
}
if (event.keyCode == 37) {
event.keyCode = 0;
varLeft=false;
//Left key is not down.
}
if (event.keyCode == 40) {
event.keyCode = 0;
varDown=false;
//Down key is not down.
}
}
function movement(Event){
if (varRight == true) {
player.x += xspeed;
player.rotation = 0
}
if (varUp == true) {
player.y -= yspeed;
player.rotation = -90
}
if (varLeft == true) {
player.x -= xspeed;
player.rotation = 180;
}
if (varDown == true) {
player.y += yspeed;
player.rotation = 90;
}
}

stage.addEventListener(Event.ENTER_FRAME, movement);
stage.addEventListener(KeyboardEvent.KEY_DOWN , checkKeys);
stage.addEventListener(KeyboardEvent.KEY_UP, keyUps);
allyally 14 years ago
  Yes, but what do you type? what can I do with it?
Im 14 years ago
  Allyally... The actions panel is... obvious. o_O
You type in code (ActionScript 2/3) there. xP
allyally 14 years ago
  Well teach Me the very Basics of the Action Panel! I havn't tried using it yet, (and my ICT teachers quite good (Although weve had CRAP ones in the past)),
Hexicube 14 years ago
  well, you're as good as one of my ICT teachers! seriously, they know NOTHING about the Actions panel in Flash XD
I made pong in it(it was crap lfmao) and they were confused XP
Im 14 years ago
  Hmm... Phail. xD



MARC, the most advanced is not stop();. o_O
allyally 14 years ago
  Yeah, Im, the stage thing was easy, I just found the path tool REALLY annoying and in the end it didn't work very well, so I thought Id make it like that instead,
Hexicube 14 years ago
  what, the stop()? (yeah, I DESPISE using ; except in for loops, and C++ where you must use it)
[edit] Im it can take many thousands of lines to make a good game, but great codists can cut them out sometimes and make great games in hundreds...but it's still a load of garbage to the average guy!
function triangleNumber(number)
{
if(number>1) return triangleNumber(number-1)+number
else return 1
}
triangleNumber(1)=1
triangleNumber(2)=3
triangleNumber(3)=6
triangleNumber(4)=10
triangleNumber(5)=15
Im 14 years ago
  Hmmmm..... The most advanced code I have used is pretty much self-explanatory. o_O
Hexicube 14 years ago
  dude, piece of advice if you become coder:
COMMENT YOUR CODE!!!
I constantly get confused BY MY OWN CODE so it's VERY important to comment it, also if you leave a project for too long it can be better to start fresh so that your code will make more sense
if you get confused at how your code works it's game over for that project XD
[edit] Im what about interactive scrolling XP
Im 14 years ago
  You just simply move the image around and use motion tween. o_O
Even I know how to do that. xP

And also I think your knowledge is less than 1%. :P
allyally 14 years ago
  No, Im not that good yet! My knowledge of flash is about 2% of its potential.
Hexicube 14 years ago
  yeah I think I misread the sentence and thought you were making a camera that moves around a level XD
allyally 14 years ago
  Wait, what? Is one of us getting confused?
Hexicube 14 years ago
  uh I can do it for you, tomorrow...I need access to the game and I don't have that 4PM-midnight...
I need pointers though...

[<<] [1] [2] [3]

Flash game development

First post of the topic

murtaza64 15 years ago
  Could somebody please give me tips or help with flash?
Our free flash games   Games for your site   Games for your iPhone   Contact   Twitter @jpsarda & @bonuslevelorg