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
Runtime Debugging Utilities
Live Video
Set PlayBackMode of a Flash Member
Title Bar Color Gradient Effect Behavior
Tool Tips/Help popUp box ver 2.1
A cool button
TextCruncher
MUSTARD
Set Frame Rate for Flash Member
EXE Screen Saver
 

 

 

Behavior Popup Text List Menu

Added on 6/7/1999

 

Compatibilities:
behavior D6_5 Mac PC

This item has not yet been rated

Author: AlexZavatone

Popup Text List Menu

property pActiveSprite, pPopupCastName

on mouseDown me
  set pPopupCastName = "Popup List"
  PopupMouseDown me
  return
end

on PopupMouseDown me
  set lastChar = the number of chars in field pPopupCastName + 1
  set mySprite = the spriteNum of me
  set pActiveSprite = mySprite
  set myCast = the castnum of sprite mySprite
  puppetsprite mySprite, 1
  set the castnum of sprite mySprite = the number of cast pPopupCastName
  updatestage
  
  hilite line the mouseline of field pPopupCastName
  set myLine = the mouseline
  
  -- highlight detection. Thanks Mark Shepherd
  repeat while the mouseDown
    if mySprite > 0 then
      if rollover(mySprite) then
        if myLine <> the mouseLine  then
          set myLine = the mouseline
          if myLine > 0 then hilite line myLine of field pPopupCastName
        end if
      else
        if myLine <> 0 then
          set myLine = 0
          hilite char lastChar of field pPopupCastName
        end if
      end if        
    end if
  end repeat
  
  -- here we handle what to do on  mouseUp
  set the castnum of sprite pActiveSprite = myCast
  
  puppetsprite pActiveSprite, 0
  updatestage
  if myline > 0 then
    -- insert stuff here to do things
  end if
end

on DoDelay seconds
  set now = the timer
  startTimer
  repeat while now + seconds * 60 > the timer
  end repeat
end

on GetBehaviorDescription
  return "Turns what you mousedown on into a text popup menu.   Fun for the whole family.  The text member to use as the popup list is specified in pPopupCastName in the MouseDown handler - Zav"
end  

 


Contact

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

Send e-mail