NishilSB / alivepdf

Automatically exported from code.google.com/p/alivepdf
0 stars 1 forks source link

1137 Compiler error #335

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
Here is my AS

import com.greensock.*;
import com.greensock.easing.*;
import PNGEncoder;
import flash.display.MovieClip;
import fl.motion.Color;

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;

// 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" );
}

import flash.geom.ColorTransform;

stage.showDefaultContextMenu = false; 

var saveDialog:SaveDialog;

var shareBtnArray:Array = [shareBtn,emailBtn];

for (var i:uint=0; i<shareBtnArray.length; i++) {
shareBtnArray[i].addEventListener(MouseEvent.ROLL_OVER, shareBtnRollover);
shareBtnArray[i].addEventListener(MouseEvent.ROLL_OUT, shareBtnRollout);
shareBtnArray[i].addEventListener(MouseEvent.CLICK, shareBtnCLICK);
shareBtnArray[i].addEventListener(MouseEvent.MOUSE_UP, save);
shareBtnArray[i].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);//Creates a new BitmapData with the board size

    bmd.draw(goalieMc2);//Draws the board MovieClip into a BitmapImage in the BitmapData

    var ba:ByteArray = PNGEncoder.encode(bmd); //Creates a ByteArray of the BitmapData, encoded as PNG

    var file:FileReference = new FileReference(); // Instantiates a new File Reference Object to handle the save

     file.addEventListener(Event.COMPLETE, saveSuccessful);

    file.save(ba, "MyImage.png"); //Saves the ByteArray as a PNG
}

function saveSuccessful(e:Event):void
{
    saveDialog = new SaveDialog();// Instantiates a new SaveDialog Class

    addChild(saveDialog); //Adds the SaveDialog MovieClip to the Stage

    saveDialog.closeBtn.addEventListener(MouseEvent.MOUSE_UP, closeSaveDialog);//Adds a listener to the close button of the dialog
    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); //Removes the dialog of the Stage
}

function save(e:MouseEvent):void
{
    export(); //Calls the export function to begin the saving process
}

stop();

What is the expected output? What do you see instead?

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.

What version of the product are you using? On what operating system?
0.1.4.9

Please provide any additional information below.

Original issue reported on code.google.com by garyzone...@gmail.com on 20 Sep 2011 at 1:59