我想在form2就把flash影片加载进去,就是form2一运行就播放加载的flash,但是总是加载不上不知道是那里错了,请高手帮忙
我想在form2就把flash影片加载进去,就是form2一运行就播放加载的flash,但是总是加载不上不知道是那里错了,请高手帮忙
//---------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit2.h "
#include "Unit1.h "
//---------------------------------------
#pragma package(smart_init)
#pragma link "ShockwaveFlashObjects_OCX "
#pragma resource "*.dfm "
TForm2 *Form2;
//---------------------------------------
__fastcall TForm2::TForm2(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------
void __fastcall TForm2::FormCreate(TObject *Sender)
{
ShockwaveFlash1-> Update ();
ShockwaveFlash1-> Movie= "d:\12.swf ";
//ShockwaveFlash1-> LoadMovie(1, 'D:\12.swf ');
ShockwaveFlash1-> Play();
}
//---------------------------------------
void __fastcall TForm2::FormKeyDown(TObject *Sender, WORD &Key,
TShiftState Shift)
{
Close();
}
//---------------------------------------
void __fastcall TForm2::FormMouseDown(TObject *Sender, TMouseButton Button,
TShiftState Shift, int X, int Y)
{
Close();
}
//---------------------------------------
void __fastcall TForm2::FormMouseMove(TObject *Sender, TShiftState Shift,
int X, int Y)
{
Close();
}
//---------------------------------------
void __fastcall TForm2::ShockwaveFlash1Enter(TObject *Sender)
{
SetFocus();
}
//---------------------------------------
[解决办法]
文件路径有没有问题?
如果没问题,就重新装载ACTIVEX
[解决办法]
对woshixyj说的对