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
RadioGroup
Director Publications
Res Mode
Flashation Flash Menu Builder
Spawn
Convert Fonts
Install font
myWindow
Super Debugging
Image capture Xtra
 

 

 

Behavior Go Frame X

Added on 7/6/2000

 

Compatibilities:
behavior D7 D8 Mac PC Shockwave

This item has not yet been rated

Author: KumarK

Go To Frame X

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

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

------ Get Behavior Description List ------
on getPropertyDescriptionList me
  set description = [:]
  if the currentspritenum = 0 then
    addProp description, #whichFrame, [#comment: "Go To Which Frame ?" ,#format:#Integer,#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, #whichFrame, [#comment: "Go To Which Frame ?" ,#format:#Integer,#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 Frame X" & RETURN & RETURN &
    "This Behavior make the playback head loop to the Frame 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 whichFrame
  end if
end EnterFrame

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

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

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