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
Special Edition Using Macromedia Director 8.5
cXtraFlameFX
Fill Gradient to a Vector Shape
Rotate-a-Sprite
Sprite Recorder
Projector debugger
Show Time
Dialog Xtra
simZip Xtra
Drag Install
 

 

 

Behavior Go Marker of a Movie in current Directory

Added on 7/6/2000

 

Compatibilities:
behavior D7 D8 Mac PC Shockwave

This item has not yet been rated

Author: KumarK

Go Marker of a Movie in current Directory

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

------ Custom Properties ------
property  WhereTo,whichMarker,MyCursor,Rollovermember,StandardMember,savedCursor,Clickedmember,spritenum,whichMovie

------ Get Behavior Description List ------
on getPropertyDescriptionList me
  set description = [:]
  filelist=searchMovies(me)
  if filelist.count > 0 then
    if the currentspritenum = 0 then
      addProp description, #whichMovie, [#comment: "Select Movie Name Here ?" ,#format:#String,#range:filelist,#default:filelist[1]]
      addProp description, #whichMarker, [#comment: "Go To Which Marker ?" ,#format:#string,#default:"Enter Marker Name Here"]
      addProp description, #WhereTo, [#comment: "Where To Attach ?" ,#format:#String,#range:["On EnterFrame","On ExitFrame"],#default:"On EnterFrame"]
    else
      theMember = sprite(the currentSpriteNum).member
      theMemberNumber = theMember.number  
      addProp description, #whichMovie, [#comment: "Select Movie Name Here ?" ,#format:#String,#range:filelist,#default:filelist[1]]
      addProp description, #whichMarker, [#comment: "Go To Which Marker ?" ,#format:#string,#default:"Enter Marker Name Here"]
      addProp description, #MyCursor, [#comment: "Set the Cursor To(On Rollver and MouseClicK) :",#format:#cursor,#default:280]  
      addProp description, #Rollovermember, [#comment: "Set RollOver Member To :" ,#format:#Graphic,#default:member(theMemberNumber+1)]    
      addProp description, #Clickedmember, [#comment: "Set Clicked Member To :" ,#format:#Graphic,#default:member(theMemberNumber+2)]
      addProp description, #WhereTo, [#comment: "Where To Attach ?",#format:#String,#range:["On MouseUp"],#default:"On MouseUp"]    
    end if    
  end if
  return description
end getPropertyDescriptionList
------ Get Behavior Description List ------


-- Get Behavior description --
on getBehaviorDescription me
  return \
    "GO Marker of a Movie" & RETURN & RETURN & \
    "This Behavior make the playback head loop to the Marker specified of the Movie Specified. " & RETURN & RETURN & \
    "Movie shold be in the current Directory Only. " & RETURN & RETURN & \
  "PARAMETERS:" & RETURN & \
  "* Movie Name " & RETURN & \
  "* Marker Name" & RETURN & \
    "* Cursor" & RETURN & \
    "* RollOver Member" & RETURN & \
    "* MouseDown/Clicked Member" & RETURN & \
  "* Where To assign this Script."
end getBehaviorDescription
-- Get Behavior description --

------ Availbale for both Frame and Sprite Script ------
on isOKToAttach (me, aSpriteType, aSpriteNum)
  case aSpriteType of
    #graphic:
      return true
    #script:
      return true
  end case
end isOKToAttach
------ Availbale for both Frame and Sprite Script ------
------ Search for Movies ------
on searchMovies me
  set fileList = [ ]
  repeat with i = 1 to the maxInteger
    set n = getNthFileNameInFolder(the moviePath, i)
    if n = EMPTY then exit repeat
    if (offset(".dir",n) <> 0) or (offset(".dxr",n) <> 0) then
      n=chars(n,1,the number of chars in n -4)
      append(fileList, n)
    end if
  end repeat
  return filelist
end
------ Search for Movies ------

-- Events --
on EnterFrame me
  if WhereTo = "On EnterFrame" then
    Go frame whichMarker of movie whichMovie
  end if
end EnterFrame

on ExitFrame me
  if WhereTo = "On ExitFrame" then
       Go frame whichMarker of movie whichmovie
  end if
end ExitFrame

on beginsprite
  StandardMember = sprite(spritenum).member
  savedCursor=sprite(spritenum).cursor
end

on MouseUp
  if WhereTo = "On MouseUp" then
    Go frame whichMarker of movie whichmovie
  end if
end MouseUp

on MouseDown me
  if WhereTo <> "On EnterFrame"  or WhereTo <> "On EnterFrame" then
    repeat while the stilldown
      sprite(spritenum).member=Clickedmember
      updatestage
    end repeat
  end if
end MouseDown

on MouseEnter me
  if WhereTo <> "On EnterFrame"  or WhereTo <> "On EnterFrame" then
    Sprite(Spritenum).member=Rollovermember
    Sprite(Spritenum).cursor=MyCursor
  end if
end MouseEnter

on MouseLeave me
  if WhereTo <> "On EnterFrame"  or WhereTo <> "On EnterFrame" then
    Sprite(Spritenum).member=StandardMember
    Sprite(Spritenum).cursor=savedCursor
  end if
end MouseLeave
------ Events ------  

 


Contact

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

Send e-mail