开发者

How to print from flex app by clicking print in context menu

I want my flex 4 application to print proper picture w开发者_如何学运维hen I click on print in context menu of Adobe Flash Player. Is it possible?

Proper picture - picture just a bit different then you see at the screen. I mean some colors are different.


The "print" context menu item is not suitable for printing from Flex applications. It is more appropriate for Flash applications created with Flash Professional. You should implement your own printing functionality.

If you wish to print from the context menu then you could create a Custom "context menu" in flex via the ContextMenu and ContextMenuItem classes. See also Working with Menus in the AS3 Developer's Guide.

To change the context menu:

var my_cm:ContextMenu = new ContextMenu();
my_cm.hideBuiltInItems();
var printItem:ContextMenuItem = new ContextMenuItem("Print proper image");
my_cm.customItems.push(printItem);
this.contextMenu = my_cm;

How to print from flex app by clicking print in context menu

Don't forget that you can't use the "Print" caption, because it is reserved for the internal print function (see Restrictions).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜