我从闪电5.5号建筑,用AIR3.1出口,并通过由 Apple果组建的企业(转口我批准)分发。
我现在试图让人民抵抗力量(利用AlivePDF)向iPad出口一些how,要么出口到iBooks,要么在Safari开办。
这是我用上台式版的 app。 尽管描述非常令人迷惑,但还是取得了工作。 我不知道如何改变这种状况,并把它变成一个议会。
//Populate listbox component from array
function noEmpty(item:*, index:int, array:Array):Boolean{
return item != undefined;
}
for(var i:int = 0; i < MovieClip(root).selectedProducts.length; i++) {
if(MovieClip(root).selectedProducts[i] != undefined){
selectedProductsText.dataProvider.addItem({label: MovieClip(root).selectedProducts[i]});
}
}
var myTextFormat:TextFormat = new TextFormat();
myTextFormat.size = 20;
myTextFormat.font = "Arial";
myTextFormat.color = 0x000000;
myTextFormat.leftMargin = 30;
selectedProductsText.rowHeight = 40;
selectedProductsText.setRendererStyle("textFormat", myTextFormat);
//AlivePDF, generate PDF
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;
import com.adobe.images.*;
function convertString(_value:String):String
{
var returnString:String = "";
var _chr:String = String.fromCharCode(13);
var tempArray:Array = _value.split(_chr);
for(var i:uint = 0; i < tempArray.length; i++)
{
returnString += tempArray[i] + "
";
}
return returnString;
}
var pdf:PDF = new PDF();
pdf.setDisplayMode (Display.REAL);
pdf.addPage();
pdf.writeText(7, convertString( MovieClip(root).selectedProducts.filter(noEmpty).join(
) ));
var buffer:ByteArray = pdf.save(Method.LOCAL);
var file:FileReference = new FileReference();
//save PDF button
btnPdf.addEventListener( MouseEvent.CLICK, generatePDF );
function generatePDF ( e:MouseEvent )
{
file.save(buffer, "Product Selection List.pdf");
}