Problem with background color

DLL Edition of the F-IN-BOX
FrereDavid
Posts: 7
Joined: Thu Jun 01, 2006 2:35 pm

Problem with background color

Postby FrereDavid » Thu Jun 01, 2006 2:39 pm

Hi,

I'm currently trying the windows dll and it works really fine, I play a flash and gets its data with the FPCListener callback, but I have a problem to read a certain type of swf files.
I created for a test a swf with only a background color (black or white) and in the middle some text (like "512*512") in another color. It appears that the the dll doesn't like the background color because I always get in the resulting data a black background (even if it originally was black, white or red) with the text of the good color.

Do you know where it could come from ?

Thanks

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

Re: Problem with background color

Postby Softanics » Thu Jun 01, 2006 2:45 pm

Thank you for your question.

FrereDavid wrote:I created for a test a swf with only a background color (black or white) and in the middle some text (like "512*512") in another color. It appears that the the dll doesn't like the background color because I always get in the resulting data a black background (even if it originally was black, white or red) with the text of the good color.


If you load this movie into Internet Explorer, do you see the correct bgcolor?

What do you mean saying "the resulting data"?
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html

FrereDavid
Posts: 7
Joined: Thu Jun 01, 2006 2:35 pm

Postby FrereDavid » Thu Jun 01, 2006 3:03 pm

yes, I see the right color in Internet Explorer or Firefox. I mean by resulting data that I get the pixels by the FPCListener callback and apply them with my 3d engine on a texture (like in your directx sample). But my texture has always a black background (to me, it's like black is the default color if the background color is not "understood") with the right text and "demo version" in the middle.

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

Postby Softanics » Thu Jun 01, 2006 3:16 pm

It's seems you are handling FPCN_PAINT notification. Am I right? If yes, FPC is created with FPCS_TRANSPARENT style and movie running in the transparent mode. If you create the html likes this:

Code: Select all

<HTML>
<BODY>
<center>
<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" WIDTH="800" HEIGHT="620" CODEBASE="http://active.macromedia.com/flash5/cabs/swflash.cab#version=5,0,0,0">
<PARAM NAME=movie VALUE="demo_video.swf">
<PARAM NAME=play VALUE=true>
<PARAM NAME=loop VALUE=false>
<PARAM NAME=quality VALUE=low>
<PARAM NAME=wmode VALUE=Transparent>
<EMBED SRC="your_movie_here.swf" WIDTH=800 HEIGHT=620 quality=low loop=false TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</EMBED>
</OBJECT>
</center>
</BODY>
</HTML>


do you see the red (or another that you set) background?

If your movie isn't big, could you send me it to support (at) f-in-box.com ?
Best regards, Artem A. Razin,

F-IN-BOX support

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

FrereDavid
Posts: 7
Joined: Thu Jun 01, 2006 2:35 pm

Postby FrereDavid » Fri Jun 02, 2006 8:15 am

Hi

It seems you're right and that it comes from the transparent mode. I will modify my swf files so that I won't have the problem.
But it may occur again if clients send me swf with the background color done as in mine, is there a way to deal with that inside the code ?

I tried to remove the FPCS_TRANSPARENT parameter in the call to createwindow but the flash doesn't work anymore.

(I'm asking you because I was thinking of buying your dll ;))

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

Postby Softanics » Fri Jun 02, 2006 9:22 am

FrereDavid wrote:It seems you're right and that it comes from the transparent mode. I will modify my swf files so that I won't have the problem.
But it may occur again if clients send me swf with the background color done as in mine, is there a way to deal with that inside the code ?


If you see in the Internet Explorer that the background is really transparent, you will receive the same information in the handler of FPCN_PAINT. If you don't need alpha channel - you can modify pixels in the handler. For each pixel:

Code: Select all

lpPixels[i] = ( lpPixels[i] & 0x00ffffff ) | 0xff000000;


FrereDavid wrote:I tried to remove the FPCS_TRANSPARENT parameter in the call to createwindow but the flash doesn't work anymore.


Yes, FPCN_PAINT doesn't work if the style FPCS_TRANSPARENT is disabled.
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 25 guests

cron