Trouble playing a swf with FPC_LoadMovie

DLL Edition of the F-IN-BOX
JoeLudwig
Posts: 3
Joined: Thu Apr 02, 2009 1:49 am

Trouble playing a swf with FPC_LoadMovie

Postby JoeLudwig » Thu Apr 02, 2009 5:01 pm

I am attempting to get the demo version of the DLL to work in my own simple Win32 app with a simple .swf. Instead of the swf I get a blank white rectangle in my window. TestApp.swf below is a label and a button from a simple FlexBuilder app.

This is the code in InitInstance:

Code: Select all

   g_flashPlayer = FPC_LoadRegisteredOCX();

   hInst = hInstance; // Store instance handle in our global variable

   hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
      CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);

    g_flashPlayerControl =
      CreateWindow((LPCTSTR)FPC_GetClassAtom(g_flashPlayer),
                NULL,
                WS_CHILD | WS_VISIBLE | FPCS_TRANSPARENT | FPCS_NEED_ALL_KEYS,  // use FPCS_NEED_ALL_KEYS if you movie should handle all keyboard input (ENTER, TAB etc.)
                0, 0,
                640,480,
                hWnd,
                NULL,
                NULL,
                NULL);

   // Load the castle keep movie
   HRESULT result = FPC_LoadMovie(g_flashPlayerControl, 0, L"testapp.swf");


I suspect my problem is in loading the swf itself, but FPC_LoadMovie isn't in the help, so I can't check what arguments it expects. Is a relative path acceptable as a URL, or does it have to be a full path with "file://" to load from the filesystem?


Joe

JoeLudwig
Posts: 3
Joined: Thu Apr 02, 2009 1:49 am

Postby JoeLudwig » Thu Apr 02, 2009 6:01 pm

While I'm asking about FPC_LoadMovie()... How do I tell if a call to this function is successful? It returns success (and looks the same) regardless of what I pass in for the URL parameter.

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

Re: Trouble playing a swf with FPC_LoadMovie

Postby Softanics » Fri Apr 03, 2009 1:41 am

JoeLudwig wrote:I suspect my problem is in loading the swf itself, but FPC_LoadMovie isn't in the help, so I can't check what arguments it expects. Is a relative path acceptable as a URL, or does it have to be a full path with "file://" to load from the filesystem?


You should pass the full path, for example, "C:\\1.swf".

Please check it.

Thank you.
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html

JoeLudwig
Posts: 3
Joined: Thu Apr 02, 2009 1:49 am

Postby JoeLudwig » Tue Apr 07, 2009 12:41 am

That worked. Thanks!


Joe


Return to “DLL Edition”

Who is online

Users browsing this forum: No registered users and 8 guests

cron