8 Replies Latest reply on Oct 23, 2007 5:34 AM by earthmuse95

    website links do not work

    earthmuse95
      I have two links in a projector to html index files. all of the links point to files that are completely offline, and yet on another person's computer, they will not open. i just made a post regarding an odd error message as well. i just noticed that the script i used to call all of these external files is the same in all instances where files are not opening. the script is:

      on mouseDown me

      ok = baOpenFile(the moviePath & "style guide.swf", "maximized")

      if ok < 32 then -- some error occurred

      case ok of

      2: -- file not found
      alert( "File not found!" )

      31: -- powerpoint not installed
      alert( "You need to have PowerPoint installed to view this file." )

      otherwise: -- some other error, very unlikely

      alert( "Unknown error" )
      end case

      end if
      end


      end

      I'm not a programmer, i just finessed this as best i could. what have i done wrong here, or what is missing, as the links work on my computer, and i copied all of the work files to cd - all of them!
        • 1. Re: website links do not work
          Level 7
          That error 31 that is defined as powerpoint not installed actually means
          that there is no application associated with the given filename. I will
          guess that the program you snagged that code from was used to launch
          powerpoint files, and now you are trying to launch swf files. The thing
          is, some computers will not be able to open a swf file just by
          double-clicking on it. That is, in essence, what baOpenFile does. The
          error is saying that the client machine does not know what to do with
          swf files. You may want to change baOpenFile to baOpenURL which should
          try to open the swf in a browser. That should work more often.

          Or maybe something like this:

          on mouseDown me

          ok = baOpenFile(the moviePath & "style guide.swf", "maximized")

          if ok < 32 then -- some error occurred

          case ok of

          2: -- file not found
          alert( "File not found!" )

          31: -- nothing can open swf
          baOpenURL(the moviePath & "style guide.swf", "maximized")

          otherwise: -- some other error, very unlikely

          alert( "Unknown error" )
          end case

          end if
          end


          end
          • 2. Re: website links do not work
            earthmuse95 Level 1
            wow . . . that works great to open the swf file! I still get nothing though when clicking on the links to the html files. Maybe it is something else I've done here.

            I have all the files for two websites (they're small and in development!) offline, in separate folders, and copied to the projector CD I have tried to put together so far. The sites aren't online, else I;d look for another solution. I made a shortcut to each index file and put those in the top level of the projector directory. An example is below. Is there something wrong with this (using a .lnk file to call these index files)? Again, it works on my computer . . .

            on mouseDown me

            ok = baOpenFile(the moviePath & "Shortcut to index.lnk", "maximized")

            if ok < 32 then -- some error occurred

            case ok of

            2: -- file not found
            alert( "File not found!" )

            31: -- nothing can open swf
            baOpenURL(the moviePath & "Shortcut to index.lnk", "maximized")

            otherwise: -- some other error, very unlikely

            alert( "Unknown error" )
            end case

            end if
            end


            end

            Thank you SO much for getting me this far! I've got to be close here . . .
            • 3. Re: website links do not work
              Level 7
              I don't know if you can open .lnk files that way. Why not just use
              baOpenURL and point it at the actual html file that you want to open?
              • 4. Re: website links do not work
                earthmuse95 Level 1
                i can try that . . . but where do i need to put the files? They are both index.html files, one to each of two different sites. Each one is now in its own separate folder.
                I made the shortcuts because I thought I needed something less nested in order for it to be able to call them, if that makes sense . . . am I being clear?
                • 5. Re: website links do not work
                  Level 7
                  If they are on the web, then it is super easy:

                  baOpenURL(" http://www.google.com","maximized")

                  If they are on the CD, then assuming that your Director projector is in
                  the root of the CD, you just use the relative address. If the projector
                  is at:

                  cdroot\projector.exe

                  and your file is at

                  cdroot\htmlfiles\index.html

                  then you would use this:

                  baOpenURL(the moviePath&"htmlfiles\&"index.html","maximized")

                  *Note that I used the backslash which is only for PCs- you would change
                  that to a colon : for Macs.
                  • 6. Re: website links do not work
                    earthmuse95 Level 1
                    gosh i'm feelin' dense here

                    i used this

                    baOpenURL(the moviePath&"LAST GOOD SAVE\&"index.html","maximized")

                    and i get the script error: "string does not end correctly" . . .

                    on mouseDown me

                    ok = baOpenFile(the moviePath & "Shortcut to index.lnk", "maximized")

                    if ok < 32 then -- some error occurred

                    case ok of

                    2: -- file not found
                    alert( "File not found!" )

                    31: -- nothing can open swf
                    baOpenURL(the moviePath&"LAST GOOD SAVE\&"index.html","maximized")

                    otherwise: -- some other error, very unlikely

                    alert( "Unknown error" )
                    end case

                    end if
                    end


                    end
                    • 7. Re: website links do not work
                      Level 7
                      earthmuse95 wrote:

                      > i used this
                      >
                      > baOpenURL(the moviePath&"LAST GOOD SAVE\&"index.html","maximized")
                      >
                      > and i get the script error: "string does not end correctly" . . .

                      Hi,

                      You're missing a " in your statment or you have one which is not needed..

                      1. Your statement could be:
                      baOpenURL(the moviePath&"LAST GOOD SAVE\index.html","maximized")
                      took out the - &"

                      2. or
                      baOpenURL(the moviePath&"LAST GOOD SAVE\"&"index.html","maximized")
                      added a " before the &

                      But syntax 1 is better than 2. The "&" serves no purpose.

                      regards
                      Dean

                      Director Lecturer / Consultant / Director Enthusiast
                      http://www.fbe.unsw.edu.au/learning/director
                      http://www.multimediacreative.com.au
                      email: d.utian@unsw.edu.au



                      • 8. Re: website links do not work
                        earthmuse95 Level 1
                        thanks! i think this works now! all i have to figure out is how to get rid of all the microsoft 'do you want to run active x content nags' geez

                        again . . . thanks so much