Contents
Articles
Behaviors
Books
Director News
Director Web Sites
FAQ
Games
Mailing Lists
News Groups
Project Examples
Reviews
Software
Tools
Useful Web Sites
Utilities
Xtras

Don't miss these
Expire date
Open a window from inside shockwave
TCP UDP Xtra
FreeRegEdit
Hilite Line
Display the cursors position
cXtraTransitions
Attrib Xtra
Text Box Xtra
Wait for SWA Member finishes Playing(sprite as reference)
 

 

 

Behavior Close Box MIAW behavior

Added on 6/10/1999

 

Compatibilities:
behavior D6_5 Mac PC

This item has not yet been rated

Author: RettCrocker

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  

 


Contact

MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA

Send e-mail