Jump to content
Fórum Script Brasil
  • 0

Envio de duas imagens por BitmapData


Mario Junior designer

Question

Olá!

Achei este código na web:

import com.adobe.images.JPGEncoder;
import flash.events.Event;
import flash.net.URLLoader;
import flash.net.URLRequestHeader;
import flash.net.URLRequest;
bt_salvarImagem1_mc.buttonMode = true;
function onSavePictureButtonClicked1(event:MouseEvent):void
{
var jpgSource:BitmapData = new BitmapData(img_mc.width,img_mc.height);
jpgSource.draw(img_mc);
var jpgEncoder:JPGEncoder = new JPGEncoder(85);
var jpgStream:ByteArray = jpgEncoder.encode(jpgSource);
var header:URLRequestHeader = new URLRequestHeader("Content-type","application/octet-stream");
var loader:URLLoader = new URLLoader();
var myRequest:URLRequest = new URLRequest("http://.../saveJPG.php");
myRequest.requestHeaders.push(header);
myRequest.method = URLRequestMethod.POST;
myRequest.data = jpgStream;
loader.load(myRequest);
loader.addEventListener(Event.COMPLETE,saved);
function saved(e:Event)
{
...aqui inseri scripts para envio das informações para e-mail...
}
}
bt_salvarImagem1_mc.addEventListener(MouseEvent.CLICK, onSavePictureButtonClicked1);
Fiz umas alterações e usei ele para enviar uma imagem do MovieClip para o servidor.
Funciona muito bem, mas gostaria que enviasse DOIS movieclips ao mesmo tempo. Tem como?
Se alguém puder me ajudar, fico grato!
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.1k
    • Total Posts
      652k
×
×
  • Create New...