views:

706

answers:

1

Hi,

I am working on an independent application to play flash files on Mac. I have already done the same for Linux, and it works flawlessly but on mac for some reason flash is not drawing to my window. It is not throwing any kind of error too. I am using Flash player 10, that would mean that I am using the Core Graphics drawing model. I am able to send mouse events to flash and wrote a sample plugin to check if there was a problem in the context that I was sending, but my sample plugin draws properly to the window.

I am getting a call for NPN_InvalidateRect twice and as a response I send an update Event back to flash. I drew a dummy rectangle to check that my context is correct. I have flipped the context to make the origin as top left corner.

On doing right click on the debug version of the flash player it shows the following message: "Movie not loaded..."

Can anyone give me any idea why is the content not being drawn? I would really appreciate the help, as I have been struggling with it for more than a month now.

Here is a small log of the interaction that I have with flash:

NPN_UserAgent Called

NPN_GetValue Called with variable NPNVWindowNPObject; return NULL

NPN_GetValue Called with variable NPNVWindowNPObject; return NULL

NPN_GetValue Called with variable NPNVSupportsWindowless; return true

NPN_SetValue Called for Variable - NPPVpluginTransparentBool; return true

NPN_GetValue Called with variable NPNVsupportsCoreGraphicsBool; return true

NPN_SetValue Called for Variable - NPNVpluginDrawingModel

NPP_SetWindow (CoreGraphics): 0, window=0xebaa90, context=0xe4c930, window.x:0 window.y:22 window.width:480 window.height:270

NPP_HandleEvent(activateEvent) accepted:0 isActive: 1

NPP_HandleEvent(updateEvt) accepted: 1

NPN_UserAgent Called

NPN_GetURLNotify Called with URL - javascript:top.location+"flashplugin_unique"

NPN_GetValue Called with variable NPNVWindowNPObject; return NULL

NPP_NewStream URL=/Users/mjain/Desktop/clock.swf MIME=application/x-shockwave-flash error=0

NPP_WriteReady responseURL=/Users/mjain/Desktop/clock.swf bytes=268435455

NPN_InvalidateRect Called

NPP_Write responseURL=/Users/mjain/Desktop/clock.swf bytes=9925 total-delivered=9925/9925

NPP_WriteReady responseURL=/Users/mjain/Desktop/clock.swf bytes=268435455

NPP_DestroyStream responseURL=/Users/mjain/Desktop/clock.swf error=0

NPP_HandleEvent(updateEvt) accepted: 1

NPN_InvalidateRect Called

NPP_HandleEvent(updateEvt) accepted: 1

NPP_NewStream URL=javascript:top.location+"flashplugin_unique" MIME=text/plain error=0

NPP_WriteReady responseURL=javascript:top.location+"flashplugin_unique" bytes=16000

NPN_UserAgent Called

NPP_Write responseURL=javascript:top.location+"flashplugin_unique" bytes=52 total-delivered=52/52

NPP_WriteReady responseURL=javascript:top.location+"flashplugin_unique" bytes=16000

NPP_DestroyStream responseURL=javascript:top.location+"flashplugin_unique" error=0

NPP_URLNotify responseURL=javascript:top.location+"flashplugin_unique" reason=0

Thanks Mugdha.

A: 

I have been struggling with precisely this issue for some time now and would be really interested in hearing if you did find any way to resolve this problem.

The application I'm working on can host all flash player plugins that we have tried except Flash Player 10 on OS/X. There's no obvious reason for this behavior that I can see. It may have something to do with the new support for "core graphics" introduced in verson 10 for OS/X. Our application only supports the default QuickDraw drawing model but that should be ok since Flash Player 10 can run hosted by Firefox 2.0/Gecko 1.8 which is also using QuickDraw.

Any help would be appreciated!

Per Ersson