1

I have a flash preloader in the same folder as the swf file it's supposed to load, located on the webhost server. Within Flash, the preloader loads the swf without problem, but online it can't find the file/it won't load (404 seen under developer tools -> network), but the file is patently there, in the same folder, and the file name is correct (copy/pasted). The preloader loads, only the requested file doesn't.

using (relevant snippet, there are no errors with the rest of the code):

var myloader:Loader =  new Loader();

myloader.load(new URLRequest("movie.swf"));

I've set 'Access network only' under Publish Settings (didn't work with or without).

Anyone being able to tell what other thing could cause a 404 error other than file not existing at said location?

As an aside, the preloader text (bytes loaded) doesn't show either, (no 'movie not loaded' under right click), is it because it can't find the file?

Also, 'type' for the swf under developer tools reads 'text/html' while the other swfs on the page read 'application/x-shockwave-flash', in case relevant.

Very, very weird. When opening the preloader from file manager, the swf is loaded, wtf.

slackexchange
  • 55
  • 1
  • 9
  • sure I can tell, the swf is in a html page located somewhere else and since that's where the swf is trying to load from, it can't find the file to load. – BotMaster Apr 29 '16 at 14:52
  • well, i also tried /folder1/folder2/movie.swf, to reference it relative to the html page, but still seem to get 404. where the html page is in root, and the swf file is in root/folder1/folder2/. Either way, developer tools says the referrer is the preloader swf, not the html page. – slackexchange Apr 29 '16 at 15:26
  • In `developer tools -> network` you can check the path to the file browser tries to download. Just check if it is correct. I bet it is not. So you could update your code accordingly. – strah Apr 29 '16 at 16:14
  • a crash course in html and server side would teach you that the swf you display in your html is not the one located in your server but a copy generated and sent along your html and that is why it can only load anything relative to that location. – BotMaster Apr 29 '16 at 16:20
  • didn't i just explain that i tried a url relative to the html page, as well, with no difference. what's that 'mysterious' location you're speaking of? gonna heed strah in the meantime, thx. – slackexchange Apr 29 '16 at 16:28
  • And to strah, developer tools -> network reads 'www.domain.com/movie.swf', which is actually wrong (it's in a subfolder of root) and tried using just '/movie.swf' but still 404. And notably, other swf file in the same folder are referenced as the full paths in developer tools, just not the one i'm trying to load. – slackexchange Apr 29 '16 at 16:32
  • Ah, fixed it, using the full (long) path. But someone the preloader's text ain't showing, perhaps that's for another question. – slackexchange Apr 29 '16 at 16:41

0 Answers0