Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Simple Print Functionality.



Hi all

Above the main content of my app, I have a movie clip (for print confirmation) with nothing on frame one.

When 'enter' key is hit on the timeline, this print 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, .FLA is attached.

Cheers



Code:
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')

}



FlashKit > Flash Help > Flash ActionScript
Posted on: 03-26-2006, 04:24 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Simple Print Functionality
Hi all

Above the main content of my app, I have a movie clip (for print confirmation) with nothing on frame one.

When 'enter' key is hit on the timeline, this print 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, FLA is attached as a zip.

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.


Code:

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

}

Need To Add Print And Save Functionality
I need to be able to save and print a certain section of the project once it's exported to swf. In other words, the user has an editable region and I want them to be able to save and print that region. How can I accomplish this? Thanks!
-SC

Help With Print Functionality For Use Within A Projector
I am looking to add a print functionality to my projector movie. I have found several examples yet none have had the exact function i am needing. I will have several static pdfs (placed within a scrollpane component) that have print buttons on each. I am looking for the as3 or a road to the as3 for the functionality to print the entire pdf located within the scrollpane component. If placing the pdf within the scrollpane is impossible, can someone point me in the direction of a better method...

Thanks in advance...

Adding Save/Open/Print Functionality To A Dynamic Text Box (offline)
Is it possible to add open/save/save as../print functionality to a flash dynamic text box. Something like a word processor. I would like to do this is CS3 but don't really know how to go about it.

I was looking at the ContextMenu Class and thought that could be of some use...

Thanks for any help
Ben

Simple Scrollbar Functionality
hi, i created a horizontal scrollbar using the simple custom scrollbar tutorial. it contains several different thumbnail images that move left to right with arrows. so basically it is the same as the tutorial, except it is horizontal and contains images with rollover functionality instead of text. i am wondering if there is a way to remove the rollover functionality when part of the thumbnail image is hidden by the mask? right now, when you scroll you can have maybe an edge of a thumbnail visible and the rest hidden by the mask, yet still click on it. i want to stop that from happening...can anyone help? thank you!

[Q] Simple LoadMovie + Assigning Functionality To The Loaded SWF...
I feel like something is not right... But I cannot figure out what it is...

This is the script...

ActionScript Code:
this.createEmptyMovieClip("test", 1);
this.createEmptyMovieClip("tmp", 2);
this.tmp.onEnterFrame = function ()
{
    var _mc:MovieClip = this._parent.test;
    var _l:Number = _mc.getBytesLoaded();
    var _t:Number = _mc.getBytesTotal();
    trace(_mc + " : " + _l + " / " + _t);
    if ((_l >= _t) && (_t > 12))
    {
        _mc.onPress = function ()
        {
            startDrag(this);
        }
        _mc.onRelease = function ()
        {
            stopDrag();
        }
        delete this.onEnterFrame;
        this.removeMovieClip();
    }
}
this.test.loadMovie("testmap.swf");
Good old simple loadMovie routine that assigns dragging functionality when SWF is fully loaded... It seems that it has to work, but I cannot make the SWF draggable... This script works if I load in any JPEG or any other SWF file, but I cannot get this work with the SWF file that I have attached...

Can anybody shed some light???

Two Simple Questions: FMSS V/s FMIS Functionality
Folks,

I've looked around the site for quite a while now, and the differences between FMSS and FMIS are often very blurred, so I have some direct questions regarding capabilities and which version of FMSS I need.

1. Is FMSS capable of incorporating custom players or does that require FMIS?

2. Is FMSS capable of prompting for authentication (standard Username/Password) before starting a stream or does that require FMIS?

We're just now getting to a point of purchasing our server, but putting requirements to one of the two products is proving difficult.

Many thanks for folks helping out a noob.

Simple Print Function
All i need to know is how to print one certain frame. I know how to set up the boundary, and designated my frame with a #p label, I need to know the action that is nessesary for my print button. If you can, please include the actual script! BIG HELP! thanks!

Simple Print Question....?
I have a complex movie with multiple layers and movies on the timeline. I want to print what is on the screen when the user presses a button. When I add some simple print commands to the button, it is printing a page for ever frame I have.

Can you help me get around this, I just want to print what is on the screen when the user presses a button.

Thanks!

Simple Print Button
I'm looking to just create a simple print button that prints everything visible on the flash screen. I tried searching for something along these lines but couldnt find anything straight fwd. Can anyone help?

Simple Print Question....?
I have a complex movie with multiple layers and movies on the timeline. I want to print what is on the screen when the user presses a button. When I add some simple print commands to the button, it is printing a page for ever frame I have.

Can you help me get around this, I just want to print what is on the screen when the user presses a button.

Thanks!

Simple Print Question
hi guys.
i want to simply print 2 movieClips when i press a Print button.
so i have the "_root.container_mc" and "_root.logo_mc"...

can someone paste the simplest code for printing a "landscape" page with these 2 ?
thanks a lot.

Simple Print Question....?
I have a complex movie with multiple layers and movies on the timeline. I want to print what is on the screen when the user presses a button. When I add some simple print commands to the button, it is printing a page for ever frame I have.

Can you help me get around this, I just want to print what is on the screen when the user presses a button.

Thanks!

Simple Print Question
hi guys.
i want to simply print 2 movieClips when i press a Print button.
so i have the "_root.container_mc" and "_root.logo_mc"... in one page...

can someone paste the simplest code for printing a "landscape" page with these 2 ?
thanks a lot.

Simple Print Question
hi guys.
i want to simply print 2 movieClips when i press a Print button.
so i have the "_root.container_mc" and "_root.logo_mc"...

can someone paste the simplest code for printing a "landscape" page with these 2 ?
thanks a lot.

Simple Mx Print Function Question
Is this possible???

i have a flash movie that has 7 scenes. each scene has totally different content.i would like each scene to be printable only when the scene is reached.

[i thought i could put #p on each scene and it would only print the scene in view but not so. flash prints all frames with that label.]

tnx

Simple TextBox.Print Question
I want to print a dynamic text field & not the entire frame...

I would imagine it should be the following, but that doesn't work.

printButton.onRelease = function(){
print("textInstance.text");
}

I'm sure this is a simple problem, but I have been unable to figure it out.

Any help, greatly appreciated.

Justin

Simple One Page Print Function
Hi all

not getting anywhere with this - should it theoretically be printing correctly?

I just want to print the contents of loaded_mc;


Code:
if (Key.getAscii() == 13) {

var pj = new PrintJob();
var success = pj.start();
if(success)
{
pj.addPage("loaded_mc", {xMin : 0, xMax: 300, yMin: 0, yMax: 500});
pj.send();
}
delete pj;

}
But it appears to be doing not a whole lot...

Also, how could I double the size of the printed result, compared to what shows on the screen?

Cheers!

Adjusting Simple Button .y Losing Button Functionality
I'm trying to dynamically move a "more info" button right under a block of text based on the height of the text. The problem is when I move the button in code, the button is no longer clickable(??). I'm using the CS3 IDE and creating a simpleButton. simpleButton is supposed to inherit the displayObject class so I don't understand why this is happening. If I trace out the button reference, it traces [object SimpleButton]. I have a textfield named 'txt' and button named 'btn' on the stage.


Code:
btn.y = txt.y + txt.textHeight + 10

Print Action Doesn't Print Content In The Centre Of Paper.
I am wondering if there is any option to control how the content of the frame can be printed from Flash projector of a loaded movie clip.
The "Print" button resides in the loaded movie clip. Here is the code:

on (release) {
print("_parent.quiz", "bmovie");
gotoAndPlay("#p");
}

Shouldn't be any problem. When I print this frame from the loaded movie itself it is printed well. It printed all content exactly in a centre of the page. However, when I try to print this frame of the loaded movie from the main movie it moves all content to the right bottom side of the paper.
Any advice is highly appreciated.
Thanks!

PrintJob:: Is It Possible To Select Page No.to Print Directly From Print Dialog Box ?
I'm using PrintJob object to print multiple pages .
When the print dialog ( on pc) opens, under Page Range, the Current Page and Pages radio buttons are greyed out.
Is there a way to enable them so that users can specify what page to print directly from this print dialog box?

Any suggestion is appreciated,
Thanks!

I Want To Print A Picture Using Print() ; , Trouble With The Backgrund Color
using the print(); action script , the picture prints OK but the background color ends up wasting ink for the user's printer.

print("_root.instance" , "bframe") ;

1. I need that print out to be, over a white background.
Without actually changing the background color to white.


Thanks in advance

samy

Print Directly To Printer (bypass Print Dialog Box)
Does anyone know of a way to bypass the print dialog box when issuing the print command in flash? I am trying to write a flash application and it is nessesary to avoid printing multiple copies (dialog boxs gives the option of how many copies). Thanks!

I am working with flash 6.0 fyi.

How To Print From Flash Wihtout Print Dialog Box From Poppin
Is there a way in flash 8 to print from a flash button in where the print dialog box does not pop up? Im developing a kiosk app and I need th user to print the screen without having to select the printer. I also dont want the app sitting in a browser in order for it to auto print.

Any help would be great
thanks

Print Actionscript Vs Context Menu Print
I can't for the life of me figure out this oxymoron:

If I include a Print button in my flash movie, I can't seem to find a way in actionscript to print the current frame.

But, in the Flashplayer, if you right click and select Print, you can pick Selection, and it does prints the current frame.

(I need this selectivity, because I have a line of sofas being displayed between keyframes, and I don't want to print out all the sofas in the movies, just the one the user paused the player on)

If anyone has ideas about how to print the CURRENT frame, I'd love to hear it...

Using Print Function, Selecting Which Frame To Print?
I have an elearning tutorial movie built using flash, and each frame is navigated to with forward and back buttons. I want the ability to print certain frames, without having to convert what i want to print to separate movie clips or separpate levels and then targeting them. Is there anyway?

Thanks

Print Doesn't Print Variables, But Displays It ?
Q1. Dynamic values are passed to a print frame (say frame 10 of the main timeline). A movieclip in the

frame 10 contains 2 frames.
Q2. The dynamic values are passed correctly into frame 1 of the movieclip, but not frame 2 of the same

movieclip in the print movieclip timeline.
Also, when I move from frame 1 to 2 and back to frame 1,

the values in frame 1 are also not displayed in the dynamic text.
Q3. When the Print command is clicked, it doesn't print all the dynamic values. Say while giving print

command from frame 1, the values in the frame 2 are not printed. When I move to page 1 and page 2

backand forth, and then give the print command both of the values are not printed (but they are

displayed). Where is the problem?

<as>
Code:
first frame:

stop();
letter = "B";

for(i = 1; i<5; i++){
this["item"+i+"_txt"].text = "value"+i;
trace(i);
}

//code for the print button to transfer the values to the print page.
choose_btn.onPress = function(){
PBitem3 = item3_txt.text;
PBitem4 = item4_txt.text;
for(j = 1;j<3; j++){
_level0["P"+letter+"item"+j]= _level0["item"+j+"_txt"].text;
}
gotoAndStop("print");
}


print frame:
for(k=1;k<8;k++){
_level0["printable_mc"]["PBitem"+k+"mc_txt"].text = _level0["PBitem"+k]
}

print_btn.onPress = function(){
print(_root.printable_mc, "bframe");

}

</as>

Can You Use Print() To Print External Swf's That Are Not In The Library?
Can this be done.

If i have a swf loaded (but not in the library) can i use print() from another .swf and print my target file?

thanks

Print Button Shows Up On Print Out
how do you set a print button so that it does no show up in the print out?

Window.print() Or Document.print()
Hello,

I'm trying to print some text that is in a Flash page with a button in the swf. I have never done this before and was wondering if anyone could show me the proper way to do this.

Thanks!

Print Directly Without Print Pannel
I have a trouble, and i dunno how resolve them.

I wanna print, but when i do click i need the command PRINT directly (like word when you click in the icon print), but in this case, appears the window print pannel, i dunno how print directly (i dont wanna see the window print pannel).

this is my as, it is correct, but anybody how to give the action to print directly (whitout print window pannel).

is really hard, my brain is don now... im freeze

// The code
on (release) {
var imp = new PrintJob();
var resultado = imp.start();
//var resultado = true;
if (resultado) {
imp.addPage(_root, {}, {printAsBitmap:true});
imp.send();
} else {
trace("Fallo");
}
//delete imp;
}

Print 2 Levels In One Print-command
Hi,

What I have done is a print-window that lets the user choose which pages to print. This works fine when the user selects only one checkbox but when more then one page is to be printed the problems starts.

Each page is loaded onto a different level. I don't want to have to reload the movie-clips since I have variables in them that need to remain intact. I then make the movie-clips invisible so that only on appear at a time on the main time-line (frames 5-9).

The code so far for the print-dialog looks like this...

on (press) {
if (_root.utskrift.alla_checkbox.getValue() == true) {
print(???);
unloadMovieNum(8);
}
if (_root.utskrift.prog_checkbox.getValue() == true) {
print(_level1, "bmovie");
unloadMovieNum(8);
}
if (_root.utskrift.dd_checkbox.getValue() == true) {
print(_level2, "bmovie");
unloadMovieNum(8);
}
if (_root.utskrift.dh_checkbox.getValue() == true) {
print(_level3, "bmovie");
unloadMovieNum(8);
}
if (_root.utskrift.funk_checkbox.getValue() == true) {
print(_level4, "bmovie");
unloadMovieNum(8);
}
if (_root.utskrift.samm_checkbox.getValue() == true) {
print(_level5, "bmovie");
unloadMovieNum(8);
}
}

... where movie8 is the print-window. The first if-statement is for printing all pages and if you can help me witj tjis I will be satisfied.

Any ideas that you have will be grately appreciated. This is the last thing I have to do before the project is finished so please help me before I go mad.

If you could axamplafy with some code that would be grate since I'm not a used programmer.

Print Wants To Print A Page For Each Layer?
hi,

i'm trying to figure out why my print button acts like it does, i've read a lot of posts and Macromedia docs on printing.
i have a main file with a blank MC that has external swfs loaded into it. the ext swfs have dynamic data which i need to be able to print.
a print button (which is in the main timeline) will pop up the print options and ask if you want to print pages 1-30, or 1-7, depending on the swf that is loaded (it would ideally only give the option to print 1 page... a page with the data).
the print button uses
printNum ("_root.main", "bmovie");
(i've also tried the "printasbitmap", and just "print")
the empty MC ("main") has a bounding box with a frame labelled #b.
the external swfs have #p on the frames i would like to print, and i even tried !#p on other frames to try to prevent it from asking if i want to print multiple pages.

any suggestions or pointing to articles/tuts that focus on involved printing practices would be greatly appreciated.
thanks!

How Do I Add Functionality?
I need help adding functionaltiy to some drop down boxs. I use Flash 5 on a Mac. This is what I'm trying to achieve...In my site I ask the user several questions, they answer them by selecting the relevant answer in the drop down boxes. This part I have figured out. Now I need to use the info that was selected in a later scene. How do I do this?

Thanks in advance to all who reply.

AS Functionality
Hey all,
I currently use the code
onClipEvent (onEnterFrame){
if(this._alpha<100){
this._alpha+=5;
delete this.onEnterFrame;
}
}

Now I'm trying to learn to use AS the most efficient way I can, and I'm starting to try and understand 2.0. Now with this code, is it cleared out of memory when it plays through once with using the "delete this.onEnterFrame" call, or no. I'm trying to use all script now, and sometimes my projects get bogged down. I know it's not good to run things all at once, but say for instance, I have my main stage, and I try to load another SWF inside w/ some script on it, it slows down the project. I know this is kinda of a broad question. I guess just a start on understanding the whole onClipEvent function would be great.
Thanks
(cowboy)

How: B&O Nav Functionality
http://www.bang-olufsen.com/web2/com...on=competences

Hi folks

I am attempting to get the same effect of button rollover= submenu.
But, I can't seem to get it "not" to make the submenu jump up again after a particular submenu has been revealed. Instead, the onRollover is called.

So, How do you get the main nav button to know no to reactivate the sub when the main is rollover again?

Can I do this with a variable? If so, "How" is this done??

Thanks!!

wnf

No Functionality
When I try to scale my flash file down using publish settings (make is smaller by percentage) - none of the buttons work, some of the sounds do not play, etc.  Is there an easier way to do this?  Please help

Jonathan

Map Functionality
i'm sure this is pretty easy, but my actionscript skills arent sufficient enough...

i want a map to scroll in eight different directions according to the 8 buttons the user can press. the map should scroll in the opposite direction of the arrows. let me explain: if the user presses the top-left button, the map should scroll bottom-right, if he presses the top arrow, the map should scroll to the bottom, if he presses the top-right, the map should scroll to the bottom-left, etcetera, this continues in all eight directions: top, right, bottom, left and four diagonal directions. on top of that the scrolling of the map should stop at a certain point. eg; the map is something like 1200 pixels wide and if the user scrolls all the way to one of the sides of it, it should stop scrolling.... now i have no idea how to do this. can someone help me out with this?

btw does anyone know of some good resources on how to add mapfunctions? loading and placement of dynamic content on the map is mostly what i need to know...

thanks!!!!!

How To Print Without A Print Dialog Box?
Hello,

I need to know how to print in flash without a windows "print dialog box" pop up??

Please Help Me...


Thanks

Not Able To Print More Than 5 Pages In One Print Job.
I am not able to print more than 5 pages in one go. I want to print almost 12 pages in one print job. I am creating the movieclips of each page by adding the dynamic data in to it and store in an array. When all the movieclips created and stored in an array(pagesAry) then it call the following function to print those pages:

private function sendToPrinter():void
{
pj = new PrintJob();
try
{
if(pj.start())
{
for(var n:Number=0; n<pagesAry.length; n++)
{
pj.addPage(pagesAry[n]);
}
pj.send();
}
}catch(e:Error)
{
// handle error
}
}

Getting error: Print job canceled as it took more than 15 seconds to complete.

Has anyone a idea?

Thanks for answeres.





























Edited: 12/19/2008 at 11:33:18 AM by atul_kamboj

Screen Functionality
Hello,

I would like to build kind'a TV which titles run in it, can the text in the titles be loaded from TXT file ?

Thanks,
Maya

Pop Up Windows For Functionality
I'm trying to create some pop up windows for some site interactivity, and want to place basic forms inside them so that I can have my viewers enter important info into the editable feilds and then click a button to send it to my e-mail address...

Commonly done in websites, but need knowlege on how to pull it off.

I have an online automotive/entertainment site, and the pop up windows wil help in the overall design element.

especially when I throw a viewer poll, or am running a contest.

Buttons Functionality
Hi,
I need a little help regarding mobile type key's functionality in flash.
The implementation is the single button should be used to type three alphabets. The last press should be considered and that alphabet should be shown.

Please let me know your comments.

A Bit Of A Functionality Disappointment
Hi, I'm trying to use scroll panes, but with sharp dynamic text.

I can't believe that the people at MM think that embedded fonts are clear enough to be used for the majority of content.

I'm trying to get this a little clearer, but it's impossible.

I would just use html, but this has to be an exe that's browser independent, with video, animations etc.

Can anyone think of a way of using clearer text?


I have tried using covers, which do cover the text as it goes up. But, I have four of these boxes, and using covers means that the bottom two's text will move above the top two.

Ahhhhhh.....

M@

Swf Loses Functionality As MC
I have a scrollbox that I am trying to drop in as a SWF, using this code:

loadMovieNum("applist.swf",1);

This works fine. Scrolls and everything. But I don't like where the default position is. So I need to place it using Actionscript. As far as I know, this would mean creating an empty MC dynamically, like so:
on (release) {

this.createemptyMovieClip("emptyMC",1);
emptyMC._x=50;
emptyMC._y=50;
loadMovie("applist.swf",emptyMC);

}


the problem is that when I put it into an empty MC, the scroll no longer works. It will position just fine, but loses functionality. Any ideas what is happening?

Thanks in advance!

Dual Functionality
I am using all flash MX and an all cd-rom based platform

Here is my code. This functionality is correct and is on a button, but I would like to add another functionality to it. I would also like for the movie to open a web page at the same time. http://www.ichp.edu How would I add that to the current script?

on (release) {
gotoAndPlay("main2", "menu");
stopAllSounds();
}

Thank you in advance
Christian

Realvast.com - Functionality
When you click a button, the background fades out, then the new one fades in..how do they do this? I only know how to click one, and the old on just dissapears (levels), but how do you do it so that it fades the current one and puts in the new one?

Right Click Functionality
Is there a way to add right click functionality to a swf...

I.E. can I have a button that will go to a label on release of the left button and also go to a URL by clicking the left button?

Thanks for any help you can provide,

Best,

Joe

Copyright © 2005-08 www.BigResource.com, All rights reserved