为什么出错?(FLASH控件)(100分)

J

jomee

Unregistered / Unconfirmed
GUEST, unregistred user!
为什么出错?(FLASH控件)

得到打开的flash图像的总帧数:
procedure TForm1.FormCreate(Sender: TObject);
begin
label1.caption:=shockwaveflash.totalframes;
end;

控制该打开的flash图像从那一帧开始播放:
if ShockwaveFlash1.playing then
ShockwaveFlash1.GotoFrame(SpinEdit1.Value);
ShockwaveFlash1.Play;

出错信息:
[Error] Unit1.pas(80): Object or class type required
[Fatal Error] Project1.dpr(5): Could not compile used unit '../../../../WINDOWS/Desktop/Unit1.pas'
 
是shockwaveflash还是shockwaveflash1啊? 前后不一致?
 
我这个例子没问题呀
procedure TForm1.Button1Click(Sender: TObject);
begin
ShockwaveFlash1.Movie:=('e:/test/khfw.swf');
ShockwaveFlash1.Play;
edit1.text:=inttostr(shockwaveflash1.totalframes);
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
ShockwaveFlash1.GotoFrame(5);
ShockwaveFlash1.play;
end;
label1.caption:=shockwaveflash.totalframes;//是不是你这句类型不匹配
 
procedure TForm1.FormCreate(Sender: TObject);
begin
shockwaveflash.Move('你的Flash文件.swf');
//先载入Flash文件
label1.caption:=inttostr(shockwaveflash.totalframes);
//把Integer转换为String
end;
 
TotalFrames:总帧数,只有当ReadyState = 4时才能访问该属性;
 
楼上的说得对 我也遇到过
 
shockwaveflash.Move('你的Flash文件.swf');
//先载入Flash文件
label1.caption:=inttostr(shockwaveflash.totalframes);
//把Integer转换为String
 
shockwaveflash是flash控件?
是吗? 能不能说说哪里有?
我想看看这个东东!
jrqjrq@sina.com 3Q
 
procedure TForm1.FormCreate(Sender: TObject);
begin
ShockwaveFlash1.Movie:=(你的Flash文件.swf');//路径和文件名存在
ShockwaveFlash1.Play;
label1.caption:=inttostr(ShockwaveFlash1.totalframes);
end;

procedure TForm1.SpinEdit1Change(Sender: TObject);
begin
if ShockwaveFlash1.playing then
ShockwaveFlash1.GotoFrame(SpinEdit1.Value);
ShockwaveFlash1.Play;
end;

 
多人接受答案了。
 

Similar threads

I
回复
0
查看
595
import
I
I
回复
0
查看
840
import
I
I
回复
0
查看
602
import
I
I
回复
0
查看
766
import
I
I
回复
0
查看
749
import
I
顶部