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
QTVR basic behavior
cXtraEditBox
Scroll Text With Mouse
Text Search Engine
Non-repeating random list
Tree View
E-mailExec 2.01
Setup Anim
Media Make & Go
Set Color properties of a vector cast member
 

 

 

Behavior Go Marker

Added on 7/6/2000

 

Compatibilities:
behavior D7 D8 Mac PC Shockwave

This item has not yet been rated

Author: KumarK

Go Marker

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

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

------ Get Behavior Description List ------
on getPropertyDescriptionList me
  set description = [:]
  if the currentspritenum = 0 then
    addProp description, #whichMarker, [#comment: "Go To Which Marker ?" ,#format:#Marker,#default:1]    
    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, #whichMarker, [#comment: "Go To Which Marker ?" ,#format:#Marker,#default:1]
    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    
  return description
end getPropertyDescriptionList
------ Get Behavior Description List ------

-- Get Behavior description --
on getBehaviorDescription me
  return
    "GO Marker" & RETURN & RETURN &
    "This Behavior make the playback head loop to the Marker specified. " & RETURN & RETURN &
    "PARAMETERS:" & RETURN &
    "* Go To Which Marker" & 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 ------

-- Events --
on EnterFrame me
  if WhereTo = "On EnterFrame" then
    Go whichMarker
  end if
end EnterFrame

on ExitFrame me
  if WhereTo = "On ExitFrame" then
    Go whichMarker
  end if
end ExitFrame

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

on MouseUp
  if WhereTo = "On MouseUp" then
    Go whichMarker
  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