flashforward

“打开”按钮代码:

char szFilters[]="MyType Files (*.swf)|*.swf||";

CFileDialog fileDlg (TRUE, "swf", "*.swf",OFN_FILEMUSTEXIST| OFN_HIDEREADONLY,szFilters, this);

if( fileDlg.DoModal ()==IDOK )

{

CString pathName = fileDlg.GetPathName();

flash.put_Movie(pathName);

playflag=TRUE;

if(!timerflag)

{

m_nTimer=SetTimer(1,100,0); //开启计时器

timerflag=!timerflag;

}

}

“播放”按钮代码:

flash.Play();

“暂停”按钮代码:

flash.Stop();

“停止”按钮代码:

flash.Rewind();

flash.Stop();

“重播”按钮代码:

flash.Rewind();

flash.Play();

“后退”按钮代码:

flash.Back();

“前进”按钮代码:

flash.Forward();

“末帧”按钮代码:

flash.GotoFrame(flash.get_TotalFrames()-1);

“快退”按钮代码:

int current=flash.CurrentFrame();

if(current>4)

{

current-=5;

flash.GotoFrame(current);

}

else

{

flash.put_FrameNum(0);

}

“快进”按钮代码:

int current=flash.CurrentFrame();

int i=flash.get_FrameNum();

if(current<flash.get_TotalFrames()-5)

{

current+=5;

flash.GotoFrame(current);

}

else

{

flash.put_FrameNum(flash.get_TotalFrames()-1);

}

“放大”按钮代码:

flash.Zoom(50);

“缩小”按钮代码:

flash.Zoom(200);