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