I'm Learning Flash!

Posted by Jondrusek on June 30, 2006, 3:55 p.m.

Well, I just started learning Flash just a couple of days ago, and because of my experience with GML, other programming languages are automatically easy to learn.

Flash is just like GML, except for the fact that it is more organized, the actions are different, and you have to use a lot more math(YAY!). I just learned how to creat instances just today. It sounds easy, but it's a bit trickier than Game Maker. Here's an example:

In GML: <step event>

if mouse_check_button_pressed(mb_left){

instance_create(x,y,object);

}

In Flash, it's something like this:

onClipEvent(enterFrame){

var i;

_root.onMouseDown=function(){

_root.object.duplicateMovieClip("newObject",i);

i++;

}

}

It's something like that, correct me if I'm wrong. Anyways, the movement is fun, you have to have an idea on how sin and cosine work, though. Compare these two:

In GML: <create event>

speed=20;

direction=point_direction(x,y,mouse_x,mouse_y);

In Flash:

onClipEvent(load){

_spd=20;

xdiff=_root._xmouse-_x;

ydiff=_root._ymouse-_y;

_rotation=Math.atan2(ydiff,xdiff)*180/Math.PI+90;

}

onClipEvent(enterFrame){

_x+=_spd*Math.cos((_rotation-90)*Math.PI/180);

_y+=_spd*Math.sin((_rotation-90)*Math.PI/180);

}

Anyways, I found out yesterday how to put Flash games on the internet, so I hosted a website on geocites(I don't like geocities at all, but it's free, so whatever) and it should work just fine. Keep in mind, this is my first Flash game, it actually not much of a game either. Sort of a "test"

http://www.geocities.com/jondrusek777/overhead.swf

It's not much, but it's a start. If anyone here is a Flash user, could you PM me sometime, and we could chat about it? I need to meet some other Flash game makers. =P

Comments

ReploidOf20XX 18 years, 4 months ago

I know a average amount of flash/actionscript. But I ain't sharing, lol!