![]() |
|
||||||||||
|
|||||
|
[+4 28.08.08]
Регистрация: May 2007
Сообщений: 11
|
Добрый день.
для начала скажу что -я не особо шарю в экшн скрипт(тока примитив) -юзал поиск(всевозможные форумы и тп) суть вопроса такова идет презентация, на определенном кадре стопица - вылазят поля для ввода текста и все такое нужно при нажатии кнопки чтобы пошла печать именного этого кадра(всего что видно как бы) я патался использовать 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
пробовал стандартную простую но он хочет печатать все кадры (если указать нужный то все отлично, но нужно чтоб сразу печатало тот на котором застопено) читал про какие то #p (типа номер или лейбл кадра - но не пропускает - пишет ерор) чтобы не изменал в стандартном printNum - все время хочет печатать все кадры... помогите пожалуйста |
|
|||||
|
[+4 28.08.08]
Регистрация: May 2007
Сообщений: 11
|
up!
up! |
|
|||||
|
Et cetera
Регистрация: Sep 2002
Сообщений: 30,787
|
|
![]() |
![]() |
Часовой пояс GMT +4, время: 20:28. |
|
|
« Предыдущая тема | Следующая тема » |
|
|