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
Creating a Marquee Tool
DirectControl
Custom Scroll Bars
Create Icon
Populate MS Combo Box ActiveX
Sound FadeIn
Yak
VTC Training CD for Macromedia Director 6
Sub Hunt
BehaviorChecker
 

 

 

Behavior Go to Different Movie

Added on 7/6/2000

 

Compatibilities:
behavior D7 D8 Mac PC Shockwave

This item has not yet been rated

Author: KumarK

Go to Different Movie

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

property  WhereTo,filelist

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

on ExitFrame me
  if WhereTo = "On ExitFrame" then
    navigatetomovie
  end if
end ExitFrame

on MouseUp
  if WhereTo = "On MouseUp" then
    navigatetomovie
  end if
end MouseUp

on MouseDown
  if WhereTo = "On MouseDown" then
    navigatetomovie
  end if
end MouseDown

on MouseEnter
  if WhereTo = "On MouseEnter" then
    navigatetomovie
  end if
end MouseEnter

on MouseLeave
  if WhereTo = "On MouseLeave" then
    navigatetomovie
  end if
end MouseLeave
------ Events ------

------ Get Behavior Description List ------
on getPropertyDescriptionList me
  filelist = searchMovies(me)
  if  filelist.count() > 0 then
    set description = [:]
    addProp description, #filelist, [#comment: "Navigate to Which Movie ?" ,#format:#String,
    #range:filelist,#default:filelist[1]]
    if the currentspritenum = 0 then
      addProp description, #WhereTo, [#comment: "Where To Attach ?" ,#format:#String,
    #range:["On EnterFrame","On ExitFrame"],#default:"On EnterFrame"]
    else
      addProp description, #WhereTo, [#comment: "Where To Attach ?" ,#format:#String,
    #range:["On MouseUp","On MouseDown","On MouseEnter","On MouseLeave"],#default:"On MouseUp"]    
    end if    
    return description
  else
    exit
  end if  
end getPropertyDescriptionList
------ Get Behavior Description List ------

-- Get Behavior description --
on getBehaviorDescription
  return "This Behavior Nagiates to Different Movie." & RETURN & RETURN &
  "Parameters" & RETURN &
  "* Where to attach this Script"
end

------ 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 ------

-- Custom Handler to GotoDiffrent Movie--
on navigatetomovie
go to movie filelist
end
-- Custom Handler to GotoDiffrent Movie--

 


Contact

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

Send e-mail