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
Ripple Button-Alphamania
Multi lists sorting
FreePPP Control
aougu.com
Orbiter
Hide mouse on idle
Director 7 and Lingo Bible
Combinations and Permutations
DirectImage Xtra
UltimateFileIO
 

 

 

Behavior Direct Media Controler Button

Added on 6/10/1999

 

Compatibilities:
behavior D6_5 D7 D8 Mac PC

Rating:

Author: Tabuleiro (website)

This behavior is for use with the Direct Media Xtra from Tabuleiro Da Baiana

--DirectMedia Xtra Controller Button  

property videoSprite    -- the sprite number that is getting controlled
property videoCommand   -- the command to be issued
property standardImage  -- the Button Image
property alternateImage -- the Rollover Image for the button
property clickedImage   -- the Clicked Image for the button rollover and click.
property param1  -- first parameter of the command
property param2  -- second parameter of the command

on DoControl me
  case ( the VideoCommand of me ) of:
    #Play:
      videoplay(sprite the videoSprite of me)
    #Pause:
      videopause(sprite the videoSprite of me)
    #Rewind:
      videoseek(sprite the videoSprite of me, the segmentstart of sprite the videoSprite of me)
    #StepForward:
      videopause(sprite the videoSprite of me)
      videoseek(sprite the videoSprite of me, the currenttime of sprite the videoSprite of me+30)
    #StepBackward:
      videopause(sprite the videoSprite of me)
      videoseek(sprite the videoSprite of me, the currenttime of sprite the videoSprite of me-30)
    #Seek:
      videoseek(sprite the videoSprite of me, the param1 of me)
    #PlaySegment:
      videoplaysegment(sprite the videoSprite of me, the param1 of me, the param2 of me)
      
  end case
end


on mouseUp me
  set the member of sprite the spritenum of me = the standardImage of me
  DoControl me
end

on mouseDown me
  set the member of sprite the spritenum of me = the clickedImage of me
end  

on mouseEnter me
  set the member of sprite the spritenum of me = the alternateImage of me
end  

on mouseLeave me
  set the member of sprite the spritenum of me = the standardImage of me
end

---

on beginSprite me
  set the standardImage of me = the member of sprite the spriteNum of me
end

---

on getPropertyDescriptionList
  if the currentspritenum = 0 then
    set memdefault = 0
  else
    set memref = the member of sprite the currentspritenum
    set memdefault = member (the membernum of member memref + 1)
    set memdefault2 = member (the membernum of member memref + 2)
  end if
  
  set p_list = [   #videoCommand: [ #comment:   "Action:",#format:   #symbol,   #range: [ #Play, #Pause, #Rewind,#StepBackward,#StepForward, #Seek, #PlaySegment],#default:   #Play ], #param1: [ #comment:   "First Parameter (Use with seek or playsegment):", #format:   #long, #default:    0] , #param2: [ #comment:   "Second Parameter (Use with playsegment):", #format: #long,   #default:    0] ,  #videoSprite: [ #comment:   "DirectMedia Sprite Channel:", #format:   #integer,   #default:    1] ,    #alternateImage: [ #comment:   "Rollover Button Cast Member:",                     #format:   #graphic,                    #default:    memdefault ], #clickedImage: [ #comment:   "Clicked Button Cast Member:",                     #format:   #graphic,                    #default:    memdefault2 ]]                  
  return p_list
end

on getBehaviorDescription
  return "Used to create Play, Pause, StepForward, StepBackward, Rewind, Seek and PlaySegment control buttons for a DirectMedia Xtra video sprite. You can also attach rollover and alternate images for the clicked buttons" & RETURN & "PARAMETERS:" & RETURN & "Action - Choose the action to perform on mouseUP ( Play, Pause, Rewind, StepBackward, StepForward, Seek, PlaySegment )." & RETURN & "First Parameter: if the Action is Seek than this parameter contains the seek to time (in milliseconds). For the PlaySegment action this parameter contains the starting time of the segment to play (in milliseconds)"& RETURN &"Second Parameter: Used with the PlaySegment action. Contains the ending time of the segment to play (in milliseconds)"& RETURN &"DirectMedia Sprite Channel - Enter the number of sprite channel of the DirectMedia Xtra video that is being controlled."& RETURN &"Rollover Button: the castmember that will be used as the rollover image of the button. Default is the castmember located just after the button castmember"& RETURN&"Clicked Button: the castmember that will be used as the clicked image of the button. Default is the castmember located just after the rollover castmember"
end

 


Contact

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

Send e-mail