home *** CD-ROM | disk | FTP | other *** search
- property pFrame10, pFrameIncrement10, pBallShoot10, pMySpriteNum10, pUpLimit10, pDownLimit10, pBallSpeed10
-
- on new
- pMySpriteNum10 = 23
- pFrame10 = 1
- pFrameIncrement10 = 1
- pBallShoot10 = 0
- pDownLimit10 = 275
- pUpLimit10 = 97
- pBallSpeed10 = -4
- end
-
- on enterFrame
- if pBallShoot10 = 0 then
- pFrame10 = pFrame10 + pFrameIncrement10
- if pFrame10 > 8 then
- pFrame10 = 8
- pFrameIncrement10 = -1
- pBallShoot10 = 1
- end if
- if pFrame10 < 1 then
- pFrame10 = 1
- pFrameIncrement10 = 1
- end if
- sprite(pMySpriteNum10).member = "plant_phase" & pFrame10
- else
- doBallShoot()
- end if
- end
-
- on doBallShoot
- sprite(15).locV = sprite(15).locV + pBallSpeed10
- if sprite(15).locV < pUpLimit10 then
- pBallSpeed10 = pBallSpeed10 * -1
- end if
- if sprite(15).locV > pDownLimit10 then
- pBallSpeed10 = pBallSpeed10 * -1
- pBallShoot10 = 0
- end if
- end
-