Code:
_root.Labeler.PickStatus = function() {
_root.Labeler.rectype = _root.Labeler.rectype.toLowerCase()
_root.Labeler.lblPrinted._visible = false;
_root.Labeler.lblReceipt._visible = false;
_root.Labeler.lblCleared._visible = false;
_root.Labeler.lblVoid._visible = false;
if (_root.Labeler.rectype == "receipt") {
_root.Labeler.lblPrinted._visible = false;
_root.Labeler.lblReceipt._visible = true;
_root.Labeler.lblCleared._visible = false;
_root.Labeler.lblVoid._visible = false;
}
if (_root.Labeler.rectype == "already printed") {
_root.Labeler.lblPrinted._visible = true;
_root.Labeler.lblReceipt._visible = false;
_root.Labeler.lblCleared._visible = false;
_root.Labeler.lblVoid._visible = false;
}
if (_root.Labeler.rectype == "cleared") {
_root.Labeler.lblPrinted._visible = false;
_root.Labeler.lblReceipt._visible = false;
_root.Labeler.lblCleared._visible = true;
_root.Labeler.lblVoid._visible = false;
}
if (_root.Labeler.rectype == "void") {
_root.Labeler.lblPrinted._visible = false;
_root.Labeler.lblReceipt._visible = false;
_root.Labeler.lblCleared._visible = false;
_root.Labeler.lblVoid._visible = true;
}
}
I've also tried using this in place of _root.Labeler..
Here's what's going on... Labeler is a symbol in my movie, lblPrinted,lblReceipt etc are symbols within that symbol..
I'm trying to print something but first I need Labeler to show the right text... calls to it aren't working
Code:
Labeler.rectype = arrStatus[_global.DMOData.SSTATUS - 3]; // Sets rectype to "void"
_root.Labeler.PickStatus();
And then when the print job is setup, it asks if the user wans to print a reciept...
Code:
PrintButton.onRelease = function() {
var my_pj:PrintJob = new PrintJob();
var myResult:Boolean = my_pj.start();
if(myResult) {
this.visible = false; // hide the print button, it covers up the hash
// start mod
import mx.controls.Alert;
HandlePrintChoice = function(evt){
if(evt.detail = 1) { // User Clicked Yes
_global._receipt = 1
} else {
_global._receipt = 0
}
}
Alert.show("Print a reciept also?", "Printing Options", Alert.YES | Alert.NO, this, HandlePrintChoice);
_this._parent._xscale = 85;
_this._parent._yscale = 85;
my_pj.addPage(0);
if(_global._receipt == 1) {
_root.Labeler.rectype = "reciept"
_root.Labeler._visible = true;
_root.Labeler.PickStatus();
my_pj.addPage(0);
}
_this._parent._xscale = 100;
_this._parent._yscale = 100;
_root.GoBackBox._visible = true
// end mod
}
delete my_pj;
};
At this point, Labeler.PickStatus needs to run so that its set to "receipt" and that would change the label over the printout (a watermark, basically).
None of the calls to my custom function PickStatus are working, I've tried everything I can think of.
If anyone can help, I'd be really greateful... I'm so lost on actionscript... I've learned a lot of flash in the last few weeks and the last week especially. Kinda burnt out
ALFII.com
---------------------
If this post answered or helped to answer your question, please reply with such so that forum members with a similar question will know to use this advice.