Page 1 of 1

Loading external content with relative file names

Posted: Tue Jan 23, 2007 11:52 am
by seesharp
Hi

I just encountered another issue. If I load external content using the OnLoadExternalResource... it works fine as long as I use fully qualified pathnames like "D:\\...." or "http://.....";

As Flash itself can handle relative paths in loadMovie() calls as well, I'd like to ask if my code might be wrong or if f_in_box__control.OnLoadExt.... cannot handle relative paths.

Best regards

Alex

Posted: Tue Jan 23, 2007 12:01 pm
by Softanics
Thank you for your questions.

f_in_box__control.OnLoadExternalResourceByRelativePath handles resources that flash loads using relative path.
AxCode.OnLoadExternalResourceByFullPath handles resources that flash loads using full path.
So... something doesn't work as expected?

Posted: Tue Jan 23, 2007 12:26 pm
by seesharp
Yes

my brain doesn't work as expected :-)
I simply didn't think about these method names, sorry.

Problem (on your side) solved.


Alex

Posted: Tue Jan 23, 2007 1:44 pm
by seesharp
I am sure I am missing something,

If I use the video components / or video display in Flash and pass a URL like http://resource/.... I can handle the call correctly in my code. But, if I pass a URL like D:\myFile.flv or the concerning relative path, the call doesn't seem to be caught by the OnLoadExternalResource Handler.

It works fine for loading other content using a flash loader or loadMovie.

Could you give me some hint on that issue ?
I would like to catch such calls as well to load FLV files from encrypted local assets.

Alex

Posted: Tue Jan 23, 2007 2:13 pm
by Softanics
Loading flv from a local file differs from loading from URL. Loading flv from a local file is not interceped by f-in-box. I hope it's not a big problem.

Posted: Tue Jan 23, 2007 2:32 pm
by seesharp
Hi,

in that case, I try to work around with a dummy URL, something like http://D....



Alex

Posted: Tue Jan 23, 2007 2:48 pm
by seesharp
Yep,

seems to work if I just use http://file/..... as URL and then load the local content.


Thanks and have a nice evening

Alex

Posted: Tue Jan 23, 2007 4:02 pm
by seesharp
Hi again

now just one last issue I couldn't resolve:

Code: Select all

PlayButton.onRelease = function(){
   my_FLVPlybk.load("poc2.flv");
   my_FLVPlybk.play();   
}


This code works when played in Flash player. In f_in_box__control (at least in my implementation) I have to use the absolute path. I am sure you know the way to resolve that issue as well.

Thanks very much

Alex[/code]

Posted: Tue Jan 23, 2007 5:08 pm
by Softanics
seesharp wrote:now just one last issue I couldn't resolve:

Code: Select all

PlayButton.onRelease = function(){
   my_FLVPlybk.load("poc2.flv");
   my_FLVPlybk.play();   
}


This code works when played in Flash player. In f_in_box__control (at least in my implementation) I have to use the absolute path. I am sure you know the way to resolve that issue as well.


f-in-box isn't able to intercept FLV that is loaded by relative path. You should use full path for FLV.

Posted: Tue Jan 23, 2007 7:29 pm
by seesharp
Hi thanks for your reply,

I understood that clearly, as f_in_box isn't able to intercept loading .flv from local filesystem at all.
But the problem is, if I try to load an .flv using relative path (without any interception by f_in_box) the code works in FlashPlayer itself but doesn't seem to work in f_in_box__control. As if Flash cannot find the relative location if played within f_in_box__control.


Alex

Posted: Tue Jan 23, 2007 8:24 pm
by Softanics
seesharp wrote:But the problem is, if I try to load an .flv using relative path (without any interception by f_in_box) the code works in FlashPlayer itself but doesn't seem to work in f_in_box__control. As if Flash cannot find the relative location if played within f_in_box__control.


So the problem is: you load a movie into f_in_box__control from a stream, the movie loads flv by path like "poc2.flv" but without success. Am I right?
Please try to set FlashProperty_Base to the directory where "poc2.flv" is located before loading the movie.
If it doesn't solve the problem please send me you movie (without flv) for testing.

Thank you!