I've found that you can't use dynamic paths, as you normally would with Flash. You have to feed it the full file path. Here's what I use:

----------------------
on mSetCommunicatorPath me
  rootPath = the moviePath

  if (the platform contains "win") then
    repeat while offset("\", rootPath) > 0
      put "/" into rootPath.char[offset("\", rootPath)]
    end repeat
  else
    repeat while offset(":", rootPath) > 0
      put "/" into rootPath.char[offset(":", rootPath)]
    end repeat
    rootPath = "file:///" & rootPath
  end if

  pFlashConnector.communicator.mSetRootFilePath(rootPath)
end
----------------------

mSetRootFilePath(rootPath) is just a method in the Flash sprite which stores the root path. You can then tack your relative paths to that, and Flash should be able to find your media.

hth,
kurt


I'm having problems with a swf sprite that links to external files.
Dir MX w/ Flash 8 - Tested on mac and windows

The swf file reads an external xml file an dynamically loads png
files and other swf files.

On windows the xml reads fine; as do the linked swf files .... the
png's do not.
On mac - neither the swf's nor png's show.

Has anyone else worked with swf spirits with links to external media?

Thanks for any clues.

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[email protected]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to