Skip to main content
GameDev.net gamedev.net
🔒 Locked

Reading Macromedia Flash Data (solved)

Started by Agony Sep 13, 2004 at 10:31 AM 0 replies 2.1k views
Original Post
Agony
Agony
I need to get access to the pixel data of a Flash animation. (Specifically, I need to copy it to a DirectX surface, but that's irrelevant to the real problem.) I've played around and have finally gotten the flash.ocx control to work in my program. I can create a new CAxWindow object to contain the control (although I honestly don't really know much about the ATL), and can play flash animations in that window just fine. However, currently my only idea of copying the pixel data is to use the HDC of the window. However, that only works when the window is visible and on top. Does anyone have an idea of how to get the pixel data without having a visible window of the flash animation showing? [Edited by - Agony on September 15, 2004 7:19:12 AM]
"We should have a great fewer disputes in the world if words were taken for what they are, the signs of our ideas nly, and not for things themselves." - John Locke o
Agony
Agony
Just so any curious knows, I managed to do what I wanted by calling SendMessage() on the window, using WM_PAINT as the message, and passing the handle of the device context to paint to as the wParam. In the MSDN docs, it says that this wParam value is optional, and can be ignored, but fortunately, it appears that the Flash control doesn't ignore it, so I can make it paint to any HDC I want, even if the window is not visible.

(To get the window handle to the actual Flash control, and not just the container window, I had to use the EnumChildWindows() function.)
"We should have a great fewer disputes in the world if words were taken for what they are, the signs of our ideas nly, and not for things themselves." - John Locke o

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.