Drop this behaviour on the frame and specify the sprite which you want to switch on/off.
property pSprite, pRange
on getPropertyDescriptionList me
description = [:]
addprop description, #pSprite, [#comment:"Switch on/off which sprite", #format:#integer, #default:1]
addProp description, #pRange, [#comment: "Speed", #format:#Integer, #range:[#min:1,#Max:40],#default:20]
return description
end getPropertyDescriptionList
on pSwitch mySprite
global gTime
if voidP(gTime) then
set gTime to the timer
end if
if the timer > gTime + pRange then
set the visible of sprite mySprite to not the visible of sprite mySprite
set gTime to the timer
end if
if the timer < gTime - pRange then
set gTime to the timer
end if
end
on exitframe
go the frame
pSwitch pSprite
end
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA