Recent posts by tsolron on Kongregate

Flag Post

Topic: Game Programming / AS3: Relative locations with movieclips and classes

What you said makes sense, so when I get home I’ll try it out. I did import the MovieClip, but I didn’t extend it.

The private var and public var part didn’t make a lot of sense. Making a private var for the char in the Gun function doesn’t make sense. And would I call the Gun function in the Char class?

 
Flag Post

Topic: Game Programming / AS3: Relative locations with movieclips and classes

Also the registration is center left. (for where x=0 would be)

 
Flag Post

Topic: Game Programming / AS3: Relative locations with movieclips and classes

Note: using ‘name’ (quotes) is just to show the exact name of the movie clip.

What I’m trying to do is have a movie clip with an instant name of ‘gun’ have it’s x value be the x value of ‘char’, plus the width of ‘char’.

I know this is a bit wrong, though I’m not sure what, these are the classes:
Game.as, Gun.as, Char.as

Game.as states that both gun and char are movieclips, and places them on the stage using addChild()

Char.as says: this.x = 200
(‘char’ is 50 pixels wide)

Gun.as says: this.x = char.x + char.width
(the part that’s wrong)
1120: Access of undefined property char.

The reason I can’t just do this.x = char.x + 50 is that the width changes. I might have other things incorrect besides just the Char.as, but I’m not sure.

I used the AS3 shootorial part 1 source, but changed some things around. If I delete the this.x= thing then everything is displayed, just not where I want them to be.

 
Flag Post

Topic: Game Programming / Noob question (AS3)

For what you give to somebody, you do just give them your swf. If they have a normal flash player they can play it (if you can play Kongregate games, then you have the flash player).

If they don’t have the flash player, they can download it at:
http://get.adobe.com/flashplayer/

 
Flag Post

Topic: Serious Discussion / microsoft being evil again

I like MS’s games and some of it’s other products (not IE though, I use FF).

I dislike the company itself though.

 
Flag Post

Topic: Game Programming / Amazing as3 tutorial:

I’ve only started learning AS3 yesterday (again, I started awhile back, but quit soon after), but I’m familiar with basic programming as I know some Lua, GML, and HTML. I’m sure that these tutorials will help me as they actually explain what each part of the code does rather than just saying ‘type this and you can now move your character’.

 
Flag Post

Topic: Game Programming / [FAQ] Making Games. READ FIRST!

Book Recomendation:

Learning ActionScript 3.0: A Beginner’s Guide

This is a great book to use, and explains things really well. You do have to have basic programming knowledge such as knowing what a ‘parent’ is, though by reading it you can figure it out.

http://www.learningactionscript3.com/

You can buy it here, which is Amazon:
http://www.amazon.com/gp/product/059652787X?ie=UTF8&tag=fma&linkCode=as2&camp=1789&creative=9325&creativeASIN=059652787X