A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: printing current screen in flash movie

  1. #1
    Member
    Join Date
    Dec 2003
    Location
    Cincinnati
    Posts
    34

    printing current screen in flash movie

    Hello,
    I have built a website for my company. wbk.com
    I have many hidden movie clips and dynamic content.
    I need to have a print command on the site.
    Is there any way to have a print button that when clicked will print what is shown on screen.

    Any help would be great

    thanks,

    Craig

  2. #2
    code:

    on (press) {
    print(_root.movieClipToPrint, "bmax");
    }



    ...check the help file under print() to see all parimeters

  3. #3
    Member
    Join Date
    Dec 2003
    Location
    Cincinnati
    Posts
    34
    My main timeline has more than one frame in it and when I try this it prints all frames.

    I just want to print the screen as it looks wherever you are in the timeline and whatever movie clips and dynamic text are loaded.

  4. #4
    print()

    Availability

    Flash Player 4 (4.0.20.0)

    Note: If you are authoring for Flash Player 7 or later, you can create a PrintJob object, which gives you (and the user) more control over the printing process. For more information, see the PrintJob class entry.

    Usage


    print(target:Object, "Bounding box":String) : Void


    Parameters

    target The instance name of a movie clip to print. By default, all the frames in the target instance can be printed. If you want to print specific frames in the movie clip, assign a #p frame label to those frames.

    Bounding box A modifier that sets the print area of the movie clip. Enclose this parameter in quotation marks (" or '), and specify one of the following values:

    bmovie Designates the bounding box of a specific frame in a movie clip as the print area for all printable frames in the movie clip. Assign a #b frame label to the frame whose bounding box you want to use as the print area.
    bmax Designates a composite of all the bounding boxes of all the printable frames as the print area. Specify bmax when the printable frames in your movie clip vary in size.
    bframe Indicates that the bounding box of each printable frame should be used as the print area for that frame, which changes the print area for each frame and scales the objects to fit the print area. Use bframe if you have objects of different sizes in each frame and want each object to fill the printed page.

    Returns

    None.

    Description

    Function; prints the target movie clip according to the boundaries specified in the parameter (bmovie, bmax, or bframe). If you want to print specific frames in the target movie clip, attach a #p frame label to those frames. Although print() results in higher quality prints than printAsBitmap(), it cannot be used to print movie clips that use alpha transparencies or special color effects.

    If you use bmovie for the Bounding box parameter but do not assign a #b label to a frame, the print area is determined by the Stage size of the loaded movie clip. (The loaded movie clip does not inherit the main movie clip’s Stage size.)

    All the printable elements in a movie clip must be fully loaded before printing can begin.

    The Flash Player printing feature supports PostScript and non-PostScript printers. Non-PostScript printers convert vectors to bitmaps.

    Example

    The following example prints all the printable frames in holder_mc with a print area defined by the bounding box of each frame:


    this.createEmptyMovieClip("holder_mc", 999);
    holder_mc.loadMovie("http://www.macromedia.com/devnet/mx/blueprint/articles/nielsen/spotlight_jnielsen.jpg");

    this.myBtn_btn.onRelease = function() {
    print(this._parent.holder_mc, "bframe");
    };


    In the previous ActionScript, you could replace bframe with bmovie so that the print area is defined by the bounding box of a frame with the #b frame label attached.

  5. #5
    Member
    Join Date
    Dec 2003
    Location
    Cincinnati
    Posts
    34
    I have one print button.
    It is clickable throughout my whole movie.
    There are many movie clips loaded on many levels
    What script should I put on the print button to do exactly as a print screen command would do. I want anyone to be able to print the screen at any moment in the website.

  6. #6
    Member
    Join Date
    Dec 2003
    Location
    Cincinnati
    Posts
    34
    I want this print button to do the same as if you right clicked (windows) control clicked (mac) and selected print from the dialog box.

  7. #7
    Senior Member
    Join Date
    Feb 2001
    Posts
    134
    *bump*

    I have exactly the same problem. Can anyone help?

  8. #8
    Junior Member
    Join Date
    May 2005
    Posts
    5

    print what is displayed on screen

    u can try following code:

    getURL("javascript:window.print()");

    this is useful only for webpages i.e, flash embeded in .html files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center