Chinaunix首页 | 论坛 | 博客
  • 博客访问: 14481253
  • 博文数量: 5645
  • 博客积分: 9880
  • 博客等级: 中将
  • 技术积分: 68081
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-28 13:35
文章分类

全部博文(5645)

文章存档

2008年(5645)

我的朋友

分类:

2008-04-28 20:46:34

下载本文示例代码
p>  Delphi是一种具有强大功能的编程语言,用它可以轻松创建任何一种数据库应用程序。将3DS动画文件。FLC分解后,按先后顺序存于Delphi提供的Graphics数据类型中,通过读取Graphics类型的图形数据,在窗口中实现动画效果。 1.将3DS分解的图片存于数据库中   (1)进入3DS的KeyFrame模块,在Output选项中选择.BMP类型的文件。将图形文件全部存于同一目录中(例如目录c:\pic,文件可为f0001.bmp,...,f0045.bmp)。   (2)利用Delphi的数据工具DeskTop建立一个图形数据库Pic.db,其中包括图形文件名filename和图片picture两个字段。   (3)创建Name为FrmPic的窗体Form1,从DataAccess页中选择Table组件,并将其放入窗体Form1中,其属性为:   Name table1 DataBase MYWORK   TableName Pic.db   从DataAccess页中选择DataSource组件,放入Form1窗体中,设置属性为:   Name DataSource1   DataSet table1   从DataControl页中选择DBImage选件,放入Form1窗体中,设置属性为:   Name image1   DataSource DataSource1   DataField Picture   Stretch True   (4)为FrmPic窗体的FormCreate事件填写如下代码:   procedureTform1.FormCreate(Sender:Tobject);   begin   table1.open;   with table1 do   begin    while not eof do    begin   image1.picture.loadfromfile(fieldbyname(filename).asstring);   edit;   fieldbynmae(picture).assign(image1.picture.graphics);   next;   end;   end;   end; 2.使用Timer组件实现动画演播   从System页中选择Timer组件放置到窗体Frmpic中,设置属性如下:   Name trmSpeed   Enabled False   Interval 250   Timer组件的OnTimer事件定期自动发生。例如设置tmrSpeed组件的Interval属性为250,那么,tmrSpeedTimer过程,每隔250毫秒都将会自动执行。为tmrSpeedTimer过程的OnTimer事件填加的代码为:  procedureTform1.Timer1Timer(Sender:Tobject);   begin   table1.next;   if table1.eof then table1.first;   end; p>  Delphi是一种具有强大功能的编程语言,用它可以轻松创建任何一种数据库应用程序。将3DS动画文件。FLC分解后,按先后顺序存于Delphi提供的Graphics数据类型中,通过读取Graphics类型的图形数据,在窗口中实现动画效果。 1.将3DS分解的图片存于数据库中   (1)进入3DS的KeyFrame模块,在Output选项中选择.BMP类型的文件。将图形文件全部存于同一目录中(例如目录c:\pic,文件可为f0001.bmp,...,f0045.bmp)。   (2)利用Delphi的数据工具DeskTop建立一个图形数据库Pic.db,其中包括图形文件名filename和图片picture两个字段。   (3)创建Name为FrmPic的窗体Form1,从DataAccess页中选择Table组件,并将其放入窗体Form1中,其属性为:   Name table1 DataBase MYWORK   TableName Pic.db   从DataAccess页中选择DataSource组件,放入Form1窗体中,设置属性为:   Name DataSource1   DataSet table1   从DataControl页中选择DBImage选件,放入Form1窗体中,设置属性为:   Name image1   DataSource DataSource1   DataField Picture   Stretch True   (4)为FrmPic窗体的FormCreate事件填写如下代码:   procedureTform1.FormCreate(Sender:Tobject);   begin   table1.open;   with table1 do   begin    while not eof do    begin   image1.picture.loadfromfile(fieldbyname(filename).asstring);   edit;   fieldbynmae(picture).assign(image1.picture.graphics);   next;   end;   end;   end; 2.使用Timer组件实现动画演播   从System页中选择Timer组件放置到窗体Frmpic中,设置属性如下:   Name trmSpeed   Enabled False   Interval 250   Timer组件的OnTimer事件定期自动发生。例如设置tmrSpeed组件的Interval属性为250,那么,tmrSpeedTimer过程,每隔250毫秒都将会自动执行。为tmrSpeedTimer过程的OnTimer事件填加的代码为:  procedureTform1.Timer1Timer(Sender:Tobject);   begin   table1.next;   if table1.eof then table1.first;   end; 下载本文示例代码


Delphi编程实现3DS动画的播放Delphi编程实现3DS动画的播放Delphi编程实现3DS动画的播放Delphi编程实现3DS动画的播放Delphi编程实现3DS动画的播放Delphi编程实现3DS动画的播放Delphi编程实现3DS动画的播放Delphi编程实现3DS动画的播放Delphi编程实现3DS动画的播放Delphi编程实现3DS动画的播放Delphi编程实现3DS动画的播放Delphi编程实现3DS动画的播放Delphi编程实现3DS动画的播放Delphi编程实现3DS动画的播放Delphi编程实现3DS动画的播放
阅读(115) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~