# Simple print functionality

**URL:** <https://forum.kirupa.com/t/simple-print-functionality/183357>\
**Category:** flash\
**Created:** [March 26, 2006, 6:51am UTC](https://forum.kirupa.com/t/simple-print-functionality/183357 "2006-03-26T06:51:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oli\_G](https://avatars.discourse-cdn.com/v4/letter/o/f05b48/32.png) [@Oli\_G](https://forum.kirupa.com/u/Oli_G)\
**Post date:** [March 26, 2006, 6:51am UTC](https://forum.kirupa.com/t/simple-print-functionality/183357/1 "2006-03-26T06:51:45Z")

</div>

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.

```auto

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')        
  
        }

```

---

<div class="post-metadata">

**Author:** ![Oli\_G](https://avatars.discourse-cdn.com/v4/letter/o/f05b48/32.png) [@Oli\_G](https://forum.kirupa.com/u/Oli_G)\
**Post date:** [March 28, 2006, 1:54pm UTC](https://forum.kirupa.com/t/simple-print-functionality/183357/2 "2006-03-28T13:54:08Z")

</div>

Still havin issues, and going thru tissues.

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