[MX04] Printing All Text In A Dynamic Scrollable Textfield
Hi, I have search alot about solutions for solving the problem about print all text in a dynamic scrollable textfield. There is no answer for this. So, is there a simpel, or any way to print all the text in a dynamic scrollable textfield? Not just the text you see on the screen.
Because the text is dynamic, there is possible that the text can be 1-100 printing pages long. So please don't tell me to resize the textfield to match textsize height.
Please help me out.
FlashKit > Flash Help > Flash ActionScript
Posted on: 11-15-2006, 05:52 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Printing All Text In A Dynamic Scrollable Textfield
Hi,
I have search alot about solutions for solving the problem about trying to print all text in a dynamic Scrollable Text. There is no answer for this. So, is there a simpel way to print all the text in a dynamic scrollable textfield?
Because the text is dynamic, there is possible that the text can be 1- 100 pages.
Please help me out.
niklas@bafe.nuniklas@bafe.nu
Printing Dynamic Scrollable Text
I create a dynamic scrollable text field with the following code. The variable "myinclude" in level1 is loaded from a txt file.
this.createTextField("scroll_txt", 1, 0, 0, 240, 360);
this.createTextField("my_txt", 1, 0, 0, 240, 360);
my_txt.multiline = true;
my_txt.wordWrap = true;
my_txt.html = true;
var my_fmt:TextFormat = new TextFormat();
my_fmt.size = 9;
my_fmt.font = "Arial";
my_txt.htmlText = _level1.myinclude;
my_txt.setTextFormat(my_fmt);
_parent.scrollUp_btn.onRelease = function() {
my_txt.scroll--;
scroll_txt.text = my_txt.scroll+" of "+my_txt.maxscroll;
};
_parent.scrollDown_btn.onRelease = function() {
my_txt.scroll++;
scroll_txt.text = my_txt.scroll+" of "+my_txt.maxscroll;
};
I use the following code to print this textfield. The problem is that it only prints the part of the scrolling text that is visible at the time. Is there any sollution to this? Please i am desperate as I have been struggling with this for weeks!!!
_root._print.onRelease = function() {
pages = Math.ceil(_root.printmovie._height/780);
// 780 is the height I decided to use here
var Do_print:printJob = new PrintJob();
if (Do_print.start()) {
var Height = 780;
var ymax;
var ymin;
for (i=0; i<pages; i++) {
//
ymin = i*Height;
ymax = ymin+Height;
Do_print.addPage(_root.printmovie, {xMin:0, xMax:595, yMin:ymin, yMax:ymax});
}
}
if (i>0) {
Do_print.send();
}
delete Do_print;
_root.printmovie.removeMovieClip();
};
Printing Multiple Pages Of A Scrollable Dynamic Text Box
I've seen a number of posts in this forum and others about how to print text out of a scrollable dynamic text box. Some people have come up with solutions like making another dynamic text box off-stage that is A4-size that contains the same text as the scrollable text box. The printJob() action then uses this text box as its target and prints a nice A4 page.
But what if there is so much text, it needs more than one A4 page to print? I've been searching for answers without much luck, but I did come across this:
ActionScript Code:
on (click) {//create PrintJob objectmyPrintJob = new PrintJob();//display print dialog boxmyPrintJob.start();var maxS:Number; //total number of lines in textAreavar botS:Number; //total number of lines visible in scroll box//loop through untill i have added a page for each scroll panefor (var i = 1; botS*i<=maxS; i++) {// add specified area to print jobmyPrintJob.addPage("_root.print_txta", {xMin:-36, xMax:612, yMin:-36, yMax:792}, {printAsBitmap:false});maxS = _root.print_txta.label.maxscroll ;botS = _root.print_txta.label.bottomScroll;//manually scroll the box_root.print_txta.vPosition = botS; }// send pages from the spooler to the printermyPrintJob.send();// clean updelete myPrintJob;}
Source: http://livedocs.macromedia.com/flash...=00001640.html
This would obviously be attached to a button, and is trying to print a text box named "print_txta" at the _root level. The trouble is, it doesn't work!.
I've tried changing it around a bit, like relocating the ending } of the loop, but still cannot get it to work. All it does is print the one page over and over (luckily I was printint to Adobe PDF, so I wasn't wasting paper! I recommend you do the same if you want to test the script!) and if you have more text than will fit on one A4 page, it ignores everything past the first page!
I wonder if anyone else on this board can make more sense out of the above script and perhaps get it to actually work in the way it was supposed to? I think this would benefit a lot of people out there.
[F8] Dynamic TextField - Text Selectable, But Not Scrollable?
Is it possible to have a dynamic text field where the text is selectable but not scrollable?
i have a textfield that isn't displaying its full contents. if someone selects the text and moves the mouse downward, they see more content. i don't want that to happen, but i like the idea of them being able to copy the text.
Printing Hidden Contents Of Scrollable Textfield
Hey guys,
Do you have any idea as to how to print the text inside a dyanamic textfield. now the problem is that the textbox is say 100/100 pixels and has a scrollbar attached to it and is set to multiline. Now is there a way to print all the text of the dynamic textfield.
Please respond ASAP...
[MX04] Calling In Text Into Dynamic Textfield From Xml File
I have been trying to call in text from a xml file to place this text into a dynamic textfield, but I can't seem to get it to display in the textfield. I have included the zipped file below. Thanks,
-edit-
Oops!
Here's the file. I wasn't able to include images because of the file size limitations.
Printing A Scrollable Text Field
I'm trying to print the contents of a scrollable text field. Why after all these years this is such an impossible task in Flash is beyond me. But maybe I'm overlooking something?
Right now I have two text fields. One for display and one for printing that is hidden from the user and is roughly the size of A4 paper. The content of the print text field is scrolled as many times as is necessary and each time is added to a print page.
The function looks like this:
function printText(e:MouseEvent):void {
var printer:PrintJob = new PrintJob();
if (printer.start()) {
txtPrint.scrollV = 1;
var intMaxScrollV:int = txtPrint.maxScrollV;
var intNumLines:int = txtPrint.numLines;
var intNumPages:int = intNumLines / intMaxScrollV;
var sheet:Sprite = new Sprite();
sheet.addChild(txtPrint);
for (var i:int = 1; i <= intNumPages; i++) {
printer.addPage(sheet);
txtPrint.scrollV = txtPrint.bottomScrollV + 1;
}
printer.send();
}
}
Unforntunately this is not very reliable because the size of the print text field does not correspond exactly to the size of the A4 paper and of course the print margins set by the user can differ as well. This results in an overlap of text between the different pages coming out of the printer.
Please, please tell me I'm overlooking something?
Printing A Scrollable Text Field
I am stuck on something and hopefully one of you can help. I have a dynamic text field that scrolls. When I print I can only print what is viewable on the screen and not all the text being scrolled. How do I print what is not viewable within the scrollable text field?
Oh yeah, and I don't want to parse the XML content and dynamic Flash conent into several diff frames to print like that since I am using 1 scroller to handle like 30 diff pieces of XML & Flash driven content.
Thanks
--aaronmatthew
P.S. This is a CD-ROM app and can't be posted.
Printing A Scrollable Text Field
I am stuck on something and hopefully one of you can help. I have a dynamic text field that scrolls. When I print I can only print what is viewable on the screen and not all the text being scrolled. How do I print what is not viewable within the scrollable text field?
Oh yeah, and I don't want to parse the XML content and dynamic Flash conent into several diff frames to print like that since I am using 1 scroller to handle like 30 diff pieces of XML & Flash driven content.
Thanks
--aaronmatthew
P.S. This is a CD-ROM app and can't be posted.
Printing A Scrollable Text Field
I am stuck on something and hopefully one of you can help. I have a dynamic text field that scrolls. When I print I can only print what is viewable on the screen and not all the text being scrolled. How do I print what is not viewable within the scrollable text field?
Oh yeah, and I don't want to parse the XML content and dynamic Flash conent into several diff frames to print like that since I am using 1 scroller to handle like 30 diff pieces of XML & Flash driven content.
Thanks
--aaronmatthew
P.S. This is a CD-ROM app and can't be posted.
Mx04 Scrollable Dynamic .txt & Embedded Font
Hi - its a question thats been asked loads but I can't find an answer on the forum (yet!). I have a portfolio site with a scrollable dynamic text field and it shows up the embedded font fine - (I downloaded it off kirupa). But when I export the movie as flash 7/ actionscript 2 it no longer works.
Has anybody else experienced this or does anyone have a sample .fla file they can send which uses an embedded font in a dynamic scrolling text field for flash 7/actionscript 2.
Alternatively if you know of a previous thread with the solution I would be grateful if you could let me know.
Thanks for the help - great site/resource by the way...Joey
Printing A Dynamic TextField
I have a dynamic text field with a UIScrollbar. I am have problems with printing the content of the textField. If I set the print function to print the textField I get the following error -
TypeError: Error #1034: Type Coercion failed: cannot convert flash.text:
Any help would be welcome
Printing A Dynamic TextField
I have a dynamic text field with a UIScrollbar. I am have problems with printing the content of the textField. If I set the print function to print the textField I get the following error -
TypeError: Error #1034: Type Coercion failed: cannot convert flash.text:
Any help would be welcome
Printing A Dynamic TextField
I have a dynamic text field with a UIScrollbar. I am have problems with printing the content of the textField. If I set the print function to print the textField I get the following error -
TypeError: Error #1034: Type Coercion failed: cannot convert flash.text:
Any help would be welcome
Printing A Dynamic TextField
I have a dynamic text field with a UIScrollbar. I am have problems with printing the content of the textField. If I set the print function to print the textField I get the following error -
TypeError: Error #1034: Type Coercion failed: cannot convert flash.text:
Any help would be welcome
Dynamic Textfield Printing And Linking
I have a dynamic textfield which i fill with HTML-text from an XML-file. This exceeds one page, and I would like to print it on several pages. How can I do this, when I use printjob.start it only prints one page...? And is it possible to track a word that is clicked? (to use as a link to other pages..)
Printing Dynamic Textfield Content
There have been some topics with this title but none of them seems to solve the problem of printing the dynamic text content which is by the way also a scrollable text. I manage to print only what is seen but not the whole text.
Is there anyone who could help. I am attaching my fla which is used only for testing purposes.
Thank you in advance
http://www.galahala.com/print2.zip
Dynamic Textfield Printing And Linking
I have a dynamic textfield which i fill with HTML-text from an XML-file. This exceeds one page, and I would like to print it on several pages. How can I do this, when I use printjob.start it only prints one page...? And is it possible to track a word that is clicked? (to use as a link to other pages..)
Images Embedded Within Dynamic TextField Not Printing
Not sure if there's already a thread on this, but my issue is that images that are embedded within a dynamic textfield via XML are not showing up when I try to print using PrintJob. The images are showing up properly within the textfield on the screen, but not in the print preview (and of course not in the final print).
The print functionality is fairly straight forward, I have a MovieClip that contains one dynamic textfield. The textfield is populated by XML and CSS files.
[MX04] Dynamic Textfield
hi there,
i'm preparing a presentation including some dynamic statistics. this stats are made with rectangles. the rectangles are motiontweens, which i made manually. and this is the problem: actionscript doesn't recognize a change of the square_mc._hieght, because the original suare is just scaled to a certain percentage.
Code:
var g:Number;
g = 0;
energy_consum_txt.text = g + square_mc._height;
i would like to put the different heights in a dynamic textfield, so you can see the data of my statistics (the heights of the squares are equal to my datalist). can i get the transformation-percentatge with actionscript? or what would you recomand?
(sorry for my bad english, i'm swiss and its in the middle of the night. noone is in the german forums to help me
greets
Vector Printing Of TextField. Part Of TextField Not Printing.
Hi, I hope somebody here can help me.
I have a movieclip with a dynamic textField in it.
I set autoSize = "center" and fill it with text.
Then, if i then use PrintJob.addPage("myPage", {printAsBitmap:false}); , the bottom few lines of the textfield don't print. (The textField shows up fine on the screen.)
The textField shows up fine if I use {printAsBitmap:false}, allbeit in lower quality.
If anyone can make a dynamic textField print properly as vector, please lemme know.
thx,
miguel3d
[MX04] Dynamic Textfield Issue When Compressing Swf
hi!
I have a template of mine (to publish a flash5 file) where I can embed a full font, including bold and italic styles, using two dynamic textfield (one for the plain font style, the other for bold and italic; both of them with the options to render html and to embed Uppercase, Lowercase, Numerals, Punctuation and some characters more: éèìòàù£$€). I want to use this template in a work where I don't have any swf player restrictions, so I would export it in flash7 settings and add "compress file" which reduces my file size to 180kb (from 280kb of the uncompressed version).
the problem is, once I compress the file some characters are not rendered (like òàùèéì)
is there any known solution for this or will I have to give up compressing the swf (then it works ok)??
thanks!
[MX04] Cannot Populate Dynamic Textfield On Another Level
Hi,
I have a swf assigned to a level (50) that gets all its data from an xml file. This swf assigns a value to a dynamic text located on another level (1000) using data obtained from the xml file which was parsed on level 50.
My problem is this:
If I hard code the value; it is visible on level1000.
Code:
_level1000.textValue_txt.htmlText = "sample text";
If, however, I use a value, stored in an array, from the xml data, I get nothing!?
Code:
_level1000.textValue_txt.htmlText = myXML[2];
What is the reason for this?
Thanks in advance.
T.
[MX04] Dynamic Textfield Display Problem On Levels
Hi All,
I'm having problems assigning values to a dynamic textfield on another level.
The text is parsed in one level e.g. level 50. This level then assigns this value to a dynamic textfield in another level e.g. level 1000.
The code used on level50 is as follows:
Code:
_level1000.myText.htmlText = "something";
I've used trace statements to track that this value is actually available to _level1000 and it is, but it just will not display.
This works if I assign the textfield on _level1000 but not when I do it from another level.
I know that when using masking with dynamic textfields, the font needs to be embedded, but this one has really flumuxed me!!
Thanks in advance.
T.
"GotoAndPlay" From Scrollable Dynamic Textfield ?
Hi
I have made a scrollable dynamic textfield with Html txt.
From that text I have to link to different URLs and to certain frames at my main timeline.
The URLs are no problem, - but how can I make a "hyper link" in a dynamic textfiled and go to a frame/label om my main timeline, like when I use "GotoAndPlay" on fx. a button?
Can anyone help me please?
I'm a designer and not much of a programmer, so please explain this in a basic way.
Thank you
K.
Scrollable Dynamic Text
hi guys, i neeed help.
I have a dynamic textfield where it read from from txt file.
the stage size has to be small so i would have to scroll the text
up slowly for the stage to show all the text.
The question is, how do i make it so that when the text is scrolling up, it will scroll in reference to the length of text i have in my txt.
Its like if i only have 3 lines of text, it will scroll till the third line and loop back to the first, and if i have 20 lines, it will scroll till the 20th line and loop back to the first.
Show me a sample file if possible ^_^
thanx guys!
Dynamic Scrollable Text
I have been searching the tutorials section on finding a good scrollbar to scroll dynamic text loaded from a .txt file. Does anyone know of a good one. I am looking for something similar to the one found at http://24-7media.de/ingram/
Thanks for your help
Dynamic Scrollable Text
I cannot seem to figure out what the problem is here. I am trying to make scrollable text on a movie clip that is within a few other movie clips. I put this on the first frame of my actionscript layer of my movie clip.
code:
loadtext = new LoadVars();
loadtext.onLoad = function() {
greg_about_txt.text = this.greg_about_txt;
};
loadtext.load("greg_about_txt.txt");
the second layer is my dynamic text box and my scroll component. I set the target of my scroll bar to the dynamic text box with the instance name "greg_about_txt." And I have a .txt file in the same folder as the .fla named "greg_about_txt.text." All I am seeing is the scroll bar and no text.
Dynamic Text - Scrollable
I am stumped. I realize that I need to have dynamic text in order to scroll it, but within a movie clip I cannot get dynamic text to be visable in my swf file. I can see Static text, but not dynamic text. I thought that it was a problem with the scrollBar component, but I cannot see any text. I had tried to load a .txt file externally, and it was really qwerky, some times it loaded some times it didn't, so I just decided to put the text in a scrollable text field. Any clue as to why the dynamic text is not visable. I can see it in my fla within the movie clip, just not in the swf.
Text Scrollable Without Being Dynamic?
when using static text blocks, can they be made scrollable without inporting a text file?
I am using empty MCs to load product information and photos from a side menu. Text is currently in a swf file but i have a few extended product descriptions now that will have to be scrollable.
If i have to load text variables in order to scroll i'll have rethink my approach. Thanks.
Help In Dynamic Scrollable Text
hi,
i need help in dynamic scrollable text.the dynamic text their are n number of topic,while selecting the topic it show the relevant
content or image..plz help....its possible
Scrollable Dynamic Text Question
I have some dynamic text boxes controlled by the flash scroll bar. The problem is that when I save the file, close it, and reopen it, the changes I made to the text box height isn't saved. What is going on here?
Confusion With Scrollable Dynamic Text...
Perhaps someone could clarify for a newb on how to create "scrollable dynamic text"? I have followed some of the tutorials listed on flashkit.com and various other sites. However, I am using Flash MX 2004 and most of the tutorials were built for Flash 6. I am more of Photoshop user than anything... but to get to the point. All I need is for two buttons (one up and one down) to move the text. I would also like for the text to be imported from a text file on load. The tutorials I have tried previously worked, but the text only scrolled up to a certain point... Hope I am making sense. If someone could direct me to a tutorial or give me some helpful information I would appreciate it. Thanks.
Ben
Scrollable, Dynamic, And HTML Text Box
Now I have seen and made scrollable dynamic content, as well as HTML dynamic content. HOWEVER! I have not been able to achieve SCROLLABLE, HTML-enabled, DYNAMIC text! I have scoured the web in search of a tutorial that explains this, as well as tinkering with every option from the previous attempts. If someone could pass on some knowledge, or point me to a tutorial, You would be my hero for a week! Maybe even a month!!
Anything that can help me figure this out would be awesome & THANKS for all posts!
-Nanascalala (dazed and confused)
Print Dynamic Scrollable Text
I create a dynamic text field using code below:
this.createTextField("scroll_txt", 1, 0, 0, 240, 360);
this.createTextField("my_txt", 1, 0, 0, 240, 360);
my_txt.multiline = true;
my_txt.wordWrap = true;
my_txt.html = true;
var my_fmt:TextFormat = new TextFormat();
my_fmt.size = 9;
my_fmt.font = "Arial";
my_txt.htmlText = _level1.myinclude;
//myinclude is a variable inported from txt file.
my_txt.setTextFormat(my_fmt);
_parent.scrollUp_btn.onRelease = function() {
my_txt.scroll--;
scroll_txt.text = my_txt.scroll+" of "+my_txt.maxscroll;
};
_parent.scrollDown_btn.onRelease = function() {
my_txt.scroll++;
scroll_txt.text = my_txt.scroll+" of "+my_txt.maxscroll;
};
I found below code on the web to print this:
_root._print.onRelease = function() {
pages = Math.ceil(_root.printmovie.my_txt._height/780);
// 780 is the height I decided to use here
var Do_print:PrintJob = new PrintJob();
if (Do_print.start()) {
var Height = 780;
var ymax;
var ymin;
for (i=0; i<pages; i++) {
//
ymin = i*Height;
ymax = ymin+Height;
Do_print.addPage(_root.printmovie, {xMin:0, xMax:595, yMin:ymin, yMax:ymax});
}
}
if (i>0) {
Do_print.send();
}
delete Do_print;
_root.printmovie.removeMovieClip();
};
Problem is that it still only prints the visible text and not all the scrollable dynamic text. Wish somebody can solve this once and for all, because I came accross a lot of people with the same problem, yet no workable solloution.
Clickable Scrollable Dynamic Text
Dear homiez,
I want to have a list of items that can be added to throughout a game persay (I was thinking like a function addItem(potion), but I'm not sure what the specifics are for said adding of text), and then I need them to be scrollable in their text box, and then I need them to be clickable, as if it were a button (the finger icon is not necessary). I'm not even sure if that last one can be done - can dynamic text be turned into regular link-button things?
My dearest apologies for asking questions that I'm sure is very, very obvious to anybody with text scripting experience. But I seem to have trouble searching for certain keywords in forums like these and help files in Flash.
Scrollable Dynamic Text Problem
Ok, I have this movie with dynamically loaded text... it is supposed to scroll when the text is too long.
When i test the movie in flash - it works; when i check it with the F12 button - it works.
However, when I publish it and upload to the server... it doesn't work...
what might be wrong?
Scrollable DYNAMIC Text Content?
anyone knows how to make a text scroller that can scroll dynamic text?
the tutorial in kurupa only supports static text.
please help!
Creating Dynamic Scrollable Text
How do you create dynamic scrollable text?, even if I select scrollable I still don't get a scrolbar, so I have to select the text and drag it down.
So how do you get the bar in the text?
Scrollable Dynamic Text Problem
Ok, I have this movie with dynamically loaded text... it is supposed to scroll when the text is too long.
When i test the movie in flash - it works; when i check it with the F12 button - it works.
However, when I publish it and upload to the server... it doesn't work...
what might be wrong?
Scrollable, Dynamic Images & Text
Hey,
I need to create a scroller which includes images and text. It is basically a news panel for a site that I am doing, and they want to include images and text for all news items.
I have done dynamic text before for sites, but it has always been pretty simple. I have a couple of concerns, and googling hasn't really answered any of my questions. Firstly, I want to know: Is it possible to have a scrollable field in Flash that contains both dynamic images and text? Looking at some posts both here and elsewhere, it appears that only Flash MX 2004 supports this, but it is buggy.
Secondly, does anyone know of any decent tutorials / sample movies / just general tips about how I would go about creating the attached design in flash (with the text aligning to the left of the image etc)?
Many thanks for your help!
Setting Text In Scrollable Dynamic Text Field
This is not really a question, though maybe someone can explain this behaviour.
1. Create a dynamic text field
(instance name: yadda_txt; variable: yadda)
2. Drag a scrollbar component on it
(target textfield: yadda_txt)
3. Set text
Method 1:
yadda_txt.text = "some very very long text... etc... etc...";
Method 2:
yadda = "some very very long text... etc... etc...";
If you use method 1, the scrollbar will become active.
If you use method 2, the scrollbar will NOT become active.
Is it because the target textfield is yadda_txt?
Perhaps the scrollbar is listening to events on yadda_txt?
I'm actually wondering if the scrollbar really is disabled, because I can't enable it with setEnabled(true);
Unless the scrollbar checks yadda_txt which is still quite empty.
Anyone know how any good Flash books?
Loading A Php-script Into To A Dynamic Scrollable Text-Box
Hello, i've got following Problem:
I'm loading a PHP-Script into a dynamic Text-Box and this works fine. I've got several Flash-Files with scrollbar for external txt-files. And they all work fine. But it doesn't work together.
I've got a formular for postal-codes. It has the variable "plz". I added following actionscript on a Go Button:
on (release) {
plz = plz;
land = "D";
link = "plz.php3?plz=";
tmp = link add plz add "&land=" add land;
loadVariablesNum (tmp, 0, "GET");
gotoAndPlay (50);
}
The Script returned me the with the varible "seek_result" the wanted text.
Now I just want to make this scrollable!!!
Who can help me? Thank You!
Best wishes
indamicx
Importing Text Into Scrollable Dynamic Field
hi guys
I've been trying to set up a dynamic text field with a scrollbar (from the flash MX UI components) that enables someone who hasn't got flash to upload a simple text file to alter the site's text content. I've created an empty text field on the stage and in the text options panel, selected Dynamic text, and Multiline. I've given the field the variable name "welcome" and on the first frame of the main timeline, added the code:
loadVariablesNum("welcome.txt",0);
my text file starts with welcome=........
My problem is that the text file seems to load up okay when trying it out on the preview, except that I can't use the scroll to see all the text. The system works fine when I manually copy and paste the text straight into flash so I don't think it's anything to do with the scroller setup. Any ideas? I'm a bit stumped!
cheers everyone in advance!
Embed Image In Scrollable Dynamic Text Box
Hey Guys - In Flash 8, I've got a Dynamic Text box that is successfully displaying my text in a vertical scroll. It is set to render as HTML and I'm able to format everything and it works fine.
Problem is I'm trying to embed an image using <img src="images/image1.jpg"> but it isn't working.
Does anybody have any ideas as to what may be going on ?
Thanks in advance for your time.
Starting Position In A Scrollable Dynamic Text Field
hello all
is it possible to set the starting position of a scrollable dynamic text field, for example in a chat where message are loaded for the top: when new messages are loaded, the scroll must be at the maximum bottom position, to read the last message...
thx
|