11 Replies Latest reply on Oct 29, 2007 4:03 AM by Newsgroup_User

    Retrive data from txt file with getNetText

      I'm having a little trouble getting my head around how to retrieve a small amount of data [such as date or a URL] from a text file on the web. I've got a number of small educational apps online and I use the following code to add a bit of security so I don't end up finding the same apps on someone else's site. The number of apps has gotten so that updating them with current date or urls can be quite onerous. What I'd like to do is change these to variables and then store the value of those variables in a small text file online. That way making changes would be quite simple. I'm trying to use getNetText as per some other posts here.


      on startMovie
      okToPlay = FALSE
      if the moviePath starts " http://neko.ca" then okToPlay = TRUE
      if the moviePath starts " http://www.neko.ca" then okToPlay = TRUE
      if not okToPlay then
      gotoNetPage(" http://neko.ca/content/view/137/191/")
      if externalParamValue("src") starts "http:" then okToPlay = FALSE
      if the systemDate.year > "2008"then gotoNetPage(" http://www.neko.ca/content/view/136/190/")
      end if
      end startMovie

      I can sort of see how to retrieve some text then dump it into an existing sprite. What I'm wondering is whether it's possible to utilize that text in a behavior or movie script? For example: Change the date 2008 above to something like pExDate then retrieve it from outside, then test for that value. Is this impossible?