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

Theonlywonderboy 17 years, 9 months ago

It looks like he's shooting toe nails

KaBob799 17 years, 9 months ago

I was gonna learn some flash yesterday, but some reason the program wont load =(

n1ko 17 years, 9 months ago

i would, but icant afford to buy it, and the free trial wont work on my computer 4 some reason.8(

Polystyrene Man 17 years, 9 months ago

Ew.

Tasm 17 years, 9 months ago

When I first read the blog title, I thought it said, "I'm learning how to flash.'

Jondrusek 17 years, 9 months ago

lol, how'd you manage to read it like that? Anyway, I updated it, and now it does NOT look like a toenail. I might update the link a bit later, but for now, I'm not in the mood. =P

Az 17 years, 9 months ago

ooh I know a bit of flash but you probably know more than me. I only know how to create an instance

Jondrusek 17 years, 9 months ago

lol, that is actually kinda tough to me =P It took more than just a simple instance_create thing, lol

RetroVortex 17 years, 8 months ago

The only thing I know how to make with flash is websites, (but thats really really easy!!)

Az 17 years, 8 months ago

LOL