Skip to main content
Inspiring
August 16, 2009
Question

Please help fixing this actionscript

  • August 16, 2009
  • 1 reply
  • 879 views

Could anyone tell me what am I doing wrong here!!!

 

var senderLoad:LoadVars = new LoadVars();
var receiveLoad:LoadVars = new LoadVars();

sender.onRelease = function () {
senderLoad.thename = thename.text;

senderLoad.sendAndLoad("webaddress/send.php",receiveLoad);
}

BitmapExporter.gatewayURL = "webaddress/send.php";
BitmapExporter.addEventListener( "progress", this);

function save():Void
{
// Check if still an export is going on:
if (BitmapExporter.getStatus() == "idle") {

  BitmapExporter.saveBitmap(bmd, "kline.jpg", "turboscan", 0 );
}
}

receiveLoad.onLoad = function () {
if(this.sentOk) {
  _root.gotoAndStop("success");
}
else {
  _root.gotoAndStop("failed");
}
}

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
August 16, 2009

why are you calling send.php twice?

if you're using mario klingemann's bitmapexporter classs, don't use loadvars.

Inspiring
August 17, 2009

Having loadvars, how to script it to capture a movieclip in to a UI window and then send it to the PHP server side script? Need your expertise.

kglad
Community Expert
Community Expert
August 17, 2009

use the draw() method of the bitmapdata class to create a bitmap from your movieclip.