1 Reply Latest reply on Feb 26, 2010 11:10 AM by Sean_Wilson

    Problem with gotonetmovie connecting?

    bobnagel

      I am trying to build a loader movie for another large application director movie ("'ea300.dcr") on the web. I have this code on an early frame of the loader

       


      on beginsprite  
        gNetID = 0
        netDone(gNetID) = 0
      end

       

      on exitFrame me
        gNetID =  gotoNetMovie("http://www.myclient.com/client_proposals/ClientAnim/Data/ea300.dcr")   

        go to "audio2" 
      end

       

      ----on the following frame I have-----

       

      global gNetID,myaudio,zoo,zoo2

       

      on beginsprite me 
        sprite(89).width = 1

       
      end

       

       

       

      on exitFrame me
        myaudio = getStreamStatus(gNetID)
      sprite(84).member.text = String(getStreamStatus(gNetID))
        sprite(17).member.text= string(myaudio.bytesSoFar)
        sprite(20).member.text=string(myaudio.bytesTotal)


        if myaudio.bytesTotal > 0 then
         
          zoo = float(myaudio.bytesSoFar)
          zoo2= myaudio.bytesTotal
          set the floatprecision to 2
          sprite(16).width = integer(143 * (zoo / zoo2))
          sprite(26).member.text = string(( zoo / zoo2 * 100))
        end if
       
        sprite(18).member.text = "Loading Audio"

       
        if netdone(gNetID) = False then
          go the frame   
          else  
         go to "audio3"   
        end if

      end

       

      ----and on a consecutive frame

       

      global gNetID
      on exitFrame
        if netError(gNetID) <> "OK" then
          alert "PROBLEM"
        else
          go to "start"
        end if
      end

       

      The problem is with gotoNetMovie it is hanging at "connecting"  and | cannot download the movie. If I change gotoNetMovie to preloadNetThing the file downloads but I do not know how to play it. I called

       

      play movie("ea300.dcr")  and get an error saying I have to stop the current movie to play a new one

       

      gotoNetMovie("http://www.myclient.com/client_proposals/ClientAnim/Data/ea300.dcr")  --- nothing changes

       

      gotoNetMovie("ea300.dcr") -- again nothing

       

       

      Has anyone had similiar problems and resolved them. I am confused as to why the preloadnetthing() can find the file and download it and gotonetmovie() cannot. If I can download the movie with preloadnetthing() then how can I force it to play from cache.

       

      Any ideas will sincerely welcome.

       

       

      Bob

        • 1. Re: Problem with gotonetmovie connecting?
          Sean_Wilson Adobe Community Professional
          If I can download the movie with preloadnetthing() then how can I force it to play from cache.

           

          This is exactly the approach you should take. Use preloadNetThing() to download your target movie into the browser's/Shockwave's cache then use gotoNetMovie() when it's available. If you provide the same URL for the gotoNetMovie as you used to preloadNetThing then Shockwave is smart enough to use the cached version.