Tidying up actionscript

Does anyone know how I can make the following actionscript tidier? Thanks\r\r\ron (press) {\r&nbsp &nbsp &nbsp &nbsp tellTarget ("/wings") {\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp if (thisframe == “1”) {\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp gotoAndStop (thisframe+2);\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp }\r&nbsp &nbsp &nbsp &nbsp }\r&nbsp &nbsp &nbsp &nbsp tellTarget ("/wings") {\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp if (thisframe == “3”) {\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp gotoAndStop (thisframe+2);\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp }\r&nbsp &nbsp &nbsp &nbsp }\r&nbsp &nbsp &nbsp &nbsp tellTarget ("/wings") {\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp if (thisframe == “5”) {\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp gotoAndStop (thisframe+2);\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp }\r&nbsp &nbsp &nbsp &nbsp }\r&nbsp &nbsp &nbsp &nbsp tellTarget ("/wings") {\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp if (thisframe == “7”) {\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp gotoAndStop (thisframe+2);\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp }\r&nbsp &nbsp &nbsp &nbsp }\rtellTarget ("/wings") {\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp if (thisframe == “9”) {\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp gotoAndStop (thisframe+2);\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp }\r&nbsp &nbsp &nbsp &nbsp }\rtellTarget ("/wings") {\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp if (thisframe == “11”) {\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp gotoAndStop (thisframe+2);\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp }\r&nbsp &nbsp &nbsp &nbsp }\rtellTarget ("/wings") {\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp if (thisframe == “13”) {\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp gotoAndStop (thisframe+2);\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp }\r&nbsp &nbsp &nbsp &nbsp }\rtellTarget ("/wings") {\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp if (thisframe == “2”) {\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp gotoAndStop (thisframe+1);\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp }\r&nbsp &nbsp &nbsp &nbsp }\rtellTarget ("/wings") {\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp if (thisframe == “4”) {\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp gotoAndStop (thisframe+1);\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp }\r&nbsp &nbsp &nbsp &nbsp }\rtellTarget ("/wings") {\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp if (thisframe == “6”) {\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp gotoAndStop (thisframe+1);\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp }\r&nbsp &nbsp &nbsp &nbsp }\rtellTarget ("/wings") {\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp if (thisframe == “8”) {\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp gotoAndStop (thisframe+1);\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp }\r&nbsp &nbsp &nbsp &nbsp }\rtellTarget ("/wings") {\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp if (thisframe == “10”) {\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp gotoAndStop (thisframe+1);\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp }\r&nbsp &nbsp &nbsp &nbsp }\rtellTarget ("/wings") {\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp if (thisframe == “12”) {\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp gotoAndStop (thisframe+1);\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp }\r&nbsp &nbsp &nbsp &nbsp }\rtellTarget ("/wings") {\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp if (thisframe == “14”) {\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp gotoAndStop (thisframe+1);\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp }\r&nbsp &nbsp &nbsp &nbsp }\r}

//assuming you use flash 5/mx\r\ron (press) {\rwith ("/wings") {\rif (_currentframe %2 == 1) {\rgotoAndStop(_currentframe+2);\r} else {\rgotoAndStop(_currentframe+1);\r}\r}\r}\r\rhope that helped

wow… nice usage of the blade there Thoriphes

wuts the % do?

modulo was explained before, returns the remainder of first number divided by second number: 14 % 4 = 2 coz 4x3=12, remainder is 2.\rso if you need to check for an even number (true or false), just number % 2, and if it is even, modulo returns 0, easy and usefull check.\r\rbtw, “with”: no need for the slash " arget" here, just the right path…

thanks Eyez…thats what i thought it was doin…

Just curiosity : when do you have to write the / in /target when you telltarget ?? I always seeed to work for me without…\r\rpom 0]

they used to use the slash back in flash 4 with referring to movieclips cause 4 didn’t have _parent or _root. i just added the slash there anyway cause i wasn’t sure exactly where the movie was located.

Thanks, script looks much better now!