Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 07-18-2012, 06:51 PM   #1
Fry
As Newbie
 
Join Date: Jul 2012
Posts: 10
Default AS Help

Okay, so I'm new to AS. I'm pretty familiar with how coding works. I've done a bit of scripting in mSL (mIRC Scripting Language) which is just a small IRC client, some Python, and I'm actually about to start school in the Fall for Computer Programming. I know how things are generally done such as setting and pulling from a variable, hash tables, if-then-else statements, loops, etc.

I'm looking for some good tutorials on some certain things. I plan on trying to create my first app for the iPhone. I know this probably seems like a big step, but as I said earlier I'm familiar with things and I can learn quickly.

I'll be using Adobe Flash Professional CS5 for coding and Adobe Illustrator CS5 for creating the game graphics.

As for the specifics of what I'm looking for:
-How to "spawn" multiple enemies (Instances I guess I should say) that are going to walk at different speeds.
-Save states (Highscores, collecting items that add up to unlock new items, etc.)

Also, I'm not sure if I'd be using hash tables to store things like the different weapons, unlockable abilities, etc or if AS has a better way of doing so.

Thanks!
Fry is offline   Reply With Quote
Old 07-18-2012, 10:52 PM   #2
xdeath
Deaths touch!!!
 
xdeath's Avatar
 
Join Date: Mar 2008
Posts: 776
Default

perhaps cartoonsmart.com would be of some help?

if your not into video tutorials, the id probably recommend either republicofcode.com or theflashconnection.com

both sites have some interesting tutorials that will help you im sure. just to set you on the right path. the first point you made in specifics about creating enemies that walk at different speeds. id do something like this:
ActionScript Code:
/* speed controls how fast it will move. x1 and y1 control were it will be created. */ var enemy:Enemy; var EnemyRef:Array; function makeEnemy(speed:Number,x1:Number,y1:Number){ /* have a movieclip in your library with the graphic of your enemy in it. right click it then go linkage. press export for actionscript and then were it says class type "Enemy". */ enemy = new Enemy(); enemy.x=x1; enemy.y=y1; addChild(enemy); // now by adding this array we can refer back to the enemy after its been created enemyRef.push(enemy); enemy.addEventListener(Event.ENTER_FRAME,enemyCode(speed)); } function enemyCode(spd:Number){ /* here we code how the enemy will behave. for simplisty we'll make it move left until it goes off screen then we'll reset it to other end of stage. */ if(enemy.x>0){ enemy.x+=spd; } else{ enemy.x=stage.stageWidth; } }

thats just a small example. i hope it helped.if a class had been used it would have things a little easier. but i guess this was enough for now.
xdeath is offline   Reply With Quote
Old 07-19-2012, 05:23 AM   #3
Fry
As Newbie
 
Join Date: Jul 2012
Posts: 10
Default

Awesome! Thanks a lot! All three sites are pretty helpful.

Do you know where I can find a list of iPhone APIs?
Fry is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:53 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.