Simple question

I was reading one of the game tutorials on this site and one of the codes read like this:


[COLOR=#cc00cc]//---- variables ---- [/COLOR][COLOR=#006610]var[/COLOR] [COLOR=#000050]steps[/COLOR][COLOR=#0000ff]:[/COLOR][COLOR=#0000d0]Number[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#991010]5[/COLOR]; [COLOR=#006610]var[/COLOR] [COLOR=#000050]spriteX[/COLOR][COLOR=#0000ff]:[/COLOR][COLOR=#0000d0]Number[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#991010]265[/COLOR]; [COLOR=#006610]var[/COLOR] [COLOR=#000050]spriteY[/COLOR][COLOR=#0000ff]:[/COLOR][COLOR=#0000d0]Number[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#991010]265[/COLOR]; [COLOR=#006610]var[/COLOR] [COLOR=#000050]speed[/COLOR][COLOR=#0000ff]:[/COLOR][COLOR=#0000d0]Number[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#991010]25[/COLOR]; [COLOR=#006610]var[/COLOR] [COLOR=#000050]arrowActive[/COLOR][COLOR=#0000ff]:[/COLOR][COLOR=#0000d0]Boolean[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#006610]false[/COLOR]; [COLOR=#006610]var[/COLOR] [COLOR=#000050]dragons[/COLOR][COLOR=#0000ff]:[/COLOR][COLOR=#0000d0]Number[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#991010]3[/COLOR]; [COLOR=#006610]var[/COLOR] [COLOR=#000050]i[/COLOR][COLOR=#0000ff]:[/COLOR][COLOR=#0000d0]Number[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#991010]0[/COLOR]; [COLOR=#006610]var[/COLOR] [COLOR=#000050]score[/COLOR][COLOR=#0000ff]:[/COLOR][COLOR=#0000d0]Number[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#991010]0[/COLOR]; [COLOR=#cc00cc]//---- properties ---- [/COLOR][COLOR=#000050]knight[/COLOR].[COLOR=#0000d0]swapDepths[/COLOR][COLOR=#0000ff]([/COLOR][COLOR=#991010]10[/COLOR][COLOR=#0000ff])[/COLOR]; [COLOR=#cc00cc]//---- functions ---- [/COLOR][COLOR=#006610]function[/COLOR] [COLOR=#000050]checkKeys[/COLOR][COLOR=#0000ff]()[/COLOR] [COLOR=#0000ff]{[/COLOR] [COLOR=#006610]if[/COLOR] [COLOR=#0000ff]([/COLOR][COLOR=#0000d0]Key[/COLOR].[COLOR=#0000d0]isDown[/COLOR][COLOR=#0000ff]([/COLOR][COLOR=#0000d0]Key[/COLOR].[COLOR=#0000d0]RIGHT[/COLOR][COLOR=#0000ff])[/COLOR] [COLOR=#0000ff]&&[/COLOR] [COLOR=#000050]spriteX[/COLOR][COLOR=#0000ff]<[/COLOR][COLOR=#991010]510[/COLOR][COLOR=#0000ff])[/COLOR] [COLOR=#0000ff]{[/COLOR] [COLOR=#000050]spriteX[/COLOR] [COLOR=#0000ff]+=[/COLOR] [COLOR=#000050]steps[/COLOR]; [COLOR=#000050]knight[/COLOR].[COLOR=#000050]legs[/COLOR].[COLOR=#0000d0]play[/COLOR][COLOR=#0000ff]()[/COLOR]; [COLOR=#0000ff]}[/COLOR] [COLOR=#006610]else[/COLOR] [COLOR=#006610]if[/COLOR] [COLOR=#0000ff]([/COLOR][COLOR=#0000d0]Key[/COLOR].[COLOR=#0000d0]isDown[/COLOR][COLOR=#0000ff]([/COLOR][COLOR=#0000d0]Key[/COLOR].[COLOR=#0000d0]LEFT[/COLOR][COLOR=#0000ff])[/COLOR] [COLOR=#0000ff]&&[/COLOR] [COLOR=#000050]spriteX[/COLOR][COLOR=#0000ff]>[/COLOR][COLOR=#991010]40[/COLOR][COLOR=#0000ff])[/COLOR] [COLOR=#0000ff]{[/COLOR] [COLOR=#000050]spriteX[/COLOR] [COLOR=#0000ff]-=[/COLOR] [COLOR=#000050]steps[/COLOR]; [COLOR=#000050]knight[/COLOR].[COLOR=#000050]legs[/COLOR].[COLOR=#0000d0]play[/COLOR][COLOR=#0000ff]()[/COLOR]; [COLOR=#0000ff]}[/COLOR] [COLOR=#006610]if[/COLOR] [COLOR=#0000ff]([/COLOR][COLOR=#0000d0]Key[/COLOR].[COLOR=#0000d0]isDown[/COLOR][COLOR=#0000ff]([/COLOR][COLOR=#0000d0]Key[/COLOR].[COLOR=#0000d0]UP[/COLOR][COLOR=#0000ff])[/COLOR] [COLOR=#0000ff]&&[/COLOR] [COLOR=#000050]arrowActive[/COLOR] [COLOR=#0000ff]==[/COLOR] [COLOR=#006610]false[/COLOR][COLOR=#0000ff])[/COLOR] [COLOR=#0000ff]{[/COLOR] [COLOR=#000050]knight[/COLOR].[COLOR=#000050]arms[/COLOR].[COLOR=#0000d0]play[/COLOR][COLOR=#0000ff]()[/COLOR]; [COLOR=#0000d0]attachMovie[/COLOR][COLOR=#0000ff]([/COLOR][COLOR=#666666]"arrow"[/COLOR], [COLOR=#666666]"arrows"[/COLOR], [COLOR=#991010]8[/COLOR][COLOR=#0000ff])[/COLOR]; [COLOR=#000050]arrows[/COLOR].[COLOR=#0000d0]_x[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#000050]spriteX[/COLOR]; [COLOR=#000050]arrows[/COLOR].[COLOR=#0000d0]_y[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#000050]spriteY[/COLOR][COLOR=#0000ff]+[/COLOR][COLOR=#991010]50[/COLOR]; [COLOR=#cc00cc]//arrowActive = true[/COLOR] [COLOR=#0000ff]}[/COLOR] [COLOR=#0000ff]}[/COLOR] [COLOR=#006610]function[/COLOR] [COLOR=#000050]updatePawel[/COLOR][COLOR=#0000ff]()[/COLOR] [COLOR=#0000ff]{[/COLOR] [COLOR=#000050]knight[/COLOR].[COLOR=#0000d0]_x[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#000050]spriteX[/COLOR]; [COLOR=#000050]knight[/COLOR].[COLOR=#0000d0]_y[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#000050]spriteY[/COLOR]; [COLOR=#0000ff]}[/COLOR] [COLOR=#006610]function[/COLOR] [COLOR=#000050]updateArrow[/COLOR][COLOR=#0000ff]()[/COLOR] [COLOR=#0000ff]{[/COLOR] [COLOR=#006610]if[/COLOR] [COLOR=#0000ff]([/COLOR][COLOR=#000050]arrowActive[/COLOR] [COLOR=#0000ff]==[/COLOR] [COLOR=#006610]true[/COLOR][COLOR=#0000ff])[/COLOR] [COLOR=#0000ff]{[/COLOR] [COLOR=#000050]arrows[/COLOR].[COLOR=#0000d0]_y[/COLOR] [COLOR=#0000ff]-=[/COLOR] [COLOR=#000050]speed[/COLOR]; [COLOR=#0000ff]}[/COLOR] [COLOR=#006610]if[/COLOR] [COLOR=#0000ff]([/COLOR][COLOR=#000050]arrows[/COLOR].[COLOR=#0000d0]_y[/COLOR][COLOR=#0000ff]<-[/COLOR][COLOR=#991010]10[/COLOR][COLOR=#0000ff])[/COLOR] [COLOR=#0000ff]{[/COLOR] [COLOR=#000050]arrowActive[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#006610]false[/COLOR]; [COLOR=#0000d0]removeMovieClip[/COLOR][COLOR=#0000ff]([/COLOR][COLOR=#000050]arrows[/COLOR][COLOR=#0000ff])[/COLOR]; [COLOR=#0000ff]}[/COLOR] [COLOR=#0000ff]}[/COLOR] [COLOR=#006610]function[/COLOR] [COLOR=#000050]initDragons[/COLOR][COLOR=#0000ff]()[/COLOR] [COLOR=#0000ff]{[/COLOR] [COLOR=#006610]for[/COLOR] [COLOR=#0000ff]([/COLOR][COLOR=#000050]i[/COLOR]; [COLOR=#000050]i[/COLOR][COLOR=#0000ff]<[/COLOR][COLOR=#000050]dragons[/COLOR]; [COLOR=#000050]i[/COLOR][COLOR=#0000ff]++)[/COLOR] [COLOR=#0000ff]{[/COLOR] [COLOR=#0000d0]attachMovie[/COLOR][COLOR=#0000ff]([/COLOR][COLOR=#666666]"dragon"[/COLOR], [COLOR=#666666]"dragon"[/COLOR][COLOR=#0000ff]+[/COLOR][COLOR=#000050]i[/COLOR], [COLOR=#000050]i[/COLOR][COLOR=#0000ff])[/COLOR]; [COLOR=#000050]dragon[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#0000d0]_root[/COLOR][COLOR=#0000ff][[/COLOR][COLOR=#666666]"dragon"[/COLOR][COLOR=#0000ff]+[/COLOR][COLOR=#000050]i[/COLOR][COLOR=#0000ff]][/COLOR]; [COLOR=#000050]updateDragons[/COLOR][COLOR=#0000ff]([/COLOR][COLOR=#000050]dragon[/COLOR][COLOR=#0000ff])[/COLOR]; [COLOR=#000050]dragon[/COLOR].[COLOR=#0000d0]onEnterFrame[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#006610]function[/COLOR][COLOR=#0000ff]()[/COLOR] [COLOR=#0000ff]{[/COLOR] [COLOR=#006610]if[/COLOR] [COLOR=#0000ff]([/COLOR][COLOR=#0000d0]this[/COLOR].[COLOR=#0000d0]hitTest[/COLOR][COLOR=#0000ff]([/COLOR][COLOR=#000050]arrows[/COLOR][COLOR=#0000ff]))[/COLOR] [COLOR=#0000ff]{[/COLOR] [COLOR=#000050]score[/COLOR] [COLOR=#0000ff]+=[/COLOR] [COLOR=#991010]5[/COLOR]; [COLOR=#0000d0]trace[/COLOR][COLOR=#0000ff]([/COLOR][COLOR=#000050]score[/COLOR][COLOR=#0000ff])[/COLOR]; [COLOR=#000050]arrowActive[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#006610]false[/COLOR]; [COLOR=#0000d0]removeMovieClip[/COLOR][COLOR=#0000ff]([/COLOR][COLOR=#000050]arrows[/COLOR][COLOR=#0000ff])[/COLOR]; [COLOR=#000050]updateDragons[/COLOR][COLOR=#0000ff]([/COLOR][COLOR=#0000d0]this[/COLOR][COLOR=#0000ff])[/COLOR]; [COLOR=#0000ff]}[/COLOR] [COLOR=#006610]if[/COLOR] [COLOR=#0000ff]([/COLOR][COLOR=#0000d0]this[/COLOR].[COLOR=#0000d0]_x[/COLOR][COLOR=#0000ff]>[/COLOR][COLOR=#991010]0[/COLOR][COLOR=#0000ff])[/COLOR] [COLOR=#0000ff]{[/COLOR] [COLOR=#0000d0]this[/COLOR].[COLOR=#0000d0]_x[/COLOR] [COLOR=#0000ff]-=[/COLOR] [COLOR=#0000d0]this[/COLOR].[COLOR=#000050]velo[/COLOR]; [COLOR=#0000ff]}[/COLOR] [COLOR=#006610]else[/COLOR] [COLOR=#0000ff]{[/COLOR] [COLOR=#000050]updateDragons[/COLOR][COLOR=#0000ff]([/COLOR][COLOR=#0000d0]this[/COLOR][COLOR=#0000ff])[/COLOR]; [COLOR=#0000ff]}[/COLOR] [COLOR=#0000ff]}[/COLOR]; [COLOR=#0000ff]}[/COLOR] [COLOR=#0000ff]}[/COLOR] [COLOR=#000050]initDragons[/COLOR][COLOR=#0000ff]()[/COLOR]; [COLOR=#006610]function[/COLOR] [COLOR=#000050]updateDragons[/COLOR][COLOR=#0000ff]([/COLOR][COLOR=#000050]which[/COLOR][COLOR=#0000ff])[/COLOR] [COLOR=#0000ff]{[/COLOR] [COLOR=#000050]which[/COLOR].[COLOR=#0000d0]_x[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#0000d0]random[/COLOR][COLOR=#0000ff]([/COLOR][COLOR=#991010]100[/COLOR][COLOR=#0000ff])+[/COLOR][COLOR=#991010]530[/COLOR]; [COLOR=#000050]which[/COLOR].[COLOR=#0000d0]_y[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#0000d0]random[/COLOR][COLOR=#0000ff]([/COLOR][COLOR=#991010]80[/COLOR][COLOR=#0000ff])+[/COLOR][COLOR=#991010]20[/COLOR]; [COLOR=#000050]which[/COLOR].[COLOR=#000050]velo[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#0000d0]random[/COLOR][COLOR=#0000ff]([/COLOR][COLOR=#991010]10[/COLOR][COLOR=#0000ff])+[/COLOR][COLOR=#991010]2[/COLOR]; [COLOR=#0000ff]}[/COLOR] [COLOR=#0000d0]this[/COLOR].[COLOR=#0000d0]onEnterFrame[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#006610]function[/COLOR][COLOR=#0000ff]()[/COLOR] [COLOR=#0000ff]{[/COLOR] [COLOR=#000050]checkKeys[/COLOR][COLOR=#0000ff]()[/COLOR]; [COLOR=#000050]updatePawel[/COLOR][COLOR=#0000ff]()[/COLOR]; [COLOR=#000050]updateArrow[/COLOR][COLOR=#0000ff]()[/COLOR]; [COLOR=#0000ff]}[/COLOR]; 

I was wondering where they had got knight.legs.play()? It was not defined or anything earlier. How would I make that animation sequence and how is it recognized. Because I don’t think it’s saved or anything. Can someone just explain for me?