-- create positive number if myBlendStep is negative...
if myBlendStep < 0 then
myBlendStep = myBlendStep - (myBlendStep * 2)
end if
mySprite.blend = myStartBlend
if myStartBlend < myEndBlend then
boolPosBlend = TRUE
else
boolPosBlend = FALSE
end if
end
on prepareFrame
if mySprite.rollover = TRUE then
if userRollInFade = TRUE then
if mySprite.blend <> myEndBlend then
if boolPosBlend = TRUE then
FadeUp myEndBlend
else
FadeDown myEndBlend
end if
end if
else
mySprite.blend = myEndBlend
end if
else
if mySprite.blend <> myStartBlend then
if userRollOutFade = TRUE then
if boolPosBlend = TRUE then
FadeDown myStartBlend
else
FadeUp myStartBlend
end if
else
mySprite.blend = myStartBlend
end if
end if
end if
end
-- CUSTOM HANDLERS --
on FadeUp myTargetCheck
myBlendValue = mySprite.blend
myBlendValue = myBlendValue + myBlendStep
if myBlendValue >= myTargetCheck then
myBlendValue = myTargetCheck
end if
mySprite.blend = myBlendValue
end
on FadeDown myTargetCheck
myBlendValue = mySprite.blend
myBlendValue = myBlendValue - myBlendStep
if myBlendValue <= myTargetCheck then
myBlendValue = myTargetCheck
end if
mySprite.blend = myBlendValue
end
-- AUTHORTIME PROPERTY HANDLERS --
on getPropertyDescriptionList me
set myProperties = [:]
addProp myProperties, #myStartBlend,¬
[#comment: "Initial blend value of sprite:",¬
#format: #integer,¬
#range: [min: 0, max: 100],¬
#default: 50¬
]
addProp myProperties, #myEndBlend,¬
[#comment: "Final blend of sprite:",¬
#format: #integer,¬
#range: [min: 0, max: 100],¬
#default: 100¬
]
addProp myProperties, #userStepsNumber,¬
[#comment: "Number of stages to blend over:",¬
#format: #integer,¬
#range: [min: 4, max: 25],¬
#default: 10¬
]
on isOKToAttach me, spriteType, spriteNum
case spriteType of
#graphic:
return sprite(spriteNum).member.type <> #digitalvideo
#script:
return FALSE
end case
end
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA