5,660,782 members and growing! (22,597 online)
Email Password   helpLost your password?
Platforms, Frameworks & Libraries » Libraries » General     Intermediate

Render SWF files and get a bitmap buffer of those rendering files

By James Duy Trinh (VietDoor)

Render Flash files and get a bitmap buffer of those rendering files at any time.
VC6, C++, Windows, MFC, Visual Studio, VS6, Dev

Posted: 30 Mar 2005
Updated: 30 Mar 2005
Views: 44,528
Bookmarked: 14 times
Announcements
Loading...



Search    
Advanced Search
Sitemap
7 votes for this Article.
Popularity: 1.73 Rating: 2.05 out of 5
5 votes, 71.4%
1
1 vote, 14.3%
2
0 votes, 0.0%
3
0 votes, 0.0%
4
1 vote, 14.3%
5

Sample Image - Render_Flash.jpg

Introduction

This is an application that uses the ZFLASH lib, and I changed some code to render multiple Flash files at the same time.

Sample Project

Step 1: Declare a variable of the CFlashRender class:

CFlashRender m_FlashRender;

Step 2: Call a function to init Flash and set timer to get a bitmap buffer for rendering the Flash file:

m_FlashRender.InitFlash();
SetTimer(IDTIMER_FLASH, 40, NULL);

Step 3: Load a Flash file to render.

m_FlashRender2.LoadFlash(sFlashFileName);

Step 4: Edit the Timer function:

void CRenderFlashDlg::OnTimer(UINT nIDEvent) 
{
 // TODO: Add your message handler code here and/or call default

 if (nIDEvent == IDTIMER_FLASH)
 {
   m_FlashRender.DrawFrame();
   BYTE *pFlashBuffer = m_FlashRender.GetFlashBitmapBuffer();
   if (pFlashBuffer)
   {
    int size = m_FlashRender2.GetFlashBitmapSize();   
    // CShowpic m_stcFlashRender

    // CShowpic inherited from CStatic

    m_stcFlashRender.ShowImage(pFlashBuffer );
   }
  }
}

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

James Duy Trinh (VietDoor)


Bachelor of Natural Science University, HCMC VietNam
Occupation: Software Developer (Senior)
Location: Vietnam Vietnam

Other popular Libraries articles:

Article Top
Sign Up to vote for this article
You must Sign In to use this message board.
FAQ FAQ Noise ToleranceSearch Search Messages 
 Layout  Per page   
 Msgs 1 to 25 of 26 (Total in Forum: 26) (Refresh)FirstPrevNext
GeneralIs this project working withVS2005member00thilani18:57 24 Apr '08  
GeneralBlack bordersmemberOuckk19:13 13 Sep '07  
AnswerRe: Black bordersmember21:06 29 Sep '08  
QuestionCan anybody tell me how to extract audio from SWF files?member3:25 11 Feb '07  
AnswerRe: Can anybody tell me how to extract audio from SWF files?membervietdoorgroup0:06 12 Feb '07  
GeneralIs this wroking for anyone ?memberwhat is not registered1:25 6 Jun '06  
GeneralRe: Is this wroking for anyone ?membervietdoorgroup0:13 12 Feb '07  
GeneralRevision Requestmemberwhat is not registered7:42 5 Jun '06  
GeneralRe: Revision Requestmembervietdoorgroup17:58 5 Jun '06  
GeneralRe: Revision Requestmemberwhat is not registered23:59 5 Jun '06  
GeneralError..?memberChae Sang, Jung21:42 29 Nov '05  
AnswerRe: Error..?membermeouvn21:46 29 Nov '05  
GeneralRe: Error..?memberChae Sang, Jung14:47 30 Nov '05  
GeneralWhere is whole zflash.lib source?memberChae Sang, Jung21:00 29 Nov '05  
AnswerRe: Where is whole zflash.lib source?membermeouvn21:43 29 Nov '05  
GeneralRe: Where is whole zflash.lib source?memberChae Sang, Jung22:09 29 Nov '05  
GeneralFlash File ParsermemberJonas Beckeman23:25 28 Jul '05  
GeneralRe: Flash File Parsermembermeouvn23:28 28 Jul '05  
GeneralRe: Flash File ParsermemberJonas Beckeman23:47 28 Jul '05  
GeneralNo file 'dshow.h' in the source documentsussFlyingDancer1:07 23 Jun '05  
GeneralRe: No file 'dshow.h' in the source documentmembermeouvn2:22 23 Jun '05  
GeneralRe: No file 'dshow.h' in the source documentsussAnonymous2:39 23 Jun '05  
GeneralRe: No file 'dshow.h' in the source documentmemberessetesse20:19 12 Jul '07  
GeneralWe need to have another powerful flash componentmembermeouvn23:06 18 May '05  
Generalmore?memberKastellanos Nikos0:16 31 Mar '05  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 30 Mar 2005
Editor: Smitha Vijayan
Copyright 2005 by James Duy Trinh (VietDoor)
Everything else Copyright © CodeProject, 1999-2008
Web17 | Advertise on the Code Project