home *** CD-ROM | disk | FTP | other *** search
- property pSprite, spriteNum, pLoc, pAng, pInc, pDepth, pScale, pFullScale
- global gMotion
-
- on beginSprite me
- pSprite = sprite(spriteNum)
- pLoc = [float(pSprite.loc[1]), float(pSprite.loc[2])]
- pAng = 90
- pInc = 2
- pFullScale = [float(pSprite.width), float(pSprite.height)]
- pDepth = random(5, 10)
- pScale = 0.10000000000000001 * pDepth
- pSprite.width = pFullScale[1] * pScale
- pSprite.height = pFullScale[2] * pScale
- pSprite.blend = pDepth * 10
- end
-
- on exitFrame me
- pAng = pAng + pInc
- if (pAng >= 150) or (pAng <= 30) then
- pInc = -pInc
- end if
- if pAng < 90 then
- pSprite.flipH = 1
- else
- pSprite.flipH = 0
- end if
- xPos = cos(pAng * PI / 180) * 2
- yPos = 2
- pLoc = pLoc + [xPos, yPos]
- pSprite.loc = point(pLoc[1], pLoc[2])
- if pLoc[2] > ((the stage).rect.height + pSprite.height) then
- pSprite.locH = random((the stage).rect.width)
- pSprite.locV = 0 + random(-500, -100)
- pLoc = [float(pSprite.loc[1]), float(pSprite.loc[2])]
- pDepth = random(5, 10)
- pScale = 0.10000000000000001 * pDepth
- pSprite.width = pFullScale[1] * pScale
- pSprite.height = pFullScale[2] * pScale
- pSprite.blend = pDepth * 5
- end if
- if gMotion then
- pSprite.locV = pSprite.locV + 5
- end if
- end
-