Simple print functionality

Hi all

I have a movie clip over the top of the main content, with nothing in frame one.

When enter is hit, this clip jumps to a flag called ‘confirm’ with some confirmation text, whereby if the user hits enter again, another clip is printed.

The trouble is, the print command is being enacted when the print mc (below) hits the frame with the following code.

So it’s basically ignoring the getAscii command, and printing without waiting confirmation or cancellation.

I cleared the first listener here, hoping it would fix it, and created a new print listener, but i’m still having the same problem

Would luuurve a bit of help.



stop();

// disable all other keys 

Key.removeListener(_root);

// add a new listener specific to the print function

Key.addListener(_print);

//once the confirm text comes up, hitting 'enter' triggers the print

if (Key.getAscii() == 13) {
        
     var pj = new PrintJob();
        var success = pj.start();
        if(success)
        {
                pj.addPage("_root.main_mc.loaded_mc", {xMin : 0, xMax: 300, yMin: 0, yMax: 500});
                pj.send();
                gotoAndPlay('confirmed')
        }
        delete pj;

        //hitting escape cancells the print
        
        }
        
        if (Key.getAscii() == 27) {
            
            gotoAndPlay('confirmed')        
  
        }

Still havin issues, and going thru tissues.

Bleh… so i wasnt cut out to be a rapper.