DOWNLOADING ASSETS

You can set the “filename” property of a castmember to a URL at runtime in a Shockwave movie. The cast member is then downloaded from the specified URL.

How ever there is a bug in the Shockwave player which cause the player to crash if the content is not downloaded using the downloadNetThing() first. Shockwave does not crash the first time the movie is downloaded, but every time after that.

This code will cause Shockwave to crash:

on beginSprite me
  member("x").filename = "http://site.com/image.jpg"
end

Use this code to avoid the crash:

property pNetID

on beginSprite me
  pNetID = downloadNetThing("http://site.com/image.jpg")
end

on enterFrame me
  if not voidP(pNetID) then
    if netDone(pNetID) then
      pNetID = VOID
      member("x").filename = "http://site.com/image.jpg" 
    end if
  end if
end