Форум Flasher.ru

Форум Flasher.ru (http://www.flasher.ru/forum/index.php)
-   ActionScript 1.0/2.0 (http://www.flasher.ru/forum/forumdisplay.php?f=93)
-   -   Print (http://www.flasher.ru/forum/showthread.php?t=115360)

NapalmDeath 27.08.2008 18:08

Print
 
Добрый день.
для начала скажу что
-я не особо шарю в экшн скрипт(тока примитив)
-юзал поиск(всевозможные форумы и тп)

суть вопроса такова
идет презентация, на определенном кадре стопица - вылазят поля для ввода текста и все такое

нужно при нажатии кнопки чтобы пошла печать именного этого кадра(всего что видно как бы)
я патался использовать
Код:

function fc_pageAttributos( width, height, str ):Object
{
this.createTextField( "txtInstance", //txtInstance
1, //depth
0, //_x
0, //_y
width//width,
height //height
);

this[ "txtInstance" ].setTextFormat( _root.txtFmtResources );
this[ "txtInstance" ].antiAliasType = "advanced";
this[ "txtInstance" ].multiline = true;
this[ "txtInstance" ].wordWrap = true;
this[ "txtInstance" ].html = true;

//this[ "txtInstance" ].styleSheet = this.CSS;
this[ "txtInstance" ].htmlText = str;

//find how many lines are visible...
var linesVisible = this[ "txtInstance" ].bottomScroll;

//get the total curent amount of text lines...
var totalLines = this[ "txtInstance" ].maxscroll - 1 + linesVisible;

//find how many lines are required to make all text scroll perfectly in sets of linesVisible.
var numberOfTextPages = Math.ceil( ( totalLines / linesVisible ) );
var linesToFit = ( numberOfTextPages * linesVisible ) - totalLines;

for( var i = 0; i < linesToFit; i++ )
{
this[ "txtInstance" ].htmlText += "<br>"
//if textfield is non-html, use "\n"
}

//now total number of lines is a multiple of linesVisible!!!!
totalLines = numberOfTextPages * linesVisible;

return {linesVisible:linesVisible, numberOfTextPages:numberOfTextPages, txtInstanceRef:this[ "txtInstance" ] };
}


//now here is the code that is calling the function above to get the extra
//space, and now this code will required to find how many lines are
//necesary to scroll and show the content for the next printout page. orale..

function fc_doThePrint()
{

this.pJob = new PrintJob();


if (this.pJob.start())
{
var wMargin = this.pJob.paperWidth;
var hMargin = this.pJob.paperHeight;

//change the textfield inside this clip to reflect the available printing area
var objPrint = fc_pageAttributos( this.pJob.pageWidth, this.pJob.pageHeight, "your string value goes here" );


//now we scroll each time we print the next page to display.

for( var i = 0; i < objPrint.numberOfTextPages; i++ )
{
objPrint.txtInstanceRef.scroll = ( i * objPrint.linesVisible ) + 1;
pageAdded = this.pJob.addPage( this, {xMin:0, xMax:this.pJob.pageWidth, yMin:0, yMax: this.pJob.pageHeight } );
}//end loop
}//end if
}//end function

с оф сайта - ничего не понимаю что там написано - на печать отправляло, но не печатало (то есть в выборе страниц и принтера вроде все ок, а дальше - нчиего)

пробовал стандартную простую
Код:

on (release) {
        printNum(0, "bmovie");
}

но он хочет печатать все кадры (если указать нужный то все отлично, но нужно чтоб сразу печатало тот на котором застопено)

читал про какие то #p (типа номер или лейбл кадра - но не пропускает - пишет ерор)

чтобы не изменал в стандартном printNum - все время хочет печатать все кадры...

помогите пожалуйста

NapalmDeath 28.08.2008 18:51

up!
up!

etc 28.08.2008 19:43

Цитата:

Сообщение от NapalmDeath (Сообщение 760864)
up!
up!

Плюс за ап.


Часовой пояс GMT +4, время: 00:21.

Copyright © 1999-2008 Flasher.ru. All rights reserved.
Работает на vBulletin®. Copyright ©2000 - 2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Администрация сайта не несёт ответственности за любую предоставленную посетителями информацию. Подробнее см. Правила.