7 Replies Latest reply on Feb 21, 2010 7:29 AM by jchunick

    Password Protect Part of a Director Movie




      I've recently purchased INM Impressario and i've added a bunch of PDFS to my director movie.


      I'll be handing this movie out to my students, but i would like only certain students to view certain pdf files.


      Is there a way i can either password protect the pdf sprite, or would it be easier to go to another frame on button click, whereby the user has to enter a password, and if the password is correct they will be taken to the frame that contains the pdf file.


      appreciate any advice. I have never used Lingo before and this is most likely where it will be heading....


      many thanks,



        • 1. Re: Password Protect Part of a Director Movie
          Mike Blaustein Level 4

          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.

          • 2. Re: Password Protect Part of a Director Movie
            richbell20 Level 1

            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?




            • 3. Re: Password Protect Part of a Director Movie
              Mike Blaustein Level 4

              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.

              • 4. Re: Password Protect Part of a Director Movie
                richbell20 Level 1

                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?



                • 5. Re: Password Protect Part of a Director Movie
                  Mike Blaustein Level 4

                  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

                            go "correct"


                            go "incorrect"

                       end if



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

                  • 6. Re: Password Protect Part of a Director Movie
                    richbell20 Level 1

                    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?


                    any ideas?


                    Thanks again,



                    • 7. Re: Password Protect Part of a Director Movie
                      jchunick Level 2

                      The simplest method is to throw up an alert:


                      alert("The wrong password was entered. Please try again.")