FlashComponent , but does not display. help me


#1

Flash component loads the movie, but does not display.
The audio if you listen.

MY CODE.

FlashComponent.h

#ifndef __JUCE_FLASHCOMPONENT__
#define __JUCE_FLASHCOMPONENT__
//[Headers]     -- You can add your own extra header files here --
#include "../JuceLibraryCode/JuceHeader.h"
//[/Headers]
namespace ShockwaveFlashObjects { struct IShockwaveFlash; }//{D27CDB6C-AE6D-11CF-96B8-444553540000}

class FlashComponent : public ActiveXControlComponent
{
public:
	FlashComponent();
	virtual ~FlashComponent();

	void parentHierarchyChanged();
	void visibilityChanged();
	void paint (Graphics& g);
	void mouseDown(const juce::MouseEvent &e);

	void createControlIfNeeded();
	bool isControlCreated();

	void  flashLoad(String filename);
	void flashPlay();
	void flashStop();
	void flashRewind();
	void flashGotoFrame(long frameNum);
	void flashSetLoop(bool shouldLoop);
	long flashPlayerVersion();
private:
	String moviePath;
	ShockwaveFlashObjects::IShockwaveFlash* flashInterface;
};
#endif

FlashComponent.cpp

#if _WIN32

#ifdef _MSC_VER
  #pragma warning (disable: 4514)
#endif

//#include <windows.h>
#import "PROGID:ShockwaveFlash.ShockwaveFlash" named_guids
#include "FlashComponent.h"
//==============================================================================
FlashComponent::FlashComponent()
{
	flashInterface = 0;	
}

FlashComponent::~FlashComponent()
{
	flashInterface->Release();
    deleteControl();
}

//==============================================================================
void FlashComponent::createControlIfNeeded()
{
	bool _isCreated = isControlCreated();
	bool _isShowing = isShowing();
	if(_isShowing && !_isCreated)
	{
		const IID swfIID = __uuidof(ShockwaveFlashObjects::ShockwaveFlash);

		if (createControl( &swfIID )) 
		{
			const IID swf_intIID = __uuidof(ShockwaveFlashObjects::IShockwaveFlash);
            flashInterface = (ShockwaveFlashObjects::IShockwaveFlash*)queryInterface ( &swf_intIID );

			if(flashInterface)
			{
				
				flashInterface->Menu=false;

			}
		}
	}
}
bool FlashComponent::isControlCreated()
{
    return isControlOpen();
}


void FlashComponent::parentHierarchyChanged()
{
    createControlIfNeeded();
	ActiveXControlComponent::parentHierarchyChanged();
}

void FlashComponent::visibilityChanged()
{
    createControlIfNeeded();
    ActiveXControlComponent::visibilityChanged();
}

void FlashComponent::paint (Graphics& g)
{
    if (! isControlCreated())
		g.fillAll (Colours::blue);
}

void FlashComponent::flashLoad(String filename)
{
	moviePath = filename;
	flashInterface->Stop();
	if(isControlCreated())
	{
		//flashInterface->raw_DisableLocalSecurity();
		//flashInterface->raw_LoadMovie(0, file.getFullPathName().toUTF8());
		//flashInterface->PutMovie( file.getFullPathName().toUTF8() );
		//AlertWindow::showMessageBox(AlertWindow::InfoIcon, T("PATH 1"),moviePath);
		//const wchar_t *pth = (const wchar_t *)moviePath;
		//AlertWindow::showMessageBox(AlertWindow::InfoIcon, T("PATH 2"),String(pth));
		flashInterface->LoadMovie(0,L"C:\\Producto.swf");
		//flashInterface->PutPlaying(1);
		//flashInterface->PutMovie(L"C:\\Producto.swf");
		flashInterface->Play();		
	}
}

void FlashComponent::flashPlay()
{
	if(flashInterface)
		flashInterface->Play();
}

void FlashComponent::flashStop()
{
	if(flashInterface)
		flashInterface->Stop();
}

void FlashComponent::flashRewind()
{
	if(flashInterface)
		flashInterface->Rewind();
}

void FlashComponent::flashGotoFrame(long frameNum)
{
	flashInterface->raw_GotoFrame(frameNum);
}

void FlashComponent::flashSetLoop(bool shouldLoop)
{
	flashInterface->PutLoop(shouldLoop);
}

long FlashComponent::flashPlayerVersion(){
	return (flashInterface->FlashVersion() & 0x00FF0000) / 65536;
}
void FlashComponent::mouseDown(const juce::MouseEvent &e)
{
	createControlIfNeeded();

}


#endif

#2

Sorry, I don’t know anything about the flash plugin, you’ll need to debug it yourself, unless someone else has tried this before?