The Concept of Programming Languages

Hi, i 2 days :stare: ago, i was trying to understand this code, i am not a programmer, but try to learn AS3.
every time i wrote this code without the tutorial a make mistakes, and every time i try to understand the logic or the way this code was built i feel i am frustrated.
i was thinking if there is good book for people like me (designer want to learn programming) to guide us, not in AS3 but the concept of programming languages.

another point:
how do learn, i want to share your way learning AS3.

when i see many many lines of code i feel i am poor writing only **[COLOR=Blue]MouseEvent
[/COLOR]**but at the same time, i feel it is better than nothing


This code has no mistakes, but what i want to understand, why the programmer put the [COLOR=Blue]if[/COLOR] statement in another function, i mean how do you know you must put that in that function.

guys, i feel so frustrated, please help us to learn this fancy language

ActionScript Code:
[LEFT]top_mc.[COLOR=#000080]addEventListener[/COLOR][COLOR=#000000]([/COLOR]MouseEvent.[COLOR=#000080]CLICK[/COLOR], targetMc[COLOR=#000000])[/COLOR];

bottom_mc.[COLOR=#000080]addEventListener[/COLOR][COLOR=#000000]([/COLOR]MouseEvent.[COLOR=#000080]CLICK[/COLOR], targetMc[COLOR=#000000])[/COLOR];
arrow_mc.[COLOR=#000080]addEventListener[/COLOR][COLOR=#000000]([/COLOR]MouseEvent.[COLOR=#000080]CLICK[/COLOR], arrowMe[COLOR=#000000])[/COLOR];

[COLOR=#000000]function[/COLOR] targetMcCOLOR=#000000[/COLOR]:[COLOR=#0000FF]void[/COLOR] [COLOR=#000000]{[/COLOR]
arrow_mc.[COLOR=#000080]aim[/COLOR] = evt.[COLOR=#0000FF]target[/COLOR];
[COLOR=#000000]}[/COLOR]

[COLOR=#000000]function[/COLOR] arrowMeCOLOR=#000000[/COLOR]:[COLOR=#0000FF]void[/COLOR] [COLOR=#000000]{[/COLOR]
[COLOR=#0000FF]if[/COLOR] COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]
arrow_mc.[COLOR=#000080]x[/COLOR] = arrow_mc.[COLOR=#000080]aim[/COLOR].[COLOR=#000080]x[/COLOR];
arrow_mc.[COLOR=#000080]y[/COLOR] = arrow_mc.[COLOR=#000080]aim[/COLOR].[COLOR=#000080]y[/COLOR];
[COLOR=#000000]}[/COLOR]
[COLOR=#000000]}[/COLOR]
[/LEFT]

Thanks for your time