onlyican Posted July 24, 2006 Share Posted July 24, 2006 Hey allI have a Flash file, where you can do something, chance something bla bla bla(Top Secret project, cant say to much, or I will get shot)AnywayWhat I want to do is the finish result from the SWF document, I want converted to web usable image (jpg, gif png ...)I have seen one example, where there is code in the Flash File, but there is something I dont like about it.I know I can create an image from a website, a document, and an image.But how would I create an image from a SWF file???The person who posts the correct answer, will get a pint on me. Quote Link to comment Share on other sites More sharing options...
lead2gold Posted July 24, 2006 Share Posted July 24, 2006 you could always load the animation up (the swf) and use alt+[print screen] on your keyboard.That will take a screen shot... you could load that up in any photo/image editor you have and save it as a jpg.Chris Quote Link to comment Share on other sites More sharing options...
zq29 Posted July 24, 2006 Share Posted July 24, 2006 There is some software called [url=http://www.swftools.org/]SWFTools[/url] that has a command line tool called swfextract which can be used to extract images from an swf file. You could use this tool along with PHPs exec() function to auto-extract frames from the swf - Would this be any use to you? Quote Link to comment Share on other sites More sharing options...
onlyican Posted July 24, 2006 Author Share Posted July 24, 2006 My mistake, I didn't say something rightThe SWF, allows someone to create something, say, design a room, moving furniture n stuffThen I want the PHP script to grab the completed image, so I can use it on the website.Therefor I can not do printScreen, or Extrernal Apps Quote Link to comment Share on other sites More sharing options...
DaveLinger Posted July 24, 2006 Share Posted July 24, 2006 why couldn't you use external apps? As long as they are installed on the server and are usable from php... Quote Link to comment Share on other sites More sharing options...
Joe Haley Posted July 24, 2006 Share Posted July 24, 2006 [quote author=DaveLinger link=topic=101662.msg402665#msg402665 date=1153758585]why couldn't you use external apps? As long as they are installed on the server and are usable from php...[/quote]because the screen he wishes to capture is within a SWF running on a clients machine.He esentally needs a way to make flash take a picture of itself, and send it to PHP. Quote Link to comment Share on other sites More sharing options...
zq29 Posted July 24, 2006 Share Posted July 24, 2006 So really, this isn't a PHP question. Maybe try a Flash forum? You might get a better response that way... Quote Link to comment Share on other sites More sharing options...
onlyican Posted July 24, 2006 Author Share Posted July 24, 2006 noThe SWF is on the server.In PHPYou can create an image of a website, and save it a jpg(imagecreatetruecolor I think, cant remember now)I want something simularexcept the path wont be http://www.example.comit would be /example.swfthen I get a nice pretty picture of what the flash looks like.This can be done in flash, by sending all the pixles over to phpthen php putting all the pixles together, I just wanted to know if there was an easier option Quote Link to comment Share on other sites More sharing options...
zq29 Posted July 24, 2006 Share Posted July 24, 2006 [quote author=onlyican link=topic=101662.msg402755#msg402755 date=1153764617]In PHPYou can create an image of a website, and save it a jpg(imagecreatetruecolor I think, cant remember now)[/quote]I'd be interested to know how you've managed to achieve that strictly with PHP...I don't think you're going to be able to do this without the aid of some third party command line software sitting on the server... Quote Link to comment Share on other sites More sharing options...
onlyican Posted July 24, 2006 Author Share Posted July 24, 2006 okThen I will go to option 2In the Flash File, I get an array of every pixle and the colorThen parse that data to PHPThen with the pixle informationCreate the image Quote Link to comment Share on other sites More sharing options...
zq29 Posted July 24, 2006 Share Posted July 24, 2006 How is the array structured? $pixels[ x][ y] ? Quote Link to comment Share on other sites More sharing options...
onlyican Posted July 24, 2006 Author Share Posted July 24, 2006 I dont know yet, I saw information on it somewhere, have not had time to look properly.Building a new web game. and trying to get something online Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.