local phaseOne, phaseTwo --put local names into scope function phaseOne(self) transition.to( self, { time=1000, x = 450, onComplete = phaseTwo} ) end function phaseTwo(self) transition.to( self, { time=1000, x = 25, onComplete = phaseOne} ) end function hangerGun:moveHangerGun() print("1") return phaseOne(self) end