|
|
|
EndFramesScript
Added on 7/30/2001
|
|
Compatibilities:
|
This item has not yet been rated
|
controlls the playhead and sends message to a sliderbutton to indikate the frameposition. Use in connection with "StartFramesScript" + "MostFramesScript" + "PlayheadSlider"
Download PC Source
-- DESCRIPTION --
on getBehaviorDescription me
return \
"GO ONLY BACKWARDS" & RETURN & RETURN & \
"Drop this behavior into the Script Channel on the 2 frames of the Score, where the whole behavior should end." & \
"Prevents the playhead from going too far forward." & 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, fastDistLeft, slowDistLeft"
end getBehaviorDescription
on getBehaviorTooltip me
return \
"Frame behavior. " & \
"makes the framehead go forward on mouse near left 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 2,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
property pDrag, pFrameOffset, stageWidth, sliderBut, fastDistLeft
property slowDistLeft, slider, goleftcursor, goRightcursor
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, #fastDistLeft,\
[#comment: "pxDistance from Left stageBorder(the FastBackwardsarea)",\
#format: #integer,\
#default: 20]
addProp list, #slowDistLeft,\
[#comment: "pxDistance from Left stageBorder(the FastBackwardsarea'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+24,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 >0 and the mouseH cursor 200
sprite(goLeftcursor).loc = the mouseLoc
play sprite goLeftcursor
go to the frame -2
else
if (the mouseH >fastDistLeft and the mouseH cursor 200
sprite(goLeftcursor).loc = the mouseLoc
play sprite goLeftcursor
go to the frame -1
else
cursor -1
sprite(goleftcursor).Loc = point(-24,200)
sprite(goRightcursor).Loc = point(stageWidth+24,200)
stop sprite goLeftcursor
stop sprite goRightcursor
go to the frame
end if
end if
end if
end if
end if
end if
end
|
|