Copy link to clipboard
Copied
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 ();
Copy link to clipboard
Copied
you need to change the two for-loops.
Copy link to clipboard
Copied
Sorry, I'm kind of new at this and did not quite understand , can you put it in an example please? Thank you
Copy link to clipboard
Copied
if you're going to use someone else's code the least you can do is to study it so you understand it.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now