on PrepareMovie
  Global gGifObjPath,gTextPath,gProxyIP,gProxyPort
  
  set the text of field "gif_URL" to gGifObjPath
  set the text of field "text_URL" to gTextPath
  set the text of field "prox_URL" to gProxyIP
  set the text of field "port_URL" to string(gProxyPort)
end PrepareMovie


on closeWindow
  MyWinClose()
end closeWindow


on DeadWindow wichOne
  Global gGifObjPath,gTextPath,gWinObj,gProxyIP,gProxyPort
  
  if wichOne = 1 then
    set gGifObjPath = the text of field "gif_URL"
    set gTextPath = the text of field "text_URL"
    set newProxy = the text of field "prox_URL"
    if newProxy = "" then
      set gProxyIP = ""
      set gProxyPort = 0
      proxyserver(#http,#stop)
    else
      set gProxyIP = newProxy
      set gProxyPort = value(the text of field "port_URL")
    end if
  end if
  
  if voidP(gWinObj) or gWinObj = EMPTY then
    close window 1
  else
    close window 2
  end if
end DeadWindow


on MyWinClose wichOne
  Global gWinObj
  
  if voidP(gWinObj) or gWinObj = EMPTY then
    tell the stage to ClosePara()
  else
    mTalkToMe(gWinObj,"ClosePara()")
  end if
end MyWinClose
