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
Quick mouseover
Versiown
Fill using setPixel
bambino
ToolTips for Shockwave 3D
Dither Black and White Image - Imaging Lingo
Removing the stage border
Using Director 7 (Special Edition)
cXtraGraphicIO
Wait for Cue Point GTF
 

 

 

Behavior Set Cast member Properties of a QuickTime

Added on 6/15/2000

 

Compatibilities:
behavior D7 D8 PC

This item has not yet been rated

Author: KumarK

Set Cast member Properties of a QuickTime

---- written for Director 8 ---
---- Kumar.K kumark@icode.com ----

--- Custom Properties ---
property sourcemember,WhereTo,show_video,play_sound,preload_video,directtostage_video,pausedatstart_video,loop_video,Show_Controller,Streaming_Prop
--- Get Behavior Description List ---
on getPropertyDescriptionList me
  QTMembersList=searchDigitalVideo (me)
  descriptionlist = [:]
  spriteassignlist=["Mouse Up","Mouse Down", "Mouse Enter","Mouse Leave"]
  frameassignlist=["Exit Frame","Enter Frame"]
  if QTMembersList.count > 0 then
    addprop descriptionlist,#sourcemember,[#comment:"Digital Video Cast member :",  \
    #format:#String,#range:QTMembersList,#default:QTMembersList[1]]
  else
    addprop descriptionlist,#sourcemember,[#comment:"Digital Video Cast member :",#format:#Graphic,#default:1]
  end if
  addprop descriptionlist,#show_video,[#comment:"Set Show Video Property To :",#format:#Boolean,#default:True]
  addprop descriptionlist,#play_sound,[#comment:"Set Play Sound Property To :",#format:#Boolean,#default:True]
  addprop descriptionlist,#Show_Controller,[#comment:"Set Show Controller Property To :",#format:#Boolean,#default:True]  
  addprop descriptionlist,#preload_video,[#comment:"Set Preload Property To :",#format:#Boolean,#default:True]
  addprop descriptionlist,#directtostage_video,[#comment:"Set DirectToStage Video Property To :",#format:#Boolean,#default:True]
  addprop descriptionlist,#Streaming_Prop,[#comment:"Set Streaming Property To :",#format:#Boolean,#default:True]  
  addprop descriptionlist,#pausedatstart_video,[#comment:"Set PausedAtStart Property To :",#format:#Boolean,#default:True]
  addprop descriptionlist,#loop_video,[#comment:"Set Loop Property To :",#format:#Boolean,#default:True]
  if the currentspritenum <> 0 then
    addprop descriptionlist, #WhereTo, [#comment:"Where To Assign this Script ?", #format:#String,#range:spriteassignlist,#default:spriteassignlist[1]]
  else
    addprop descriptionlist, #WhereTo, [#comment:"Where To Assign this Script ?", #format:#String,#range:frameassignlist,#default:frameassignlist[2]]
  end if  
  return descriptionlist
end getPropertyDescriptionList
--- Get Behavior Description List ---


-- Get Behavior description --
on getBehaviorDescription
  return "This Behavior Sets the True/False Properties of a Digital Video(QuickTime) " & RETURN & RETURN & \
  "Parameters" & RETURN & \
  "* Source Digital Video Cast member." & RETURN & \
  "* True/False" & RETURN & \
  "* Where to attach this Script"
end
-- Get Behavior description --

-- events --
on mouseUp me
  if WhereTo="Mouse Up" then
    SetProperties
  end if
end

on mouseDown me
  if WhereTo="Mouse Down" then
    SetProperties
  end if
end

on mouseEnter me
  if WhereTo="Mouse Enter" then
    SetProperties
  end if
end

on mouseLeave me
  if WhereTo="Mouse Leave" then
    SetProperties
  end if
end

on enterframe
  if WhereTo="Enter Frame" then
    SetProperties
  end if
end

on ExitFrame
  if WhereTo="Exit Frame" then
    SetProperties
  end if
end
-- events --

-- custom handlers --
on SetProperties
  if member(sourcemember).type = #QuickTimeMedia then
    member(sourcemember).controller=Show_Controller    
    member(sourcemember).video=show_video
    member(sourcemember).sound=play_sound
    member(sourcemember).preload=preload_video
    member(sourcemember).DirectToStage=directtostage_video
    member(sourcemember).PausedAtStart=pausedatstart_video    
    member(sourcemember).loop=loop_video  
    member(sourcemember).streaming=Streaming_Prop    
  end if
end
-- custom handlers --

------ Availbale for both Frame & Sprite Script ------
on isOKToAttach (me, aSpriteType, aSpriteNum)
  case aSpriteType of
    #graphic:
      return true
    #script:
      return True
  end case
end isOKToAttach
------ Availbale for both Frame & Sprite Script ------


------ Search for QT Member ------
on searchDigitalVideo me
  AVIMembersList = []
  maxCastLib = the number of castLibs
  repeat with theCastLib = 1 to maxCastLib
    maxMember = the number of members of castLib theCastLib
    repeat with memberNumber = 1 to maxMember
      theMember = member(memberNumber, theCastLib)
      if theMember.type = #QuickTimeMedia then
        if theMember.name = EMPTY then
          AVIMembersList.append(theMember)
        else
          AVIMembersList.append(theMember.name)
        end if
      end if
    end repeat
  end repeat
  return AVIMembersList
end
------ Search for QT Member ------  

 


Contact

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

Send e-mail