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.

13 thoughts on “SAVE IMAGE FROM FLASH AS2 PROJECT USING FLASH AS3 AND PHP

  1. Drüd says:

    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.

  2. Soundii says:

    Wonderful post! We will be linking to this great article on our website. Keep up the great writing.

  3. farshad says:

    Perfect , but there is no save button on the page !

    1. Subash Selvaraj says:

      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.

      1. farshad says:

        Nope, I couldn’t make it to work !

        ReferenceError: Error #1065: Variable Button is not defined.
        at SaveJpeg::Main/frame1()
        SecurityError: Error #2000: No active security context.

        This is what I get and you can see the live preview you here :

        http://www.farshadghazanfari.com/demo/saveimg/save.html

  4. Chris says:

    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.

  5. Aw, this was a really good post. Taking the time and actual effort to create a great article… but what can I say… I put things off a lot and don’t manage to
    get anything done.

  6. Highly energetic article, І liқed tɦat bit. Will tҺere be
    a part 2?

  7. Dorris says:

    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

  8. Dong says:

    Hello, I would like to subscribe for this website to take most recent updates,
    thus where can i do it please assist.

  9. Emely says:

    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!

  10. quest bars says:

    Good web site you have here.. It’s difficult to find good quality
    writing like yours these days. I truly appreciate individuals like you!
    Take care!!

Leave a Reply

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