Skip to main content
Known Participant
March 9, 2013
Question

How can I choose the saving area ?

  • March 9, 2013
  • 1 reply
  • 460 views

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 ();

This topic has been closed for replies.

1 reply

kglad
Braniac
March 9, 2013

you need to change the two for-loops.

zosajiAuthor
Known Participant
March 9, 2013

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

kglad
Braniac
March 9, 2013

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