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