Page 1 of 1

How can i know if the .res have the file "xxx"

Posted: Wed Apr 04, 2007 6:19 pm
by yallepaixao
Hello,

How can know if exist one file "teste.swf" in the .res ?

Thanks

Posted: Thu Apr 05, 2007 9:16 am
by Softanics
Thank you.

Unfortunaly, I don't understand your question... Do you mean that you would like to know, is present a some resource into module or not?

Posted: Thu Apr 05, 2007 1:30 pm
by yallepaixao
Hello,

Yes, i want to know if some resource is is present into my module. Like if the user click in a link that the "URL" or SWF Resource is not present i want to send a msg of error and not just show a black image.

Thank you.

Yalle 8)

Posted: Thu Apr 05, 2007 2:58 pm
by Softanics
yallepaixao wrote:Hello,

Yes, i want to know if some resource is is present into my module. Like if the user click in a link that the "URL" or SWF Resource is not present i want to send a msg of error and not just show a black image.

Thank you.

Yalle 8)


Just try to create TResourceStream ;)

Posted: Fri Apr 06, 2007 2:14 am
by yallepaixao
Hello,

Sorry i didnÒ‘t undersdant.
Can you send a example please?

Thanks

Posted: Fri Apr 06, 2007 6:06 am
by Softanics
yallepaixao wrote:Hello,

Sorry i didnÒ‘t undersdant.
Can you send a example please?

Thanks


Something like that:

Code: Select all

var
   ResourceStream: TResourceStream;
begin
   ResourceStream := TResourceStream.Create(0, 'FLVPlayer', 'SWF');


If the resource doesn't exist, ResourceStream will be null and you'll get an exception (as soon as I know -- please check it).