ASP.net swf game file preview (thumbnail)

2019-09-21 05:15发布

问题:

Scenario:

I really in need for your help. I have multiple swf game files which I want to view them on the page as thumbnails and let the visitor click on it to play the game.

Required:

I want a tool that let make take a thumbnail from swf file, maybe the first frame of the file as image to view it.

maybe if there another way to preview the files in asp.net pages without the need to the following way could be better.

Bad news

I have viewed all the possible answers on StackOverFlow and even on Google but with no luck, they lead my to the following:

  • use: https://swf.codeplex.com/: I have tried it and now result
  • use ffmpeg: but the feature is not available yet, and I'm getting the following error 'swf: could not find codec parameters'

回答1:

Check out swfextract, part of swftools. It's a console app so you can easily drive it from your own software.



回答2:

I have used to view the SWF file and make a div overlay to stop user interaction with it, after that I have made the div clickable so the user will navigate to the file page

<div style="cursor: pointer; position: relative; z-index: 1">
    <div id="overlay" onclick="window.location.href='Game.aspx?gameId=7'; return false;" style="opacity: 0; position: absolute; top: 0; bottom: 0; left: 0;     right: 0; display: block; z-index: 2; background-color: red">
    </div>
    <object data="Handler.ashx?gameId=7" width="250" height="200"></object>
</div>