Salve,
Fiz essa parte do sistema conforme a Gabriela postou.
Tratei o redimencionamento da seguinte forma:
[Bindable] private var limiteWidth : int = 800;
[Bindable] private var limiteHeight : int = 800;
private function show_image(evt:Event):void{
var width : int = evt.currentTarget.content.width;
var height : int =
evt.currentTarget.content.height;
var porcentagem : Number = 0;
if(width > limiteWidth || height > limiteHeight)
{
if(width > height) {
porcentagem = (100 *
limiteWidth) / width;
} else {
porcentagem = (100 *
limiteHeight) / height;
}
width = width * (porcentagem / 100);
height = height * (porcentagem / 100);
}
bitmapData = new BitmapData(width, height)
bitmapData.draw(imgLoad,new Matrix());
b = new Bitmap(bitmapData,"auto", false)
var c:UIComponent=new UIComponent;
c.addChild(b);
addChild(c);
}
Aparentemente está ok.
O que preciso agora é fazer o upload desse BitMap para o servidor. Já
vi que é possível através do Export, mas gostaria de utilizar barra de
progressão.
Meu antigo sistema faz o upload através do FileReference.upload, mas
não sei como adaptar isso para pegar o Bitmap e não o
FileReference.browse
Att.
--~--~---------~--~----~------------~-------~--~----~
Você recebeu esta mensagem porque está inscrito na lista "flexdev"
Para enviar uma mensagem, envie um e-mail para [email protected]
Para sair da lista, envie um email em branco para
[email protected]
Mais opções estão disponíveis em http://groups.google.com/group/flexdev
-~----------~----~----~----~------~----~------~--~---