controlls the playhead via mouseposition. Makes a Sliderbutton indikate the frameposition. Use in connection with "MostFramesScript" + "EndFramesScript" + "PlayheadSlider"
on getBehaviorDescription me
return \
"GO ONLY FORWARD" & RETURN & RETURN & \
"Drop this behavior into the Script Channel on the 2 frames of the Score, where the whole behavior should start." & \
"Prevents the playhead from going too far backwards." & RETURN & RETURN & \
"makes the sliderbutton indikate the frameposition." & RETURN & RETURN & \
"Prevents collision with the sliderbehavior." & RETURN & RETURN & \
"Not tested for compatibility with Java." & RETURN & RETURN & \
"PARAMETERS: slider, sliderBut, fastDistRight, slowDistRight"
end getBehaviorDescription
on getBehaviorTooltip me
return \
"Frame behavior. " & \
"makes the framehead go backwards on mouse near right stageBorder. " & \
"makes the sliderbutton indikate the frameposition. " & \
"Prevents collision with the sliderbehavior. " & \
"Not tested for compatibility with Java."
end getBehaviorTooltip
-- HISTORY --
-- 15. June 2001, written by Ulla Bensby, www.uebweb.dk as an assignment
-- for Kjell Yngve Petersen, www.boxiganga.dk. ....WARNING! don't work for him without written agreement!
-- Unfortunately, after I've been working (slaving, in fact) for him one whole month, full-time,
-- I asked for an extra 3,5$ fee pr. change of elements already made according to agreement,
-- and then he fired me without payment. What a shame, he seemed so nice!
-- Hopefully the behaviors can be usefull to someone else
on getPropertyDescriptionList
List= [:]
addProp list, #sliderBut,\
[#comment: "SpriteNumber of the sliderbutton",\
#format: #integer,\
#default: 50]
addProp list, #slider,\
[#comment: "SpriteNumber of the slider",\
#format: #integer,\
#default: 49]
addProp list, #fastDistRight,\
[#comment: "pxDistance from Right stageBorder(the FastForwardarea)",\
#format: #integer,\
#default: 20]
addProp list, #slowDistRight,\
[#comment: "pxDistance from Right stageBorder(the slowForwardarea's startpoint)",\
#format: #integer,\
#default: 80]
addProp list, #goleftcursor,\
[#comment: "SpriteNumber of the goleftcursor",\
#format: #integer,\
#default: 59]
addProp list, #goRightcursor,\
[#comment: "SpriteNumber of the goRightcursor",\
#format: #integer,\
#default: 60]
return list
end getPropertyDescriptionList
on beginSprite me
cursor -1
pDrag = False
stageWidth = the stageRight - the stageLeft
sprite(goleftcursor).Loc = point(-24,200)
sprite(goRightcursor).Loc = point(stageWidth+20,200)
stop sprite(goLeftcursor)
stop sprite(goRightcursor)
end
on Drag
pDrag = True
end
on Release
pDrag = False
end
on exitFrame me
if pDrag = True then
sprite(sliderBut).moveableSprite = True
sprite(sliderBut).constraint=slider
cursor 290
go to the frame
else
if pDrag = False then
Sprite(sliderBut).moveableSprite = False
pFrameOffset = 173 - the Frame
sprite(sliderBut).LocH = 360 - pFrameOffset/2
stageWidth = the stageRight - the stageLeft
if (the mouseH > (stageWidth -fastDistRight) and the mouseH < stageWidth) then
cursor 200
sprite(goRightcursor).loc = the mouseLoc
play sprite(goRightcursor)
go to the frame +2
else
if (the mouseH > (stageWidth -slowDistRight) and the mouseH < (stageWidth -(fastDistRight-1))) then
cursor 200
sprite(goRightcursor).loc = the mouseLoc
play sprite(goRightcursor)
go to the frame +1
else
cursor -1
sprite(goleftcursor).Loc = point(-24,200)
sprite(goRightcursor).Loc = point(stageWidth+20,200)
stop sprite(goLeftcursor)
stop sprite(goRightcursor)
go to the frame
end if
end if
end if
end if
end
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA