What is wrong?

Hi guys,

i’m very sad now… i almost finished Definitive Guid (book one) and i feel that i still can’t create script from a ------> z but now i can understand the codes, i want to say **Definitive Guid ** is the best book to learn AS. and i recommend it to anyone who wants to starting AS. i donno now where is the problem in my mind is there anyone face the same problem in his starting :hangover: .

and i want to know all things in the same time… i’ve a lot of resources and materials which is the best from all sites so i write a lot of things in everything and i still donno know how to create and finish the code [color=red] ( maybe the problem in how i’ve to think ) [/color] (-:
i donno know how to solve my problem and be expert in AS.
i love Flash and ActionScript and i need to take it the main job in my life and i hope anyone helps me to solve my problem :hangover: .

FlashSwimmer

like with anything, time and effort will help you reach your goal.

Iam just starting to understand variables , it took me a while, but just constantly looking at flas , tutorials and then actually contructing something with variables, made me understand them alot more.

Just give it time, and keep working hard, it will click one day and you will start to understand everything much more clearer.

thanx for your replay Soulty but i can understand if it variables, array, function… but i can’t think in how to do it and think in it.

Did you get me? :hangover:

thats what this site is for, asking and learning in which methods are used for what reason.

edit:: usually there is not one way to do something, so its all about experimentation.

so how can i get this expermentation…
i need the expert to tell us (beginners) what did they do? to get this expermentation :hangover:.

i’m waiting to see what the experts did? =)

thanx
FlashSwimmer

well i’m nto an expert but you just gotta experiment. So what i did was i thought of something i wanted to do in my brain, and asked people and tried it out myself. and i learnt it that way, but it takes lotttsss of time :slight_smile:

i spent alot of time in and ActionScript… reading and watching but :hangover: till now i didn’t do anything from a -------> z.
i think i need to stay alone ( me and Flash ) until understand a lotof things.

i donno know i have alot of work and even i return to home no time to try new things.

i think the Prob. in my life… :hair:

maybe you should just sit down and set a goal and do it, i guess things won’t stick in your mind unless you actually do it :-/ well with flash atleast :slight_smile:

Here. I’ll give you some pointers…

From a programmer’s standpoint of using around 10 languages… You learn to know things… But I still need to look up stuff… I just know it’s there…

You have to train your mind to think about code… And I don’t think this starts out by you actually programming… Start looking at things on the web or in a video game… Try and think about how they would code that… Come here… Ask about it… And post your thoughts … The better you get on judging what type of code seems to be ina certain place… The better your mind will be at determining what code you should place into your project…

After you do this a couple of times… Start doing random projects here and there… That you know will challenge you…

The first project I started on in Flash MX was to create a physics engine… Of course the only reaosn I did that was because I had previously knowledge of other languages… But still… Something like a simple form created in flash that changes what you input into magical beans appearing on the field would be another good example…

Pick projects that you know will expand your mind into thinking about new things.

i guess things won’t stick in your mind unless you actually do it

i think you right blah-de-blah i’ve to do anything as a practise.

thanx playamarz i got you and i’ll do it.
i’m not a programmer so when i thinking about any code and can’t get it i depressed. of course that is wrong way.

can you explain to me how are you think in small thing and convert it to AS.

i’ll try more things and more …

Well Let’s look at a small time example really quick…

:: Hold on uploading .swf ::

[swf=“http://www.fantom-stranger.com/~mentalconcepts/freedomFighter.swf height=400 width=550”][/swf]

Now… I wnat you to look at this… I’ll be back in about an hour to explain it how I would look at it… But I wnat you to look at this and tell me what you think…

btw… Press 1,2, or 3 to place some add-on guns.

Peace

try setting a goal, then saying it in psedo code…

thats sweet dude, but i wont answer the question i’ll leave that one to flashswimmer.

Might need your help later on , making my footer into a game, so might need a bit of help with a few things, "collition’ , fire rate, collition detection, and maybe even the decaying walls fla you just made recently, lol, ill pm you when iam ready.

well cause Playa is typing it up right now i will take a go at it.

Well it looks like there is an on (releaseOutside) or click that makes it fire. the ammo is just an animated mc. the ship seems to be set on the Y axis and the X is locked. donno really anything else. this is just the psedo code…the real stuff would be harder.

I’m sorry about not finishing your foter game before hand…

It just appeared to me that I started it and never finished it lol

But yeah… here goes… Since I made it home before you re-posted…

When you look at the mini-game you see a ship… And when you move the mouse… The ship moves along with the mouse… When you click the mouse button it’ll fire…

So We know now… How it’s event driven… So let’s do a basic algorithm…


onMouseButtonDown
{
   fire bullet;
}
onMouseButtonMove
{
   move ship;
}

So you take a look at that… And any flash as programme rwould know that this would present lots of errors… But it’s a good blueprint for when you code…

There is also the 4 keyboard inputs… 1,2,3,0 And what do these do… Why they change the add-on guns… So…


if(keyboard key 1 is hit)
{
   change gun to spreader;
}
if(keyboard key 2 is hit)
{
   change gun to machine gun;
}
if(keyboard key 3 is hit)
{
   change gun to big assed gun;
}
if(keyboard key 0 is hit)
{
   remove any addon gun;
}

That’s pretty easy for us English speaking civilians to understand correct?

Now letake this a step further… We have all our basic inputs now… The mouse button clicking, the mouse moving and the t’s 4 keys…

Now… This just steps up then… I could then say… Well… When each addon gun is added… We have to get rid of any previous gun that was possibly there… So there won’t be any overlapping… So…


if(keyboard key 1 is hit)
{
   remove any other addon gun if need be;
   change gun to spreader;
}
if(keyboard key 2 is hit)
{
   remove any other addon gun if need be;
   change gun to machine gun;
}
if(keyboard key 3 is hit)
{
   remove any other addon gun if need be;
   change gun to big assed gun;
}
if(keyboard key 0 is hit)
{
   remove any addon gun;
}

And it goes on and on… Until you have this big list of algorithms… Then you just take the algorithsm… And place the actual code in each one… and wammo… Fix a couple of erros and your set in gold…

This works for pretty much everything… Writing algoritms on pieces of paper or in Notepad can help you think abut how the code can come into place… SOmeitme the algorithsm won’t work as planned… But 90% of thetime they work perfectly…

I hope this helped.

playamarz if your aplogizing to me , you shouldn’t have to,:wink:

its better if i figure it out myself, just being lazy. :smirk:

off to bed now, ill tell you when i start constructing it into a game.

edit::: Its better if i try myself and then i can ask questions, rather than someone doing it for me. had to clear that up.

hi playamarz,
many thanx for you presudo code… but i can’t see the swf.
i got your idea and it’s seems simple after your explaniation…

when i see your SWF… i’ll try to make it as you want… i think you will be my teacher :smirk:.

thanx for others too

FlashSwimmer

Well… I don’t know how to put it on here then… Hmm

http://www.fantom-stranger.com/~mentalconcepts/freedomFighter.fla

http://www.fantom-stranger.com/~mentalconcepts/freedomFighter.swf

There are the two links… One is the fla… And the other is the .swf.

Enjoy :slight_smile:

I looked at that and actually wanted to learn AS.

Maybe I will now.

Thanks marz.

playamarz if you want to post 2 files, just ‘zip’ them, with winzip.