It would probably be better to password protect the pdf files themselves. Otherwise, the students could just ignore your whole Director movie and open the pdfs straight from Explorer/Finder. In the Impressario docs, it explains how to open a password protected pdf. So you would just have Director open the PDFs with the password if the student should see that file, and not open it if they should not.
Hi, thanks for the swift response.
I probabaly didn't make myself clear enough in the original question, so apologies for that.
I'm aware that they could access the pdf files via explorer, which is why ive password protected every pdf. I have 3 courses on a single director movie - some students will only be required to view 2 courses, and not the 3rd. I could create 2 separate director movies and burn them to cd's, but for simplicity and cost i want to have everything on a single disk but restrict access.
The password protection within INM just allows the pdf to be viewed if it is password protected, and i can't see anything that will enable me to add a password dialog box to pop up. This is why i'm thinking for course 3, i'll probably have to play a random frame that has some sort of input box in it for entering a password, and then be diverted to the pdf file itself.
do you understand?
That is exactly what you should do. Make a password-entry frame which just has an editable text sprite. If the student has put in the correct password, then open the pdf. If not, then don't. If you want a more standard looking password prompt, you can use BuddyAPI's baPrompt() which will pop up a nice little window asking for the pw.
Hi, thanks again.
I feared that may be the only way of doing this.
I downloaded BuddyAPI but that's as far as I got. I have no idea what to do from here?
Would you be so kind as to offer advice on how i go about this password section to my movie?
1) install the xtra
Make sure that you put the budapi.x32 (or whatever the x32 name is) into your Director xtras folder. That would typically be program files\adobe\adobe director 11\configuration\xtras. Older versions of Director would have similar paths, but with Macromedia instead of Adobe
2) Add the xtra to the movie
Open your file in Director and go to Modify, Movie, Xtras... and Add budapi to your projector
3) Make a button that will bring up the prompt.
Use any text or bitap that you want. Give it this script:
on mouseUp me
userEntered=baPrompt("","Please enter your password","",2,-1,-1)
if userEntered="CORRECT PASSWORD HERE" then
*obviously, change CORRECT PASSWORD HERE to the correct password, and change those two go statements to do whatever you want the program to do if the password is entered correctly or incorrectly.
That worked an absolute treat, thank you ever so much for that!
I do have an extra favour to ask though...
I managed to make it go to one frame if entered incorrectly, and load the pdf if the password was correct. Would you mind telling me what i';d need to enter into the lingo section to show some sort of message that tells the user they have entered the password incorrectly. The only way i can think of at the minute is to just create a clone of the frame the user is one when the enter a password, but add a text label telling them they have entered it incorrectly. It would be better if it was in a similar grey pop up box though?
The simplest method is to throw up an alert:
alert("The wrong password was entered. Please try again.")