Hi list,

I've a problem creating an expanding ripples effects that starts on
mouseEnter event and stop on mouseLeave event. The problem occours on
mouseWithin: I want a continuos expanding effect if mouse is on rollover;
I'm able to make first ripples sequence appear on mouseEnter and stop on
mouseLeave but I don't know how to repeats it continuosly on mouseWithin
event.
Someone can help me!
I'm using this script:

property pRipples, pOldImage, pPressed, pSpriteInteressato

on beginSprite me

pRipples = []

end



on mouseEnter me

addRipple(me)

pPressed = TRUE

end



on mouseLeave me

pPressed = FALSE

end



on addRipple me


oggettoVittima = pSpriteInteressato

centrami = sprite(oggettoVittima).member.regpoint

add pRipples, [#loc centrami, #radius 0]


end

on prepareFrame me


numeroAnelli = pRipples.count


if pPressed then

if numeroAnelli <10 then

addRipple(me)

end if

end if

expandRipples(me)



end



on expandRipples me

pOldImage = duplicate((the stage).image)



repeat with i = pRipples.count down to 1


loc = pRipples[i].loc

radius = pRipples[i].radius


r = rect(loc,loc) + rect(-radius,-radius,radius,radius)


color = rgb((radius*3),(radius*3),(radius*3))


(the stage).image.draw(r, [#shapeType #oval, #color color])


pRipples[i].radius = pRipples[i].radius + 10


if pRipples[i].radius > 85 then

deleteAt pRipples, i

end if

end repeat



end



on exitFrame me

(the stage).image.copyPixels(pOldImage,pOldImage.rect,pOldImage.rect)

go to the frame

end



on getPropertyDescriptionList


return [ #pSpriteInteressato [ #comment "In quale sprite sar� il cast member
che sar� il centro degli anelli?", #format #integer, #default 3 ]]

end getPropertyDescriptionList

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to