[COLOR=#222222]**[FONT=monospace]Well getting back into AS3 after sometime off (like 4 year, lol). I pretty much have my app all completed by I am trying to use alivePDF and I can’t get around the 1137 compiler error. see below for more details.
My AS3
import com.greensock.*;
import com.greensock.easing.*;
import PNGEncoder;
import flash.display.MovieClip;
import fl.motion.Color;
import flash.geom.ColorTransform;
import org.alivepdf.pdf.PDF;
import org.alivepdf.layout.Orientation;
import org.alivepdf.layout.Size;
import org.alivepdf.layout.Unit;
import org.alivepdf.display.Display;
import org.alivepdf.saving.Method;
import org.alivepdf.fonts.FontFamily;
import org.alivepdf.fonts.Style;
import org.alivepdf.colors.RGBColor;
//Remove Right Click Kinda
stage.showDefaultContextMenu = false;
// we create the PDF
var szPDF:PDF = new PDF( Orientation.PORTRAIT, Unit.MM, Size.LETTER );
// we set the zoom to 100%
szPDF.setDisplayMode ( Display.REAL );
// we add a page
szPDF.addPage();
szPDF.addImage(goalieMc2);
generate_btn.addEventListener( MouseEvent.CLICK, generateSzPDF );
function generateSzPDF (e:MouseEvent)
{
szPDF.save( Method.REMOTE, "http://alivepdf.bytearray.org/wp-content/demos/create.php", "MySpecs.pdf" );
}
var saveDialog:SaveDialog;
var shareBtnArray:Array = [shareBtn,emailBtn];
for (var i:uint=0; i<shareBtnArray.length; i++) {
shareBtnArray*.addEventListener(MouseEvent.ROLL_OVER, shareBtnRollover);
shareBtnArray*.addEventListener(MouseEvent.ROLL_OUT, shareBtnRollout);
shareBtnArray*.addEventListener(MouseEvent.CLICK, shareBtnCLICK);
shareBtnArray*.addEventListener(MouseEvent.MOUSE_UP, save);
shareBtnArray*.buttonMode=true;
}
function shareBtnRollover(event:MouseEvent):void {
TweenMax.to(event.target, 0.5, {glowFilter:{color:0xc0a062, alpha:1, blurX:5, blurY:5}});
}
function shareBtnRollout(event:MouseEvent):void {
TweenMax.to(event.target, 0, {glowFilter:{remove:true}});
}
function shareBtnCLICK(event:MouseEvent):void {
}
//Save Png
shareBtn.addEventListener(MouseEvent.MOUSE_UP, save);
function export():void
{
var bmd:BitmapData = new BitmapData(612, 792);
bmd.draw(Mc2);
var ba:ByteArray = PNGEncoder.encode(bmd);
var file:FileReference = new FileReference();
file.addEventListener(Event.COMPLETE, saveSuccessful);
file.save(ba, "MyImage.png");
}
function saveSuccessful(e:Event):void
{
saveDialog = new SaveDialog();
addChild(saveDialog);
saveDialog.closeBtn.addEventListener(MouseEvent.MOUSE_UP, closeSaveDialog);
saveDialog.closeBtn.addEventListener(MouseEvent.MOUSE_OVER, closeSaveDialogRO);
saveDialog.closeBtn.addEventListener(MouseEvent.MOUSE_OUT, closeSaveDialogROut);
saveDialog.closeBtn.buttonMode=true;
}
function closeSaveDialogRO(e:MouseEvent):void
{
TweenMax.to(saveDialog.closeBtn, 1, {glowFilter:{color:0xc0a062, alpha:1, blurX:5, blurY:5, strength:1, quality:2}});
}
function closeSaveDialogROut(e:MouseEvent):void
{
TweenMax.to(saveDialog.closeBtn, 0.25, {glowFilter:{remove:true}});
}
function closeSaveDialog(e:MouseEvent):void
{
removeChild(saveDialog);
}
function save(e:MouseEvent):void
{
export();
}
stop();
I am receiving the following message in the compiler errors panel:…/org/alivepdf/pdf/PDF.as, Line 3196 1137:Incorrect number of arguments. Expected no more than 1.
I’m using v0.1.4.9 of alivePDFany direction would be greatly appreciated.
[/FONT]**[/COLOR]