on PrepareMovie
   Global gTextPath,gLimit,gLoadObj,gWinObj
   
   if voidP(gWinObj) OR gWinObj = "" then
     ClearGlobals
     set the windowList = []
   end if
   
   InitMovie()
    
    mCheckPref(gLoadObj,"data" & gLimit & "datconf.txt")
    
    mAddLoadNet(gLoadObj,gTextPath & "datconf.txt","data" & 
   gLimit & "datconf.txt",2,false)
    
    if the machineType <> 256 then
      installMenu "AppleMenu"
    end if
  end PrepareMovie
  
  
  on InitMovie
    Global gLimit,gGifObj,gGifObjPath,gTextPath,gContent,gAktLine,
    gAktProp,gLoadObj,
    gDataObj,gHelpObj,gFontObj,gProxyIP,gProxyPort
    
    set gContent    = []
    set gAktLine    = 0
    set gAktProp    = 0
    
    if the machineType = 256 then
      set gLimit = "\"
    else
      set gLimit = ":"
    end if
    
    set gGifObjPath = "http://www.hermes.de/heise/"
    set gTextPath   = "http://www.hermes.de/heise/"
    set gProxyIP    = ""
    set gProxyPort  = 0
    set gGifObj     = new(script "kPictObj")
    set gLoadObj    = new(script "kLoadObj")
    set gDataObj    = new(script "kDataObj")
    set gHelpObj    = new(script "kHelpObj")
    set gFontObj    = new(script "kFontObj")
    
    cacheDocVerify #always
  
    proxyServer(#http,#stop)
    
    ClearFields()
    
    mSetStatus(gLoadObj,"Initializing")
  end InitMovie
  
  
  on StopMovie
    ClearFields()
  end StopMovie
  
  
  on closeWindow
    Global gWinObj
    
    if voidP(gWinObj) OR gWinObj = "" then
      quit
    else
      tell the stage to Finish()
    end if
  end closeWindow
  
  
  on ClearFields
    Global gGifObj,gLimit
    
    set the text of field "big_list" to "-"
    set the text of field "line_Ctn" to "000"
    set the text of field "line_Act" to "000"
    set the text of field "info_text" to " "
    set the text of field "info_sta" to " "
    set the text of field "info_url" to " "
    set the text of field "txt_name" to " "
    set the text of field "entry_name" to " "
    set the text of field "img_name" to " "
    set the text of field "state_Net" to " "
    set the text of field "helptxt" to " "
    set the fileName of member "TheHead" to the pathName & 
   "data" & gLimit & "nohead.gif"
    mEmptyPict(gGifObj)
  end ClearFields
  
  
  on About
    alert("HotReader by Detlef Beyer")
  end About
