Are your swfs not loading?

If you have one swf embedded in an html page, and that swf loads other swfs, the loader swf will look for the other swfs relative to the location of the hmtl page, *not* relative to the location of the swf itself.

folder_with_loader.swf (and loadme.swf)

loader.swf gets the loadme.swf with
loadMovie( “folder_with_loader.swf/another_folder/loadme.swf” );

This entry was posted in flash, actionscript, flex. Bookmark the permalink.

2 Responses to Are your swfs not loading?

  1. Jean-Luc Thirot says:
  2. Pauline McNamara says:

    Great tip, thanks!

    With the above example, then, no need to dig into the fla and change the path in the loadMovie call.

    Thinking through it out loud…
    If someone is working with all their swfs in one location, but the html page that the loader swf is embedded in is in another location (as above), they can add the BASE attribute as “.” to the object and embed tags in the html. The loader swf will then look for the swfs it is loading in the folder where it is actually located, not where it is embedded. Maybe not perfect, but a decent work-around.

Comments are closed.