Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How can I choose the saving area ?

New Here ,
Mar 09, 2013 Mar 09, 2013

I have this code for saving the image, but the problem is that is saving the right part and I want him to save the left part. I found this code, is working, but the problem is that I don't understand from where I can choose the saving area. I've searched on internet but I did not found anything for this problem. Thank you for your help.

function output()

{    

snap = new flash.display.BitmapData(540, 768);   

snap.draw(_root);    

var _loc5 = new Array();   

var _loc7 = snap.width;    

var _loc6 = snap.height;    

for (var _loc3 = 0; _loc3 <= _loc7; ++_loc3)    

{        

for (var _loc2 = 0; _loc2 <= _loc6; ++_loc2)        

{            

var _loc4 = snap.getPixel(_loc3, _loc2).toString(16);            

_loc5.push(_loc4);       

     } // end of for    

} // end of for    

var _loc8 = new LoadVars();    

_loc8.img = _loc5.toString();    

_loc8.height = _loc6;     _loc8.width = _loc7;    

_loc8.send("http://www.candys-world.com/show.php", "output", "POST");

} // End of the function

shaF.onPress = function ()

{    

output();

};

stop ();

TOPICS
ActionScript
437
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 09, 2013 Mar 09, 2013

you need to change the two for-loops.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 09, 2013 Mar 09, 2013

Sorry, I'm kind of new at this and did not quite understand , can you put it in an example please? Thank you

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 09, 2013 Mar 09, 2013
LATEST

if you're going to use someone else's code the least you can do is to study it so you understand it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines