|
|
|
Close Box MIAW behavior
Added on 6/10/1999
|
Use to close MIAW with a button. Must be used with the WindowShade MIAW behavior.
property pMouseDown
on beginSprite me
set pMouseDown = 0
end
on mouseDown me
set pMouseDown = 1
end
on mouseUp me
if pMouseDown then
set lMovieName = the movieName
repeat with w in the windowList
set lPathToWin = the filename of w
if lPathToWin contains lMovieName then
close w
sendAllSprites(#externalWindowShadeOpen)
exit repeat
end if
end repeat
end if
set pMouseDown = 0
end
on mouseUpOutside me
set pMouseDown = 0
end
on getBehaviorDescription
set lText = ""
put "--======= Close Box MIAW behavior =======--" & RETURN after lText
put "This behavior makes a sprite act as if it " after lText
put "were a window"s close box. In other words, " after lText
put "the sprite which receives this behavior will " after lText
put "close the MIAW which the sprite is in. " after lText
put "If the sprite is not inside of a MIAW then " after lText
put "nothing will happen. " & RETURN & RETURN after lText
put "NOTE: This behavior closes the MIAW. It " after lText
put "does not " & QUOTE & "forget" & QUOTE & " the " after lText
put "window." & RETURN & RETURN after lText
put "NOTE: This behavior sends the " & QUOTE after lText
put "externalWindowShadeOpen" & QUOTE & " method " after lText
put "to all sprites. This is done so that the " after lText
put "companion Windowshade MIAW behavior can " after lText
put "resize the MIAW appropriately." & RETURN & RETURN after lText
put "NOTE: This behavior does not switch the member " after lText
put "of its sprite. Theoretically, you would drop " after lText
put "another behavior onto the sprite to do the " after lText
put "button depression stuff." & RETURN & RETURN after lText
put "As always, if you use this behavior I would " after lText
put "like a mention in your credits. Enjoy." & RETURN & RETURN after lText
put "/// © Rett Crocker 1997 \" & RETURN after lText
put "\ r3tt@mindspring.com ///" & RETURN after lText
return lText
end
|
|