Return-Path: X-Original-To: apmail-flex-users-archive@www.apache.org Delivered-To: apmail-flex-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 843CBCEE9 for ; Mon, 26 May 2014 07:11:20 +0000 (UTC) Received: (qmail 85324 invoked by uid 500); 26 May 2014 07:11:20 -0000 Delivered-To: apmail-flex-users-archive@flex.apache.org Received: (qmail 85284 invoked by uid 500); 26 May 2014 07:11:20 -0000 Mailing-List: contact users-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@flex.apache.org Delivered-To: mailing list users@flex.apache.org Received: (qmail 85276 invoked by uid 99); 26 May 2014 07:11:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 May 2014 07:11:20 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of campolake@gmail.com designates 209.85.214.172 as permitted sender) Received: from [209.85.214.172] (HELO mail-ob0-f172.google.com) (209.85.214.172) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 May 2014 07:11:16 +0000 Received: by mail-ob0-f172.google.com with SMTP id wp18so7653753obc.17 for ; Mon, 26 May 2014 00:10:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=HKZx3P8/fntpI6YGtP/91eyJZoAGtYdkMi6veNPPiMg=; b=nj5bLBWbvGDVsAnkeWDEqyfZacdGzvgLkzMZjm++wBHd9Br9MenPsBbH1fT3/zFwYJ Cw8orHUVt5RqMMGSslhsD+dCYhUT/o4kw4w0sZ2pGZQ/GbKgMIWgoPKOQqZOsKy9tIXX MTO6jSuyvuj1N4nFYXAO7QaeRDk5QYK2DnBm/sxN1IXRw2H2Bmtok2OWpMGxQRT31eqB rfytmucZD2KENwCssgQ7DqV0rWe0hYYAWtWrAmKlMfbbHXaEvZHBCml4Omw+5QFlaGit pYIWRZjFQYSl2NbRM+dF6NhyM9h1rommXN9FctNqK1cpZe1vuffg8FYn503z0qeZsP6C 0JDw== MIME-Version: 1.0 X-Received: by 10.60.155.5 with SMTP id vs5mr23481840oeb.32.1401088252650; Mon, 26 May 2014 00:10:52 -0700 (PDT) Received: by 10.76.75.165 with HTTP; Mon, 26 May 2014 00:10:52 -0700 (PDT) Date: Mon, 26 May 2014 15:10:52 +0800 Message-ID: Subject: HI,everybody,When i use BitmapData.draw ,I have a question From: wangjw To: users@flex.apache.org Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org I have a quest,I want to save the mapcontrol(arcgis map control) to a Image,Then send the Image to the webserver. below the is code: +++++++++++++++++++++++++++++++++++++++++++++ var width:Number = map.width; var height:Number = map.height; var bitmapData:BitmapData = new BitmapData(width, height); bitmapData.draw(mapcontainer,new Matrix()); var file:FileReference = new FileReference(); var jpg:JPEGEncoder = new JPEGEncoder(); var ba:ByteArray = jpg.encode(bitmapData); var urlrequest: URLRequest = new URLRequest(uploadImgUrl + "?id="+appId); urlrequest.method = URLRequestMethod.POST; urlrequest.data = ba; urlrequest.contentType = "application/octet-stream"; var loader:URLLoader = new URLLoader(); loader.addEventListener(Event.COMPLETE,finishCaptureUpload); loader.load(urlrequest); +++++++++++++++++++++++++++++++++++++++++++++++++++++++ When in the flash builder test mode,the code is no problem, But when I run the swf in a webserver, bitmapData.draw(mapcontainer,new Matrix()); this line of code can't run. I have corssdomain.xml ,but it no use.Can anybody help me ? the reason is flex security sandbox? but i don't konw how to set.