Page 1 of 1

Sample - Loading FLV & Loading Other External Files

Posted: Thu Jan 17, 2008 6:20 pm
by zenkick
We have no problems intercepting a SWF's call for an external FLV when the SWF uses "http://flv/foo.flv".

We have no problems incercepting a SWF's call for any other external files, such as "foo.jpg", or another "bar.swf" file. In addition, we have no problem with nested calls-- bar.swf can as for "baz.swf", and we can still intercept and hand the stream back.

The issue we are seeing is that we can not combine the two above scenarios-- only one or the other works.

Is there a sample that shows the following functioning?

1.) A.swf starts
2.) A.swf loads B.swf
3.) B.swf loads image.jpg
4.) A.swf loads movie.flv via http://flv/movie.flv
5.) A.swf loads sound.mp3

Thank you.

Re: Sample - Loading FLV & Loading Other External Files

Posted: Thu Jan 17, 2008 6:32 pm
by Softanics
Thank you for your question.

Do you use DLL Edition, right?

zenkick wrote:We have no problems intercepting a SWF's call for an external FLV when the SWF uses "http://flv/foo.flv".

We have no problems incercepting a SWF's call for any other external files, such as "foo.jpg", or another "bar.swf" file. In addition, we have no problem with nested calls-- bar.swf can as for "baz.swf", and we can still intercept and hand the stream back.

The issue we are seeing is that we can not combine the two above scenarios-- only one or the other works.

Is there a sample that shows the following functioning?

1.) A.swf starts
2.) A.swf loads B.swf
3.) B.swf loads image.jpg
4.) A.swf loads movie.flv via http://flv/movie.flv
5.) A.swf loads sound.mp3


You can intercept calls from A.swf, so 1), 2), 4) and 5) work good? The problem only with 3) ?

Re: Sample - Loading FLV & Loading Other External Files

Posted: Thu Jan 17, 2008 6:38 pm
by zenkick
Softanics wrote:Do you use DLL Edition, right?


Yes

zenkick wrote:We have no problems intercepting a SWF's call for an external FLV when the SWF uses "http://flv/foo.flv".

We have no problems incercepting a SWF's call for any other external files, such as "foo.jpg", or another "bar.swf" file. In addition, we have no problem with nested calls-- bar.swf can as for "baz.swf", and we can still intercept and hand the stream back.

The issue we are seeing is that we can not combine the two above scenarios-- only one or the other works.

Is there a sample that shows the following functioning?

1.) A.swf starts
2.) A.swf loads B.swf
3.) B.swf loads image.jpg
4.) A.swf loads movie.flv via http://flv/movie.flv
5.) A.swf loads sound.mp3


Softanics wrote:You can intercept calls from A.swf, so 1), 2), 4) and 5) work good? The problem only with 3) ?


In the scenario above, we can not perform #4.

I'm having one of my Flash developers prepare the above flash scenario that will run from the file system, and would love to send the zip to see if we've found a bug of some sort.

Posted: Thu Jan 17, 2008 6:44 pm
by Softanics
Just a quick test. Add a global handler:

Code: Select all

FPC_AddOnLoadExternalResourceHandler(hFPC, &GlobalOnLoadExternalResourceHandler, 0);


Inside it, trace what URLs are come:

Code: Select all

static HRESULT WINAPI StaticGlobalOnLoadExternalResourceHandler(LPCTSTR lpszURL, IStream** ppStream, HFPC hFPC, LPARAM lParam)
{
    TRACE(_T("URL: '%s'\n"), lpszURL);
}



Load the A.swf:

Code: Select all

FPC_LoadMovie(hwndFlash, 0, _T("http://PRIVATE_PATH/A.swf"));


Launch the application, you should see the following output (or like that):

Code: Select all

URL: 'http://PRIVATE_PATH/A.swf'


Modify the code of StaticGlobalOnLoadExternalResourceHandler and provide content of the A.swf, launch again. You will see:

Code: Select all

URL: 'http://PRIVATE_PATH/B.swf'
URL: 'http://PRIVATE_PATH/image.jpg'
URL: 'http://flv/movie.flv'
URL: 'http://PRIVATE_PATH/sound.mp3'


Could you please try this idea?

Re: Sample - Loading FLV & Loading Other External Files

Posted: Thu Jan 17, 2008 6:45 pm
by Softanics
zenkick wrote:I'm having one of my Flash developers prepare the above flash scenario that will run from the file system, and would love to send the zip to see if we've found a bug of some sort.


Good idea, my email is support (at) f-in-box.com

Thank you!