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
MPEG Xtra Controller Button
Initialize QuickTime Video (no white flash)
OSControl Xtra Review
Easy Templates Flash Website Kit
Director Publications
DirectTransition
Disable/Enable-Disk Errors,Task Switching,Screen saver,Task Bar
Real Player ActiveX Control
Write a file
Shocking the Web : Windows
 

 

 

Behavior Mouse click or Key press

Added on 8/23/2000

 

Compatibilities:
behavior D7 D8 Mac PC Shockwave

This item has not yet been rated

Author: SunilBalan

Drop this behaviour(frame script) in a frame of your movie. I have used the "mouseDownscript" because it doesn"t make the movie to jump to another frame if any other button on stage is clicked.

-- compiled by Sunil Balan
-- sunilbalan@usa.net

property pNavigate

on getPropertyDescriptionList me
  description = [:]
  addProp description, #pNavigate,[#comment: "Mouse click or key press?",#format:#String,#range:["Go to next frame","Go to next marker","Go to previous Marker","Go loop","Exit"], #default:"Go to next frame"]
  return description
end getPropertyDescriptionList


on beginsprite
  case pNavigate of
    "Go to next frame":set the mouseDownScript to "if the clickOn = 0 then go to the frame +1"
    "Go to next marker": set the mouseDownScript to "if the clickOn = 0 then go next"
    "Go to previous marker": set the mouseDownScript to "if the clickOn = 0 then go previous"
    "Go loop": set the mouseDownScript to "if the clickOn = 0 then go loop"
    "Exit":set the mouseDownScript to "if the clickOn = 0 then quit"
  end case
end

on keydown
  case pNavigate of
    "Go to next frame":
      if the key = the key then
        go to the frame +1
      end if
    "Go to next marker":
      if the key = the key then
        go next
      end if
    "Go to previous marker":
      if the key = the key then
        go previous
      end if
    "Go loop":
      if the key = the key then
        go loop
      end if
    "Exit":
      if the key = the key then
        quit
      end if
  end case
end

on exitframe
  go the frame
end

on endsprite
  set the mouseDownScript to "if the clickOn = 0 then go the frame"
end

 


Contact

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

Send e-mail