Sample - Loading FLV & Loading Other External Files

DLL Edition of the F-IN-BOX
zenkick
Posts: 6
Joined: Tue Sep 11, 2007 11:23 pm

Sample - Loading FLV & Loading Other External Files

Postby zenkick » Thu Jan 17, 2008 6:20 pm

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.

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Re: Sample - Loading FLV & Loading Other External Files

Postby Softanics » Thu Jan 17, 2008 6:32 pm

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) ?
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html

zenkick
Posts: 6
Joined: Tue Sep 11, 2007 11:23 pm

Re: Sample - Loading FLV & Loading Other External Files

Postby zenkick » Thu Jan 17, 2008 6:38 pm

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.

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Thu Jan 17, 2008 6:44 pm

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?
Best regards, Artem A. Razin,

F-IN-BOX support

Ask your question here: http://www.f-in-box.com/support.html

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Re: Sample - Loading FLV & Loading Other External Files

Postby Softanics » Thu Jan 17, 2008 6:45 pm

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!
Best regards, Artem A. Razin,

F-IN-BOX support

Ask your question here: http://www.f-in-box.com/support.html


Return to “DLL Edition”

Who is online

Users browsing this forum: No registered users and 4 guests

cron