SAVE IMAGE FROM FLASH AS2 PROJECT USING FLASH AS3 AND PHP

There are lot of image capture scripts out there in AS2 but, when we try to capture large images using AS2 it becomes horrible due to huge memory utilization. This is due to pixel by pixel RGB value collection process of AS2.

When I was into a project development, I suppose to do the image saving process much quicker. So I found a method to achieve that by creating a container in AS3 and loading AS2 swf  inside that to save the image much more faster.

This way I was successful in creating Image faster than AS2.

Here you go for the source https://github.com/sesubash/SAVE_IMAGE_FROM_AS2_PROJECT_USING_AS3_AND_PHP

Instructions:
In the save.html file I have embedded AS3 swf  using swfobject, passed the AS2 file name, image name to be saved and save php script(create.php in this case).

Find the flash source files inside the folder. You  can change the dimension of the rectangular area to be captured according to your project requirement in the file Main.as in the location SaveJpeg/Main.as.

Related Posts

Rotate around center Flex/AS3

I have been searching for rotating any display object based on its center and ended up with the stuffs using MatrixTransformer. Though it may helpful to use…

This Post Has 13 Comments

  1. Thank you for this, Subash. When I open save.html, this works fine. scene.swf is being displayed through saveContainer.swf.

    However, I need to embed saveContainer.swf in a website. When I open saveContainer.swf, it is blank and does not show the scene.swf file. Is there a way to make this work? thanks.

    1. Hi Drüd, can you show the code how you are embedding the saveContainer.swf ? Make sure that you are passing the values (“allowScriptAccess”, “sameDomain”), (“saveImageScript”,”create.php”),(“imageName”,”image.jpg”), (“AS2MovieName”,”scene.swf”) through FLASHVARS.

    1. Hi Farshad,
      This script will trigger save as soon as the content is loaded. If you want to trigger save explicitly, in SaveContainer.fla you can add a button to trigger the save functionality. It will just work fine. You can find the save button in the library of SaveContainer.fla. Let me know if you need more info.

  2. Dude.. I am not substantially into studying, but somehow I obtained to experience lots of post material with your website web-site. Its amazing how attention-grabbing it truly is for me to go to you pretty frequently.

  3. I savour, result in I foind just what I used to bee having a look for.

    You have ended my four day lengthy hunt! God Bless you
    man. Have a great day. Bye

  4. Hi would you mind letting me know whijch web host you’re wrking with?
    I’ve loaded your blog in 3 completely differet web browsers and I must say
    this blog loads a lot quicker then most. Can you recommend a god hosting provider at
    a fair price? Thanks, I apprrciate it!

Leave a Reply to Emely Cancel reply

Your email address will not be published. Required fields are marked *