Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

on Start Movie, where to put the code?

Status
Not open for further replies.

raznov

Programmer
Apr 8, 2002
110
US
Hi there.. trying to put some code into a Director movie that will not allow the projector to be running multiple sessions, which happens now, due to the .inf file which tells it to autorun and the possibility that a user might not wait for the autorun and just simply click on the executable.

Anyway, the code I want to us is as follows, but it doesn't work, I put it on the first frame of the frame script row. Am I putting it in the wrong place or is the code I am using wrong? Any help would be greatly appreciated.

on startMovie
on checkForPreviousOpen
if baPrevious( true )<>0 then quit
end
end


KIM



 
You can’t have
Code:
on
handler within another
Code:
on
handler. Your script should be:
Code:
--
on startMovie  
  if baPrevious( true )<>0 then quit 
end startMovie  
--
Also
Code:
on startMovie
handler only works as Movie Script - not as a Frame Script.
 
Forgive my ignorance please... relearning Director after a long hiatus... Where does a movie script go?

K
 
Movie script resides in the Cast. It is not to be assigned to any frame or Sprite, as it is accessible from anywhere in the Movie.

To set the script type, select a script in the Cast then go to Property Inspector > Script. Choose a script type from the dropdown menu.
 
Thanks so much kennethkawamoto. It is so annoying because I typed in movie script into the help search for Director and it will not come up. But I remember now. Thanks again.

KIM
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top