Softanics wrote:So you load tada.flv, i.e. using a relative path, not full. Am I right?
That's the tricky part. tada.flv is loaded "from" tada.swf. Only tada.flv is passed to f-in-box, and tada.swf is loaded through Flash calls. Internally within Flash, tada.flv is set within the CS3 project through Import Video -> Choose FLV. The wrapper also uses a skin, SkinOverPlaySeekMute.swf (although the same results also happen without the skin).
There are two ways we've tried to load the container tada.swf, each with calling SendMessage. Both ways register a callback function with FPC_AddOnLoadExternalResourceHandler, OnLoadExternal(). We have loaded external .png files from within Flash, and that all works. The issue happens when we try to load that .flv from within Flash.
The basic flow we are looking for is (broken up for readability):
1. The user supplies a filename (tada.swf)
2. The application loads that file into memory, and passes it to f-in-box
3. f-in-box sends the binary data to Flash, which starts the movie playback
4. During playback, the movie tries to load an external file (tada.flv)
5. f-in-box intercepts the attempt to load a file from Flash, and forwards it to the application (this is the unusual step).
6. The application loads this new asset into memory, and passes it back
The two ways we are trying to do this are with the FPCM_PUT_MOVIE and FPCM_PUTMOVIEFROMMEMORY messages. Both of these work when the external file is a .png or a .swf. What happens with the .flv is different:
With FPCM_PUT_MOVIE: In step #5, the registered callback is called for the skin ("SkinOverPlaySeekMute.swf"), but there is no intercept delivered for the external asset ("tada.flv"), and no WM_NOTIFY messages are sent. However, Flash still loads the file directly from disk, and plays back properly.
The only problem with this method is that we need to play from memory. Otherwise everything else is the same.
With FPCM_PUTMOVIEFROMMEMORY: In step #5, two WM_NOTIFY messages are sent, but the callback is not called at all. The first is FPCN_LOADEXTERNALRESOURCE, which is handled, but then FPCN_LOADEXTERNALRESOURCEEX is sent. That message is ignored. In both cases, only the skin is intercepted ("SkinOverPlaySeekMute.swf"), but the skin does not even play. This time, though, the external asset ("tada.flv") does not load at all, from disk or otherwise, and does not play back at all.
This second method has worked every time up until now. The only change we have made is that the content .swf files are now being created with Flash 9 (CS3), rather than Flash 8.
Any suggestions would be very gratefully welcomed.