Beginner need some advice how to write code in AS3 - actionscript-3

I'm a beginner in programming world, never touch any programming language before. But last 3 days I decide to try make a flash game, I looked some tutorial about AS3, try it, yes I understand a little bit. But I'm still confused about this:
How do I know or to decide what codes I write first, what next? example: I want to add a hero, then a enemy, then a tiles, then a background, event listener.
Is it okay if I write code randomly, example: first I add enemy, then add tiles, add background, then add hero, etc?
What is the best way to completely learn all AS3 codes, especially about flash game dev?
I'm now in frustration mode, so I decide to learn from you all who have mastered AS3.

Check out this guide by Michael James Williams. I was in the same situation as you, and that guide helped me a lot. It goes through a lot of the basics and does a good job of explaining each step.
To answer some of your questions, the order in which you code stuff doesn't matter too much. You can always go back and adjust your old code, and you'll definitely end up doing that at some point.
For learning AS3 syntax, just look through some examples and tutorials, and don't be afraid to read the official AS3 docs. They might be intimidating at first, but once you start learning some of the terminology, they're very helpful.

you can try some video tutorials like these
http://www.lynda.com/ActionScript-tutorials/AS3-language-fundamentals/123492/129625-4.html
http://www.lynda.com/Flash-tutorials/Building-Flash-Games-Starling/98951-2.html?srchtrk=index:1%0Alinktypeid:2%0Aq:flash%2Bgames%0Apage:1%0As:relevance%0Asa:true%0Aproducttypeid:2

If you're frustrated NOW, are you sure that you're ready to invest a couple of YEARS in becoming half-good with Actionscript? You'll have to like learning from your mistakes (an excellent way to learn, actually), because you will make thousands of them and they will cost you thousands of hours!
Do NOT write 'randomly' unless you want to greatly lengthen your time to mastery. Everything you do should have a purpose. I would start (if I were starting again) by giving myself a series of the smallest challenges: make an object appear; make it disappear; make it appear in one second from now; make it appear when I tap a key or click my mouse; make it move across the screen; make it move back; make it follow my mouse... etc.
There are many hundreds of basic programmatic elements like these that will add to your growing grasp of logic, data-structures and language. There are usually many ways to accomplish the same task -- learn and practice all of them.
Luckily, the Internet is full of good tutorials and references to Actionscript, and some decent forums like this one where you can get help.

I know this is king of old but someone might still find this useful.
I think that if you are serious about game development and also want to learn some techniques that are independent of the platform (Flash/AS3 in this case) you should use a framework.
For Flash the best game framework is the Starling along with Feather for UI.
They run on Stage3D which means that run on the GPU not the CPU which make them very fast.
With Starling you can also create mobile games that run in AIR so I think it really is something to consider.
On hsharma.com you can find a free video tutorial that goes through everything you need to know to get starting with game development so it should answer the question on how to create enemies, backgrounds, etc.
Hope this helps someone.

Related

Character animation with bones for AS3

I'm developing some platform-like game in Flash using AS3. Everything is quite clean. The whole code is class based etc.
I've already done the most of the mechanics, and now I need to do some main character animations. I've already designed it, and it's waiting to be animated as a vector graphics.
A the problem starts here... What is the proper way of doing that? I would like to use bone tools to make it smooth. But as far as I tried to find any materials about it on the Internet everybody just do some simple animations and play it separately one after another. How about playing legs animation simultaneously arms and other parts of the body? Maybe some tricky usage of state machine... I don't know.. Is there any ready solution for that?
More tips is better here, or even some tutorials - just anything.
This tutorial by Chris Georgenes seems to be exactly what your looking for: http://www.adobe.com/devnet/flash/articles/character_animation_ik.html. Chris teaches the reader while animating a simple character. Having a strong overall knowledge of the bone tool will allow you to get the nice crisp animations you seek. I sincerely wish you the best of luck with your project.

Manipulating an image of a face with Flash and AS3

everyone. This isn't as much of an specific technical question as it is about asking for some guidance on which steps should I follow.
The thing is I haven't worked with Flash in general for over a year and I'm very rusty, but now, here at work, I need to create an app that takes a picture, detects the face in said picture and then applies a certain animation effect. For example a slap to the face, so the detected face would shake from side-to-side or maybe something similar to the Fatify app, where it takes the pic, makes the person look fat and then you can touch it anywhere to see it animate. You get the idea.
So, my main problem is, that even after doing some extensive research, I'm still not clear on what the best method is or which would be the best tools to accomplish the animation effects on the detected face. I have read about Joa Ebert's Image Processing Library, but that seems to have been forgotten for quite a while and seeing as I have been out of the loop from the world of Flash for quite a while, I don't know if there's any novelty that could be what I'm looking for. I have also looked at countless image manipulation blog posts and tutorials, but most of it is simple stuff that doesn't really apply to what I need.
So, in summary, I would really apreciate it if anyone could point me to resources or topics that I should look into, that might prove useful for what I need to accomplish.
Thanks.
You should be using OpenCV. The library is quite extensive and has been ported to operate in many languages. OpenCV has an api for facial tracking. We've used it in our studio before for simple face tracking games.
These links are kind of dated, but should put you on the right track.
http://www.francois-tarlier.com/blog/marilena-opencv-port-to-actionscript-3-as3-flash/
http://www.marcpelland.com/2009/03/16/face-detection-opencv-in-as3/

Flash 3D Navigation Wall

I would like to create a 3D navigation wall similar to http://www.dior.com/couture/en_us/The-House-of-Dior/THE-HOUSE-OF-DIOR.
I've seen a similar plugin in http://www.flashloaded.com/flashcomponents/3dwall/.
However, I want to create it from scratch as I need to customize it very much.
Any starting template you know would be helpful.
A template might be helpful, but if you truly need to customize it very much, I would suggest that you learn the ins and outs of a nice 3D code library. If you do find a template, you will probably spend just as much time tweaking it only to find that it doesn't allow for what you want.
There are many existing 3D libraries for ActionScript that could make this a pretty straightforward task. PaperVision3D, Away3D or even the native Stage3D API in the Flash Player could get you going in the right direction.
If you want to customize it and have full control over the content you better learn something from scratch: Alternativa3D, Away3D, Flare3D (quite yeasy), Minko.... Those are the most popular and depends on your needs.

(Why) Should I choose Unity 3 or Cocos2d (or something third) for my app?

My colleague and me made an HTML 5 iPad game ( http://braille.gandzo.com/ ) and we would like to upgrade it, and our framweork is not enoguh, for what we want. Some of the things we would change are: graphics update, animations/"effects", multi-player, achievements and so on. The game would stay 2d. Now, as far as I understand, both Unity and Cocos would be good for this task, with Unity having the advantage of being multi-platform.
What I want to know is are there unknown qualites/"flaws" to these two programs which would influence my decision (maybe even by choosing something else). Examples that come to mind are "Unity is too complicated/has too much unneeded options/hoops because it's made with 3d in mind" or "Cocos is significantly more suited for 2d games".
If the game is pretty much in 2d... I would suggest for cocos2d. I am working on cocos2d for past 1 and half years... I don't have experience in Unity but ya my colleagues who used to work on Unity had so many problems with animation, texturing etc.
BTW I was not able to play you game on my Chrome. :)

Any ideas on how to create a flying tile 3D transition just via script/classes?

Right guys,
I have been looking all over the internet for a tutorial to which will show me how to re-create this effect on images...
http://flash-effects.com/tutorial-image-transition-flying-tile-3d/
I dont want to install these 3rd party components, because the project I am working on at present, may in future need to be edited by other designers/developers.
Is there anyway to do this just via scripting???
Any feedback would be appreciated, im ideally looking for a tutorial...
Most of what you're looking for is here. Then download the Bitmap.zip example and look through it. Although I will reiterate what the page says, you really should buy the book. It's quite good and teaches a lot about Flash in general, not just game programming.
You'd still have to figure out how to randomize the height and width of the pieces, add an onClickListener, and then move the pieces. From the example you provided it looks like they're just moving them back and forth in a z-dimension.
Hope this helps.