ForumsProgramming ForumFlash actionscript 2 help

11 4430
wettonash
offline
wettonash
4 posts
Nomad

does anyone know how to make a simple a game in flash which can be multiplayer online

  • 11 Replies
wettonash
offline
wettonash
4 posts
Nomad

got a thing called smartfox server which can be used as a server for flash but i want to know how to be able to use as2 to be able to create a flash game that is capable of being an online multiplayer game

rjbman
offline
rjbman
215 posts
Nomad

So you got the server but don't know how to program for the software?

wettonash
offline
wettonash
4 posts
Nomad

so i need to start learning as3 then? because im used to using as2 but when i look at the coding for as3 i dont know where to start.

rjbman
offline
rjbman
215 posts
Nomad

Yes, that's probably a good idea. AS2 is pretty outdated, and AS3 is better organized imo.

And the server should have an API if it's designed for Flash.

wettonash
offline
wettonash
4 posts
Nomad

The thing is though im learning as2 at college and ive looked at as3 and i dont know where to start with it.

Elitemagical
offline
Elitemagical
1,207 posts
Nomad

The thing is though im learning as2 at college


Your college teaches outdated coding then. If the whole multiplayer thing isn't a college assignment (which I suspect since they're teaching you old versions of AS) then learn enough AS2 to get you past your assignments and if you're serious about this (which you'll need to be to make anything even remotely multiplayer) learn AS3 in your spare time.

and i dont know where to start with it.


Well AS2 and AS3 can't be too different. I can understand some AS2 and I've never touched Action Script in my life, but with the slight programming background I have it's understandable. If you're doing something as close as a previous version it shouldn't be difficult, but like I say, never touched Action Script, so I don't know.
manny6574
offline
manny6574
922 posts
Nomad

Well AS2 and AS3 can't be too different.


Acctually, they are! As in AS3 is a rewrite of ActionScript! The commands are the same like gotoAndStop() or play(); etc. But there is no such thing as on(release){}, or on(enterFrame){}. In AS3 code cannot be on movieclips on the stage. It can only be on frames and external classes. For events (like on(release){}etc.), the entire way of it has been rewritten, with listeners like:

mcname.addEventListner(MouseEvent.CLICK, myFunction);

function myFunction(e:MouseEvent){
//do somthing
}

in the frame script or document class or other external class. That's instead of:

on(release){
//do something
}

inside the movieclip itself!

also the properties like the x position don't start with an underscore(_), in fact almost nothing starts with an underscore.

But the entire rewrite makes AS3 way more organized, flexible etc. so I suggest you learn AS3 not AS2.
PrideRage
offline
PrideRage
148 posts
Nomad

I might have a good link for the multiplayer online thing.
Look here: [url=http://specialrelativity.org/blog/2007/08/05/connecting-with-java-over-a-socket-via-actionscript-3/]

PrideRage
offline
PrideRage
148 posts
Nomad

Sorry for the BBCode not working. But the URL is ok.

Showing 1-9 of 11