MX2004 + TextArea Component
I've got a flash animation where i load text in from a txtfile by using
"loadVariables("part1.txt", "_root");"
it works when i put it into a dynamic text box... but unfortunately it has more text than can fit, so i need a scroller... HOW CAN I USE the "TEXTAREA" component to read in information from a text File...
PLEASE HELP... THIS IS URGENT
FlashKit > Flash Help > Flash ActionScript
Posted on: 09-14-2003, 11:09 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Textarea MX2004 Component Issues
I'm having difficulties getting a MX 2004 textarea component to dynamically resize and still display the scroll bar. Here is the code I'm using:
Code:
Stage.align = "LT";
Stage.scaleMode = "noScale";
myTextArea.text = "If there is to much about text, then it should reflow to the size of the movie. ";
myTextArea.text += myTextArea.text;
myTextArea.text += myTextArea.text;
myTextArea.text += myTextArea.text;
myTextArea.text += myTextArea.text;
myTextArea.text += myTextArea.text;
myTextArea.text += myTextArea.text;
stageListener = new Object();
stageListener.onResize = function() {
myTextArea.move(10, 10);
myTextArea.setSize(Stage.width-20, Stage.height-20);
};
Stage.addListener(stageListener);
This works fine in the authoring player but when embedded in IE, the correct resizing of the textarea occurs but no scroll bar appears to allow the user to see the rest of the text. If I substitute a constant for the height in myTextArea.setSize it works properly. Could this be a bug with the component?
I'm using 100% for the height and width as well as the noscale parameter to embed the flash file in IE.
[MX2004] TextArea Component Does Not Display Data.
I created a simple flash doc as follows:
1 txtArea with instance name: testTxt
======================
on 1st frame of action layer I put in the code:
==================================
// load text file
var exData:LoadVars = new LoadVars();
exData.onLoad = function(success) {
if(success) {
_root.testTxt.txt = exData.txtTest;
} else
trace("Load failed");
}
exData.load("../xml/test.txt");
stop();
my Text file is: test.txt
==================
txtTest=This is a test, blah. blah,blah.....
Running in the debug mode I can see that the data is being loaded correctly
but it does not display in the textArea at all. Any Ideas ???? please advise
Help With TextArea Component Calling Javascript From Link In TextArea
Can anyone help me?
I have a TextArea Component that gets populated from a XML. I have the text with links and I want to be able to click on the link and call my javascript on my page. Can I do this? of what will I need to do to accomplish this. if you can provide an example that would be great.
Thanks in advanced
Load External Txt To Mx2004 TextArea
Please help me... I'm dying... I've spent 6hours on this littel problem!!! I though it would be easy... Butt noooo....
My problem is getting the external txt file loaded into the textarea component. Thats it... So why can't I get it right. I'm hoping someone can give me the code for the frame, and discribe what I have to do with that pain in the a** component.
I've also made a "typewrighter" script for the txt texst, will that be able to run on a component? Does anyone have a textarea "typewrighter" script, or can tell me how to do it.
Thx
Thomas
Load External Txt To Mx2004 TextArea
Please help me... I'm dying... I've spent 6hours on this littel problem!!! I though it would be easy... Butt noooo....
My problem is getting the external txt file loaded into the textarea component. Thats it... So why can't I get it right. I'm hoping someone can give me the code for the frame, and discribe what I have to do with that pain in the a** component.
I've also made a "typewrighter" script for the txt texst, will that be able to run on a component? Does anyone have a textarea "typewrighter" script, or can tell me how to do it.
Thx
Thomas
TextArea Component
I was able to disable the borders of the textArea component using the
following action script
textArea.setStyle("borderStyle", "none");
But this created a new problem. Now when I select the text or hi the
scroll bar I get agreen "glow" or highlite where the borders would be.
Anybody have any suggestions
...may you see that on http://www.agenciax.com/clientes/lima_netto/ , when this load click on "escritorio" button on top menu in portuguese version.
TextArea Component
I have a dynamic textArea component. When I load new text into it, the scrollbar stays where-ever it was last positioned - is there a way to make it return to the top everytime? Does it ususally return to the top for everyone else?
Thanks
Jessica
Textarea Component
Hi
I have a movie that contains a textarea component. I am loadind in text from a database via php.
If I run the movie on its own it works perfect. But if I load it into an empty movie clip or a level the scroll bar goes erratic and for some reason when you click on the scroll bar the text inside gets selected.
I have tried to use a plain textbox but cannot get the text formatted using html as with the textarea, code below.
var lv = new LoadVars();
lv.onLoad = function(ok) {
if (ok) {
var i = 0;
while (this["id" + i] != undefined) {
noticeboard_txt.text +="<br><br><br><b><u>"+this["titles"+i]+"</u><br><br></b>" +this["news"+i]+"<br>" +"<b>"+this["author"+i]+"<br>"+this["date"+i];
i++
}
}
}
lv.load("noticeboard.php");
// Make background color transparent
noticeboard_txt.depthChild0._alpha=0
Thanks for any help.
TextArea Component
Hi,
I was just wondering if it is possible to load a .txt file into a TextArea component? I 've tried this:
Code:
loadtextContent = new LoadVars();
loadtextContent.load("Bio.txt");
this.BioText.text = loadtextContent;
but it doesn't work. Could anyone help?
Thanks
Jay
TextArea Component In _mc
Is there an issue with using a textArea or textInput within a movie clip?
i am placing a textArea onto the stage of a mc (which is then placed on the timline of my scene )and then trying to import text from a *.txt file into it. I have tried various actionscript codes with both plain text (not favoured) html text and XML text files (preffered as I wish to formatt the text) without any luck.
I debug the actionscripts without any errors being generated but the text will not appear in the textArea component...or the component even be viewed when the movie is tested or previewed in a browser???
complete newbie so be gentle please
TextArea Component
I just noticed this is a similar title to another post I made, but rest assured the content is different.
If you go to:
http://www.westerndaytraders.com
You can see that there is a Flash TextArea component that is fetching posts from the Forum (through XML formatted by PHP). To view the XML that Flash is using, go here and view source. Perfectly formatted XML.
Now, as you probably noticed from the main page, the formatting in the news box is way off. The paragraph spacing more specifically is more than double what it should be. If you look on the forum in the 'news' section, you can view the post and see that it is formatted properly.
If anyone has some insight, please let me know.
Oh, before I forget, here is the code on the TextArea (well, not on it, but pertaining to it):
PHP Code:
txtShows.setStyle("borderStyle", "none");
txtShows.setStyle("scrollTrackColor", "0xFCF69A");
txtShows.setStyle("buttonColor", "0xFCF69A");
txtShows.html = true;
//LOAD THE XML DOCUMENT FOR NEWS
_root.onLoad = load_xml();
function load_xml() {
System.useCodepage = true;
myXML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = function(success) {
//CALL SHOW_NEWS FUNCTION
show_shows();
};
//LOCATION OF XML DOC
myXML.load("admin/news_puller.php");
}
function show_shows() {
for(var i=0; i<myXML.firstChild.childNodes.length; i++) {
//RENAME CHILDNODES WITH VARIABLES
date = myXML.firstChild.childNodes[i].childNodes[0].firstChild;
subject = myXML.firstChild.childNodes[i].childNodes[1].firstChild;
user = myXML.firstChild.childNodes[i].childNodes[2].firstChild;
userurl = myXML.firstChild.childNodes[i].childNodes[3].firstChild;
news = myXML.firstChild.childNodes[i].childNodes[4].firstChild;
comments = myXML.firstChild.childNodes[i].childNodes[5].firstChild;
url = myXML.firstChild.childNodes[i].childNodes[6].firstChild;
//EMBED XML INFO INTO NEWS_CONTENT TEXT AREA
txtShows.text += "<font family='verdana' size='12pt'><b>"+subject+"</b></font><font size='10pt'><br>Posted By </font><font color='#336699' size='10pt' family='verdana'><u><a href='"+userurl+"' target='_blank'>"+user+"</a></u></font><font family='verdana' size='10pt'> on "+date+"</font><br><font family='verdana' size='13pt'><pre>"+news+"</pre></font><br><font color='#336699' size='10pt' family='verdana'><u><a href='"+url+"' target='_parent'>"+comments+"</a></u></font><br><br>";
}
}
[F8] Please Help W/ TextArea Component
i've searched this forum but cannot seem to find a relevant solution to customize the textArea's scroll bar.
any tutorials on how to customize the textArea's scroll bar will be greatly appreciated.
thank you
TextArea Component
Hi,
I have used TextArea component in flash (mx/2004) by using built in components of flash. I have set html to true for the html text to be displayed by XML. But I think only some of the tags are supported with this component. Tags like table and other supporting tags are not displayed properly in textArea component. Then what could be the solution for the same.
I have tried to put the following text -
my_textArea.text ="<table border='2' cellspacing='5' cellpadding='5'><tr><td>first</td><td>second</td></tr></table>"
but table with border is not diplayed at all. Kindly help me in the same as early as possible.
Thanks in advance,
Shreeram
TextArea Component CS3
I've searched the net, joined Safaribooksonline, bought Colin Moocks Essential Actionscript 3.0 & Actio0nscript 3.0 cookbook and nowhere can I find out how to apply an imported css stylesheet to a CS3 TextArea component. I used to do this all the time in AS2 and it worked a treat. The only help I can find in the CS3 authoring tool and in live docs relates to AS2 which causes errors in my AS3 class. I'm building a custom TextAreaManager class for my general use. If anyone knows how to do it please let me know.
Thanks
Dave Towers
TextArea Component AS3
I'm having trouble both working out or finding out how to apply an imported css file to the CS3 TextArea component. I've frequently done this in AS2 using Flash 8, but that code no longer works. If anyone knows could you please let me know. Here's the AS2 code I've used previously:
private function loadCss(){
var myStyle = new TextField.StyleSheet();
myStyle.load(this.CssPath+".css"); // the CssPath variable here was supplied within an object passed through to the constructor
textArea.styleSheet = myStyle;
loadXml();
}
TextArea Component
Is it possible to use a TextFormat object to set the text format of a text area component? Thanks .
TextArea Component
I have inserted a TextArea component and i can add text normally by changing it in the parameters tab. but i was wondering if anyone knew the code so i can make it show and input text field ? (call a .txt file in to the TextArea component) is this possible if so can u please show me the script thanks alot. Jimmy
TextArea Component Help
Hello, I'm importing text into a TextArea component and it all works fine and dandy. Though I want the textarea to not form a scrollbar but to actually just keep adjusting its height so there is never a scrollbar. I looked through all the properties and I have no idea what to test for to see if there is a scrollbar.
can anyone help?
Textarea Component
Hi,
I am using the TextArea component (MX2004). I have set the html setting to true and have entered my text. However, despite numerous attempts with different bits of code, I can’t get the font to be veranda, 10pt and red. I thought this would be a straightforward process. Does anyone have any suggestions?
Thank you for you time and help
rich
TextArea Component
hey is there any way that i can make the background of a textArea component transparent or invisible?
TextArea Component
Last edited by swaze : 2006-01-28 at 10:10.
I have two TextArea's in a movie, they're both attached to the same style sheet. Why does one work and one not? The TextArea for the FAQ's (link at the bottom of the screen) works. But the CSS for the TextArea on the 'About Us' page does not work. They both use the exact same code to link to the CSS.
This is the About page:
myStyle = new TextField.StyleSheet();
myStyle.load("flash/msjenkins.css");
_root.yellow.About.styleSheet = myStyle;
This is the FAQ page:
myStyle = new TextField.StyleSheet();
myStyle.load("flash/msjenkins.css");
_root.faqf.TextHolder.styleSheet = myStyle;
Does anyone know why the About page wouldn't work?
UI Component TextArea And CSS
Hi There
Does anybody know, if I can use CSS in the TextArea Component?
If yes, how?
I know that this should work with TextField, but I prefer the TextArea Component because of the scrollbar stuff.
Cheers
}-^°>
TextArea Component Fontsize
How can i set the font size of one single component like the textarea
component ?
I can't seem to set the font size
With globalstyle i can but then all components get that size
thanx in advange...
Assenoost
Flashmx2004 Textarea Component
Hi,
I am using the textarea component, where you put text into the box with myTextArea.text ="blah" this works fine but I want to put the contents of a text file into the textarea.
I have a text file with htmlTXT= blahhh which loads fine into a standard text box from the flash toolbar when i have defined a variable for it to contain with the same htmlTXT name.
So the question is how do I load this variable so I can put it inside the textarea component, I have tried but keep getting undefined in the text area.
liam (tearing my hair out)
MX 2004 TextArea Component
Does anyone know how to load an external .txt or .html file into the textArea component found in Flash MX 2004, or do I have to load it into a Dynamic Text Box?
TextArea Component Characters?
I'm using MX 2004 Pro. How can I set the characters that are displayed in a text area component? I have some text loaded in dynamically but special characters like % don't show up. Any ideas?
Loading PHP Into A TextArea Component
Ok I've made a working blog using PHP, MySQL, and Flash MX 04 Pro. Right now my blog displays in a dynamic text box with the var "content". I would like to make it appear in a textArea component because then in the future I'll be able to upload pictures and .swf's for display inside my blog. Can anyone help me figure out how to display the information in a textArea component? I would greatly appreciate it.
I've attached a zip with all the necessary files, including the dump SQL for the database if you want to use it. Thanks all.
TextArea Component Gone Berserk
Ok I've got a textArea component on the stage. I have a PHP script that returns data from a MySQL database formated and sent to Flash as the variable "content". I couldn't figure out how to assign a textArea a variable name, unfortunately it's not as easy as with a dynamic text field, so I created my loadVars function and pointed it at the instance of my textArea component. For the first time it worked....sort of. I can see the text but there's all sorts of symbols breaking it up and screwing up the format. Check out what I mean....Blog . Anyone know how to make this work? Here's a link to my site where you can download all the necessary files to work with, I couldn't attach them cause they were too big.download link
TextArea Component: Border
Using FLASH MX PRO 2004
ok i've figured out how to change the backround color, and change the text color (using CSS) with this component...
now how do I change the color of the BORDER around the text?? or take it off even??
i've tried the help files within flash
(textArea.border= "false")
and all variations of this!
textArea.setStyle("borderColor", "black");
and all variations of this as well...
i can't figure this out, somebody help me out.
thanks
TextArea Component Question
How do I make the background transparent? I know that if type in myTA._alpha=0 it'll make it transparent but then the scroll bar disappears too.
Textarea Component Problems
Hi there,
I've just made the switch to MX 2004 and so far I'm distinctly underwhelmed by the new version; within minutes I have run into problems with the new v2 textarea component.
My problem is this:
I'm having trouble embedding fonts for the textarea component in my movie. Does amyone know how to do this? (And not embedding fonts for ordinary textfields as that is simple in properties or actionscript)
To give some context this is what I'm building:
I'm building a Q&A app which loads questions from an XML doc, these questions contain very basic html formatting (bold, italic, paragraph).
I built the original version of my app in MX. In MX I had multi-line textfields with scrollbars attached, fonts (verdana) embeded turned on and unused blank textfields off stage to embed bold and italic versions of the font. The result of this was a textfield with anti-aliased verdana text and html formating.
It is this that I want to re-create in MX 2004 with textarea component.
Any help would be much appreciated.
MX 2004 TextArea Component
I'm pulling in some XML to appear in the MX 2004 textArea component. No problems there. What I need to know is how to make the text in the component appeare as embeded font outlines (softer rather than sharp, like it does in a static text box). I've tried using actionscript to define the components style, but no dice on the font outlines.
Any ideas?
TextArea Component Problem
Hi,
Flash MX 2004. Using the TextArea component looked simple enough yet I'm having a problem with this. If I create a new movie, place an instance of the TextArea on the stage, name the instance "Comments" then in the properties inspector enter some text in the "text" field (Parameters) - then preview it, everything works.
But when I do this again and place the TextArea inside an MC, then preview my file, it dissapears...... What am I doing wrong?
Please help,
Thanks
:-)
Luke
TextArea Component Question
I have a TextArea component loading external text:
Code:
description.textField.selectable = false
description.setStyle("borderStyle", "none");
description.depthChild0._alpha = 0;
myStyle = new TextField.StyleSheet();
myStyle.load("port/home_work/hometext.css");
this.description.styleSheet = myStyle;
thisText = new LoadVars();
thisText.load("port/home_work/hometext1.txt");
thisText.onLoad = function(success)
{
if(success)
{
description.text = thisText.myText;
}
}
Is there a way to turn off the thin green line that appears when the TextArea is clicked on and becomes in focus? Not sure why the TextArea is still able to be selected since the "selectable = false" code exists.
Thanks much!
Flash Textarea Component Help
Few problems I have with the textarea component, and I need help real quick pleeease?
Number 1. Is there any way I can load a large amount of text stored in a TXT file into the box on the click of a button?
Number 2. Does textarea support scroll bars?
Number 3. Can I alter the colours of the textarea?
Please pelase please help!
Styles For TextArea Component
Hi everyone,
Can any one tell me why the myTextArea.setStyle("color", 0xFFFFFF), that supposed to change default color of text does not work for the TextArea component in 2004? I'm using actionscript 2.0.
Actualy the only property that works for TextArea is the "backround"... For some reason "color" property works for ListBox on the same timeline... And yes, I did double checked that I did not misspelled the instance name of the component...
Thanks for your time,
Peter
TextArea Component Difficulty
I’ve stayed clear of Components for as long as i can because i find them really hard to customise but I’ve realised there useful and had another go.
so...I’m trying to customise a TextArea. I managed to do the scrollbar by importing appropriate things into the library and changing them. What I really want is a completely invisible TextArea (not including the scroll bar and text of course). Can anyone tell me the best way of doing that?
If not i would like to convert RGB colours to the colour code used when using styles eg '0x848384'.
thanks you your help.
TextArea Component Help Needed
Hello there. I am having a problem with the textarea component in flask mx2004. Here is the problem, when I use the textarea component in a mask the text does not show up. How do I get it to show up in a mask. I have tried everything I can think of and all the solution that I found on google and still no luck.
Thanks
TextArea Component Selectable
Hi there...
I have used a textArea component to import data from an xml file, and am wondering if there is any way to make the text in the textArea NOT selectable?
I would just put a blank, invisible button over top of it with a handcursor=false command, but the data being imported may or may not contain hyperlinks and if I cover it with an invisible button, the link won't work.
If anyone knows of any solution or work-around, I would really appreciate any pointers...
Cheers
G
Skinning A TextArea Component...?
I´m using a textArea component in my scene...I´ve imported the theme "SampleTheme.fla", edited the scrollBar assets and dragged them into my new *.fla.
Now - why aren´t these changes in my new *.fla when I run the movie?!
Is there any code I need to apply to my component on stage to make it use my modified theme?!
TextArea Component Problem
Hi, I have followed the flash-db tutorial to build a guestbook and I have finished it and the guestbook works except that the scrollbar in the TextArea component is not working as it should. When you push the next button and then the down arrow on the scrollbar it jumps to the bottom of the page and all text is selected. The scroller also gets stuck at the bottom untill you drag it loose with the bar or scroll with the mousewheel.
Has anyone a solution for this or is it a "bug" in the component?
TextArea Component And Images
When I try to use in image, I'll use this as an example.
PHP Code:
myTextArea.text = "<a href="http://dsp.blueidea.com/thinkfuse/articleimg/013/013.jpg"><img src="http://dsp.blueidea.com/thinkfuse/articleimg/013/013.jpg"></a><br>Hello!";
The text, Hello! appears on the right of the image, not under it, I don't know what is causing this problem, any ideas?
TextArea Component = String?
hi,
ok say i have the following code:
myString= new String("poo poo")
how would i make the text area display the string?
thanks,
zlatan..
|