4 Replies Latest reply on Apr 14, 2008 7:37 AM by Phyton232

    Newbie lost

      Hi there.
      My boss drop this bomb in my desk and I have no idea of how to sort. He gave a director file that I need to modify in order to work (apparently the project was started by the guy who left). Basically I got this director that using the WebXtra should try go to a certain web page. If there is no internet connection on user's computer should read a file in the cd. Ive got the code to search for the file, but I dont know how to do the rest.
      Can anyone help? Thanks!

      on exitFrame
      set the searchCurrentFolder to TRUE
      put navigate ( sprite 1, the applicationPath & "file.htm")

        • 1. Re: Newbie lost
          Level 7
          > on exitFrame
          > set the searchCurrentFolder to TRUE
          > put navigate ( sprite 1, the applicationPath & "file.htm")
          > end

          So you already have the WebXtra sprite navigating to the file on CD (or
          beside the projector).
          What remains is for you to determine whether there is an internet
          connection and navigate to an 'online' URL instead of a local page if
          there is.
          From what you already have (navigate()) can you see how to complete the
          second part - navigating the sprite to an online URL?
          What research have you done about the first part - determining whether
          there's an internet connection?
          • 2. Re: Newbie lost
            Phyton232 Level 1
            The only research Ive done was within the company's previous projects, and unfortunately they don't anything like that ready. What I have noticed is with WebXtra (which we do have) you can type an url within a project and it works (I have tried) so I thought maybe there would be something in WebXtra itself that could do that, but I'm not sure.
            If WebXtra can't do that (check internet connection) I don't know what to do, to be honest. Like I said, I'm a bit lost... Thank you for your reply
            • 3. Re: Newbie lost
              Level 7
              The standard way to check if there is internet access is to have the
              program try to access the internet, and see if it is successful.

              I'm not going to get into the details of getNetText(), netTextResult(),
              netDone(), and netError() right now, but those are the commands. Check
              out the help file and the wiki at director-online.com for details.

              Basically you will try to get a page from a site that you know is up.
              This can be your own site or one that you have relative assurance will
              remain working, like www.google.com or something.
              • 4. Re: Newbie lost
                Phyton232 Level 1
                Thanks Mike! But the things is, I dont know how to use these commands. I'm very, very new to Director but I got to get this working...