Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Loading Xml In TextArea



Hello,
i would like to load the information contained in a specific tag of my xml page inside a textArea component. The following code displays the entire xml page including the tags. Anybody know how to tell flash to display only the info from inside a specific tag?
code:
var xml:XML;

var urlRequest:URLRequest = new URLRequest("mlb.xml");
var urlLoader:URLLoader = new URLLoader();
urlLoader.dataFormat = URLLoaderDataFormat.TEXT;
urlLoader.addEventListener(Event.COMPLETE, urlLoader_complete);
urlLoader.load(urlRequest);

function urlLoader_complete(evt:Event):void {
xml = new XML(evt.target.data);
textArea.text = xml.toXMLString();
}


thanks



FlashKit > Flash Help > Actionscript 3.0
Posted on: 07-18-2008, 12:36 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Loading Xml In TextArea
Hello,
i would like to load the information contained in a specific tag of my xml page inside a textArea component. The following code displays the entire xml page including the tags. Anybody know how to tell flash to display only the info from inside a specific tag?
code:
var xml:XML;

var urlRequest:URLRequest = new URLRequest("mlb.xml");
var urlLoader:URLLoader = new URLLoader();
urlLoader.dataFormat = URLLoaderDataFormat.TEXT;
urlLoader.addEventListener(Event.COMPLETE, urlLoader_complete);
urlLoader.load(urlRequest);

function urlLoader_complete(evt:Event):void {
xml = new XML(evt.target.data);
textArea.text = xml.toXMLString();
}


thanks

Loading XML Into TextArea
Hi,

I have been experimenting with the 'Preloader and Transition for Dynamic Files' tutorial (http://www.kirupa.com/developer/mx/p...transition.htm).

It's a great tutorial and all works really well. I have tried to add some text to the external swfs using XML and the TextArea component, but with no success. The xml files load up fine into the external swf but when I try to load it in to the preloader-transition file the TextArea box appears but without any text. I have tried loading a variety of swfs into this movie, all with external text from xml or txt files, but always without success.

I would be greatful for any ideas.

Nick

Loading XML Into TextArea
Hi,

I have been experimenting with the 'Preloader and Transition for Dynamic Files' tutorial (http://www.kirupa.com/developer/mx/p...transition.htm).

It's a great tutorial and all works really well. I have tried to add some text to the external swfs using XML and the TextArea component, but with no success. The xml files load up fine into the external swf but when I try to load it in to the preloader-transition file the TextArea box appears but without any text. I have tried loading a variety of swfs into this movie, all with external text from xml or txt files, but always without success.

I would be greatful for any ideas.

Nick

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.

Loading XML In TextArea With Images
Hi Guys,
i have difficulty to monitor the progress of the XML data to be loaded into the textArea.

the scenario is simple... i am creating a textArea on fly and loading the XML, its load every thing fine..and even ProgressBar giving the feedback 100% loaded. BUT!!!! this but is the one Making my BUT..T painfull!!! images takes (there own) time to appear... which i dont want...

1. I need the progressBar on the TextArea to monitor the data (images) (bear in mind XML templete heve deffrent design on each node).

2. did any one try the Id method in XML in image node if try then how to:
read the deffrent images in deffrent location in (since we are using deffrent style on each Parent node) parent node :
For example:


Code:
<Temp 1>
<imageStyle><IMG align='left' src='Myimage1.jpg' id='1_mc' width='100' height='93' hspace='0' vspace='0'/></imageStyle>
<headline>My 1st Temp </headline>
<imageStyle><IMG align='left' src='Myimage2.jpg' id='2_mc' width='100' height='93' hspace='0' vspace='0'/></imageStyle>
<mainSummery><SPAN hspace='5' vspace='5'>This is my Temp 1.</SPAN></mainSummery>
</Temp 1>

<Temp 2>
<headline>My 2nd Temp </headline>
<imageStyle><IMG align='left' src='Myimage1.jpg' id='1_mc' width='100' height='93' hspace='0' vspace='0'/></imageStyle>
<mainSummery><SPAN hspace='5' vspace='5'>This is my Temp 1.</SPAN></mainSummery>
<imageStyle><IMG align='left' src='Myimage2.jpg' id='2_mc' width='100' height='93' hspace='0' vspace='0'/></imageStyle>
</Temp 2>

3. Before answring, let me tells you that i am writer and developer of CaptStudio and CaptPhoto, using pure XML and action scripts so its means i tried every thing in my control....

Loading New XML In Textarea With Actionscript
Hi Everyone,

I have managed to figure out how to load external xml text fine so far when the main flash file is loaded. I have 9 buttons and what I would like to do is have a different xml file loaded into the main textarea component for each of the nine buttons. Here is the link:

http://www.mailelani.com/test/Untitled-1.htm

The problem is that in order to acheive the rollout on the buttons I created them using actionscript and the buttons are in fact movie clips. It's all fine and dandy if I just want a link to open in a new page, but I'm having trouble reloading the xml files.

Here is the code that i've tried using on my actionscript buttons:

code:
this.onRelease = function(){
monthContent = new XML();
monthContent.ignoreWhite = true;
monthContent.load("update_archive/test.xml");
monthContent.onLoad = function(success)
{
if(success)
{
this.month.text = monthContent;
}
}
monthContent.load("update_archive/test.xml");

}


and the code that i use to load the innitial xml file:
code:
//init TextArea component
monthText.html = true;
monthText.wordWrap = true;
monthText.multiline = true;
monthText.label.condenseWhite=true;
//load css
monthStyle = new TextField.StyleSheet();
monthStyle.load("month.css");
monthText.styleSheet = monthStyle;
//load in XML
monthContent = new XML();
monthContent.ignoreWhite = true;
monthContent.load("update_archive/10_october_2005.xml");
monthContent.onLoad = function(success)
{
if(success)
{
monthText.text = monthContent;
monthText.vPosition = 0;

}
}


I'm pretty stuck and I've tried just about everything so any help in the right direction would be greatly apreciated

Maile

TextArea Not Loading Formatting
UPDATE : Problem resolved--seems to have been in the .txt files. Thanks for looking

I'm new to loading files in to flash...trying to load in two text files, one is a css formatting and the other is the content for a text area. What I have here doesn't seem to be loading in either file..they are in the same path as the .fla so I don't think it's a problem with finding the file
Could someone with more experience please take a look at this and tell me why it isn't working? Thanks very much!

ps-box.ta is a textArea inside of the box symbol.


ActionScript Code:
taStyle = new TextField.StyleSheet();
taStyle.load("textAreaFormatting.css");
box.ta.styleSheet = taStyle;

// Specify ta can hold html
box.ta.html = true;
// Specify ta to wrap text
box.ta.wordWrap = true;
// Specify ta to have a scrollbar
box.ta.multiline = true;

loadtextContent = new LoadVars();
// Load the text file into my movie
loadtextContent.load("newzContent.txt");
// Start a new function to load the text file
loadtextContent.onLoad = function(success) {
    if (success) {
        // loads the file into mytextbox
        box.ta.text = this.mytext;
        trace(this.mytext);
    }
}

Loading XML Into TextArea Component
what is the best method for loading external XML (and HTML) content into Flash and the TextArea component?

here is the requirement:

i have an image loader and a TextArea together on the screen. a "story" is loaded which will present a series of images (in the image loading) associated with a corresponding text (in the TextArea). a "story" has multiple image/text sections that are navigatied through with FRWD/BACK buttons. any given section can also have multiple sub-sections or "frames".

here is a diagram of the flow (in this case there would be 5 click throughs: 5 text/image sequences, but all contained only within 4 sections): http://jalaka.com/lab/ia/story_nav.jpg

below is my proposed sample XML structure. i want Flash to recognize how many sections and frames within sections there are in each story XML document - in order to generate a corresponding navigation structure (a tab for each section). HTML content will be immediate availble to loadinto TextArea as user move forward in sequence with nav. and images references can also be preloaded into available MC containers to be swapped into place as user navigates forward in sequence. also need to read and store attributes for each node in the XML to come up in MCs in sequence. and must also be able to parse XML in a way to place simple HTML formatted content (within XML) into the TextArea.

would Arrays be used?


<story title = "Story Title">
<section num = "1" title = "Section One Title" >
<frame image = "1.jpg" caption = "caption text here"><b>Content</b><br><br>content content content</frame>
</section>
<section num = "2" title = "Section Two Title" >
<frame image = "1.jpg" caption = "caption text here"><b>Content</b><br><br>content content content</frame>
<frame image = "2.jpg" caption = "caption text here"><b>Content</b><br><br>content content content</frame>
</section>
</story>

Loading Txt Into Multiple TextArea's
I am trying to keep all text in one text file, but have three TextArea boxes that are created with AS into which the external text file loads the text. Can I set variables in the text file and then pull them into the TextArea's instead of making separate text files for each TA?
Any help would be much appreciated!

Loading Xml In Textarea Comp.
Hi!

I'm currently working on a project I have a mainframe.swf and a personal.swf,
in the mainframe.swf there is a button named PERSONAL,and when you click on it,it load a movie called personal.swf,then when it is loaded,the textarea load a xml with css but it only load the picture define in the xml file and the text seem to be missing. here is my code in the personal.swf that loads the xml.

Code:
import mx.controls.TextArea;
var mc_container:TextArea;
trace(mc_container);
mc_container.html = true;
mc_container.editable = false;
mc_container.wordWrap = true;
mc_container.label.condenseWhite = false;
mctxtStyle = new TextField.StyleSheet();
mctxtStyle.load("body.css");
mc_container.styleSheet = mctxtStyle;
mctxtContent = new XML();
mctxtContent.ignoreWhite = true;
var p_mctxt=mc_container;
mctxtContent.onLoad = function(success)
{
if(success)
{
p_mctxt.text = mctxtContent;
delete p_mctxt;
}
}
mctxtContent.load("personal.xml");
stop();
Is there anything should i do in the mainframe.swf? because when I tried running the personal.swf alone it works fine I can see the text,but when I tried using mainframe.swf which I click a button and then the personal.swf will appear in the mask in the stage but it only show the picture.

Please help me thanks,

Loading New XML In Textarea With Actionscript
Hi Everyone,

I have managed to figure out how to load external xml text fine so far when the main flash file is loaded. I have 9 buttons and what I would like to do is have a different xml file loaded into the main textarea component for each of the nine buttons. Here is the link:

http://www.mailelani.com/test/Untitled-1.htm

The problem is that in order to acheive the rollout on the buttons I created them using actionscript and the buttons are in fact movie clips. It's all fine and dandy if I just want a link to open in a new page, but I'm having trouble reloading the xml files.

Here is the code that i've tried using on my actionscript buttons:


ActionScript Code:
this.onRelease = function(){ monthContent = new XML();monthContent.ignoreWhite = true;monthContent.load("update_archive/test.xml");monthContent.onLoad = function(success){if(success){this.month.text = monthContent;}}monthContent.load("update_archive/test.xml"); }


and the code that i use to load the innitial xml file:

ActionScript Code:
//init TextArea componentmonthText.html = true;monthText.wordWrap = true;monthText.multiline = true;monthText.label.condenseWhite=true;//load cssmonthStyle = new TextField.StyleSheet();monthStyle.load("month.css");monthText.styleSheet = monthStyle;//load in XMLmonthContent = new XML();monthContent.ignoreWhite = true;monthContent.load("update_archive/10_october_2005.xml");monthContent.onLoad = function(success){if(success){monthText.text = monthContent;monthText.vPosition = 0; }}


I'm pretty stuck and I've tried just about everything so any help in the right direction would be greatly apreciated

Maile

Loading Different XMLs Into TextArea Using Buttons.
I have one textarea and I want to change the content of that textarea by clicking buttons. So what would be a function for a button to load a different XML into the textarea? Thanks.

Loading Html Text To TextArea Component With Xml
I played around with this Macromedia tutorial - Bike Trips Sample Application: Using the XMLConnector Component in Flash MX Professional 2004

In the tutorial, the TextArea loads the text straight from the XML file.

I'm thinking of using the XML file to call in a HTML file to be loaded into the TextArea component. Is it possible?

In the attached sample, I turned on TextArea component html to true. And add in myscript to load mystyles.css for the Text Area component. But I have to copy my test example HTML file (article1.htm) codes into the XML data file.

I wanna skip the copy-and-paste and simply link the <description> in the XML file to a path or url to load the HTML file like article1.htm

Possible?

Thanks in advance.

Attached test example

Loading Data From A Text File Into A TextArea
I'm actually tryin to load links (from an array) from a text file into a textArea... This is basically so that I can "edit" the html in the textArea, then I have a save Changes button then php saves the text file on the server. But I cant get the data to load into the textArea. Could somebody help me out with that?

Loading External Text In A TextArea Component
Hi does anyone know how to load text from a text file to a TextArea.

Loading Xml Files In Textarea That Have Image Tags
Howdy all. Is it possible to load an external XML file that has an <img> tag into a TextArea component? I want to have external images/formatted text to load, and wanted to try XML before i resorted to HTML.

Thanks!

Loading An Array And Outputting Each Element In A Textarea Every 2 Seconds
Hi,

I have a PHP page that outputs a string in this format:

vars=one||two||three||four

I want to load this string into Flash and split it into an array. I was looking at some code on how to do this and I can load the string ok.

Now the tricky part. I want a loop to run through the array every 2 seconds. With each iteration the current value of the array element is displayed in a textarea with a scrollbar. With each iteration the previous content of the textarea remains. Its sort of tacking the content onto the text in the textarea with each iteration.

ie: If I had an array like this myArray("hello","world,"test");

the loop would produce ->

iteration1:
textarea = hello

iteration2:
textarea = hello
world

iteration3:
textarea = hello
world
test

Can anyone help me out with this?

Thanks,
Martin

Loading An Array And Outputting Each Element In A Textarea Every 2 Seconds
Hi,

I have a PHP page that outputs a string in this format:

vars=one||two||three||four

I want to load this string into Flash and split it into an array. I was looking at some code on how to do this and I can load the string ok.

Now the tricky part. I want a loop to run through the array every 2 seconds. With each iteration the current value of the array element is displayed in a textarea with a scrollbar. With each iteration the previous content of the textarea remains. Its sort of tacking the content onto the text in the textarea with each iteration.

ie: If I had an array like this myArray("hello","world,"test");

the loop would produce ->

iteration1:
textarea = hello

iteration2:
textarea = hello
world

iteration3:
textarea = hello
world
test

Can anyone help me out with this?

Thanks,
Martin

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

TextArea Component Problems (loading External HTML Files)?
I'm having a lot of trouble loading my HTML files into a textArea component that I have. The main difference is that when I try to do it on the ._root stage, it works, but if the component is nested inside a movie clip, it can't seem to load the html file at all.

Okay, so here's the situation a little more in detail (forgive me, I don't have the files open in front of me at the moment, so I'm going strictly by memory):

The textArea is a part of a graphic symbol that I made as a popup window, so for or purposes, I'll call it 'window'. This symbol, containing the aforementioned textArea component, is inside a movie clip that I used to make transitions for the window. We'll call this movie clip "popup" as that's pretty much what it does. So in my main stage, I have a button that loads the movieclip "popup". Say the code looks like:

on(release) {
this._parent.attachMovie("popup", "instance1", 1);
window._x = 0;
window._y = 187;
}

This loads the "popup"movie clip just fine. It plays and all, but inside the movie clip, on frame 1, I'm trying to load the external html file into the textArea component that's inside the "window" symbol with a script like:

var loadtextContent = new LoadVars();
loadtextContent.load("content.html");
loadtextContent.onLoad = function(success) {
if (success) {
textArea.text = loadtextContent.mytext;
}

};

That's not verbatim, but I know that it does work on the main stage, I just can't seem to get it to work on a textArea that's anywhere else.

Want I want to do is just have a swf and when you click on a button, it loads the popup to simulate a GUI, with the html loaded on the fly, as there would ideally be several buttons for different html files.

Now, I'm rather stuck. I don't really know where I went wrong. Am I placing the script in the wrong places and using incorrect target paths ? (I do that sometimes) Am I just approching this the wrong way? In theory, it shold work, but I can't get my html loaded, so any ideas at all would be appreciated. A workaround or another way about this would be as well. Thanks all.

-J

BG Of TextArea In MX Pro
Hi,
does anyone know how to rip out the Back ground and borders of a text area...but still keep the scroller alive??

thanks,
morgan

TextArea
DOES ANYONE know ANYTHING about the new TextArea in MX Pro??

I love the scroller on it...but CAN'T turn the friggin background OFF!! Anyone??

Anyone??

Anyone??

Beuller??

Will Some One Please Help Me With The TextArea
What do i have to do to get my textarea box to load a MC named "hometext"

Can the text area load Movie clips. How else are you suposed to enter text? There has to be an easier way.

All i need is a text box that is scrollable to display on my homepage. no pics, just text.

And also how come my scroll pane when i try that just shows up as a box with no text when i have the right instance name loaded.

Please help i am pulling out hair over here.

John

TextArea
So I just got Flash MX 2004 Professional... I was starting to mess around with the added components. I wanted to use the TextArea box in one of my sites that I used the ScrollBar for... So when I open up a new document and just move over the TextArea and play the movie I can see the text box if I put something in the text I can also see that. So I get all excited and try to do the exact same thing in my customers site and nothing! You can even see the textarea. Argh! Has anyone ever come across this?

TextArea
This is driving me nuts, never really worked with components before so I was hoping someone could help me out. How do I target an external .txt file to be displayed in a TextArea component?

Any good tutorials on how to modify and use components?

Textarea And Xml
I'm using a text document saved as an XML file to import text into my textarea, but it's not reading HTML code too easily, sometimes it does, sometimes it doesn't...could I not use an HTML document and import it into the textarea?

Swf Into TextArea
Is it possible to load a swf into the textarea
and how

:-)

Textarea And Xml
i have a text area and the action script


Code:
myText.html = true;
myText.wordWrap = true;
myText.multiline = true;
myText.label.condenseWhite=true;

news = new XML();
news.ignoreWhite = true;
news.load("news.xml");
news.onLoad = function(success)
{
if(success)
{
myText.text = news;
}
}
but when i publish it and view it just with the flash player, or explorer, when i move the scroll bar it highlights everything in the text area and wont unhighlight

my xml file is

[HTML]<news>
<p>December 5th</p>
<p>*************************************</p>
<p>Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah and so on till it starts to scroll..</p>

</news>
[/HTML]

Add TextArea With AS
I want to add TextArea component with AS on the stage.
How can I do it?

Thanks

TextArea Help
I'm trying to control the background color of the TextArea - either a color which I set or make it transparent.
I could use some direction - here is what I'm experimenting with now:


Code:
package
{
import flash.display.*;
import flash.text.*;
import fl.controls.*;

public class OpaqueTest extends Sprite
{
public function OpaqueTest ()
{
var text_fp:TextArea;
text_fp = new TextArea ();
addChild (text_fp);

text_fp.htmlText = "<b>Hello World</b>";
text_fp.width = 100;
text_fp.height = 100;
text_fp.x = 100;
text_fp.y = 100;
//text_fp.visible = false;
text_fp.opaqueBackground = 0x00ff00;
//text_fp.textField.background = false;
}
}
}
Thanks

Using CSS With TextArea
Hi there,

I am wondering if I can use external CSS with TextArea Component.
I succeed to apply CSS with Textfield Object, but I can't use CSS with TextArea component. The reason I want to use TextArea component is, it can create scrollbar automatically.

If somebody know how to solve this proble, please let me know!

Thanks,

TextArea Help
Hi all i am doing a chat using flash AS3 (a rather simple one) inserting and reading from database . im using textArea to display the message read from the database . Problem is how can i display a new row for show instead of setting the text like (instancename.text = "xxxX")

so a simple one how to make sure that the newly read message can be displayed into a NEW row in a textArea...?

any help will be greatly appreciated . thank you xD


arhhh i solved it xD using :

var asd : String = chatOutPut_txt.text;
chatOutPut_txt.text = asd + "
" + e.data.toString();

CSS In A TextArea
has anyone been successful in getting font-size in css file to affect text in a textArea in MX 2004 pro??

I get the CSS in...and I can apply it to a textField....But I can't get it to apply to a textArea.

thoughts??

thanks

Xml And Textarea
Hi,
Im loading xml into a text area and then loading the .swf with the text area into the main .swf. I turned off the border and the background of the textarea and everything in the .swf where the text area actually exists is fine. But when I load the text area .swf into the main .swf and the xml text shows up, when i select it this funny green border appears around the text area. If i move my mouse off the text area and click, the border dissapears, but this does not happen in the .swf where the text area originally is created.

TextArea Help Please...
Hey guys,

I'm hoping someone can help me. I've been trying to figure this out for some time now and am finally giving up and begging for help! I've tried searching this all over the place, but with no luck. My problem is pretty simple, I just can't seem to make it work.

I have a textarea that loads into a movieclip. The textarea has a border I need to get rid of. Also, I need to know how to set the background color of the textarea or at least make it transparent. I've found several different ways to do this, but none of them will work. When I try to put the actionscript in myself, I get an error
saying an OnClipEvent handler is needed. I'm not sure what to do here. Can someone post the exact script I need to make this work? I've seen TextArea.border_mc._visible = "false";,
but I don't know what goes before this! The same with TextArea.setStyle("backgroundColor", "#ffffcc"); (I may have gotten these two wrong just now, I'm doing it off the top of my head, but I had cut and pasted the code directly into Flash from where I had found it!) I've tried substituting my instance name for textarea, but that didn't work either.

Please help, I'm lost!

Textarea And TAB Key
Hello,

Does anyone know of a way to make the TAB key function as it would in a text editor instead of as a navigation control in a flash movie?

I have a V2 textarea component I would like to act as an HTML code editing tool. Any time someone goes to tab in their code for cosmetic reasons, it jumps to the next tabbable component.

Things I've tried:

1) Making the textarea the only tabbable component using tabEnabled = true / tabEnabled = false on all components; as well as setting the tabindex on the textarea to 1 while all others are blank (almost works -- but the textarea loses focus and you can't detect where the carat was)

2) Catching the keydown event using Key.TAB (almost works -- again, the textarea loses focus and you no longer know where to put the TAB)

Any suggestions / solutions would be greatly appreciated.

- Regards

Img In A Textarea
hallo people

i'm in a trouble with displaying images in my texarea. i mean that i can show the image but it does not appears in the same line on my text, it appears in the next line.

how can i resolve this problem

thanks

TextArea
in Flash's help it says to use a TextArea you need to import fl.controls.TextArea but when I do, it says 1172: Definition fl.controls:TextArea could not be found.

TextArea CSS
Hi

I am trying to add CSS to a TextArea component in AS3. I know this can't be done easily with myTextarea.styleSheet so was wondering what the best way is? I've read articles about overriding the default draw function but most didn't have clear instructions on how to implement them.

My TextArea is dynamically added.

Cheers

TextArea Help Please...
Hey guys,

I'm hoping someone can help me. I've been trying to figure this out for some time now and am finally giving up and begging for help! I've tried searching this all over the place, but with no luck. My problem is pretty simple, I just can't seem to make it work.

I have a textarea that loads into a movieclip. The textarea has a border I need to get rid of. Also, I need to know how to set the background color of the textarea or at least make it transparent. I've found several different ways to do this, but none of them will work. When I try to put the actionscript in myself, I get an error
saying an OnClipEvent handler is needed. I'm not sure what to do here. Can someone post the exact script I need to make this work? I've seen TextArea.border_mc._visible = "false";,
but I don't know what goes before this! The same with TextArea.setStyle("backgroundColor", "#ffffcc"); (I may have gotten these two wrong just now, I'm doing it off the top of my head, but I had cut and pasted the code directly into Flash from where I had found it!) I've tried substituting my instance name for textarea, but that didn't work either.

Please help, I'm lost!

Textarea And TAB Key
Hello,

Does anyone know of a way to make the TAB key function as it would in a text editor instead of as a navigation control in a flash movie?

I have a V2 textarea component I would like to act as an HTML code editing tool. Any time someone goes to tab in their code for cosmetic reasons, it jumps to the next tabbable component.

Things I've tried:

1) Making the textarea the only tabbable component using tabEnabled = true / tabEnabled = false on all components; as well as setting the tabindex on the textarea to 1 while all others are blank (almost works -- but the textarea loses focus and you can't detect where the carat was)

2) Catching the keydown event using Key.TAB (almost works -- again, the textarea loses focus and you no longer know where to put the TAB)

Any suggestions / solutions would be greatly appreciated.

- Regards

Help With TextArea
Ok, so I've read up on the TextArea class in Livedocs, and i've been looking at XML explanations and their implementation into Flash for about a week. I've tried this EXACT code on another Flash document, except on the main stage instead of embedded inside of a separate movie clip, and it worked perfectly.

Can anyone explain why the text won't display in the TextArea? Does it have something to do with it being inside of a movieclip and that being placed on the Main Stage?

(By the way, proxy.xml is just a copy of the xml produced by my CFM proxy for easier usage, in case you were wondering. :wink: )

Here's the code:

Code:

var blogtext:mx.controls.TextArea;
blogtext.html = true;
blogtext.embedFonts = false;
var blog_xml:XML = new XML();
blog_xml.ignoreWhite = true;
blog_xml.onLoad = function(success){
   if (success) showblog(this);
   else {
      blogtext.text="The blog failed to load";
      trace("The blog failed to load.")
   }
}
blog_xml.load("proxy.xml")

function showblog(blog_xml){
      var blog = blog_xml.firstChild.firstChild.childNodes;
      for(var i=0; i<blog.length; i++){
      if(blog[i].nodeName == "item"){
         var blogs = blog[i];
         var titles:Array = blogs.firstChild.firstChild.nodeValue;
         var links:Array = blogs.childNodes[1].firstChild.nodeValue;
         var desc:Array = blogs.childNodes[2].firstChild.nodeValue;
         blogtext.text += "<headline><a href='"+
             links+"' target='_blank'>"+titles+
             "</a></headline><br /><br />"+
              desc+"<br /><br />";      
      }
   }
}

Dynamic Textarea
I everybody

i'm working on a dynamic textbox in Flash 5 and i load
properly the text. i'v created a button to enable scrolling

on (rollOver){
toto.scroll = toto.scroll+1
}

But in order to scroll several times you have to move your mouve several times on it.

I can't figure out how to tell flash that, if the mouse stays on the button, then continue scrolling, it would be
smoother for the user.

Thanks alot for your help

How Do I Edit A Textarea
I would like to just tint all of the halo's themes buttons and such a bit for my site, in essence skinning them. What would be the best way to do this. I've messed around a bit with the theme thing but not having much luck there.

My also is there anyway to have a dynamic textarea that will scroll if needed but have a non white background? If so how?

Thanks

Firehawk

TextArea Formatting
Can anyone PLEAAAASE tell me how to format a textArea in 2004 pro??

I'm pulling text in through an XML doc and the textArea is formatted for HTML text. What I really want to do is, create a different default color for the text besides black. So if I don't define the text Color in a tag in my xml, it will just always be that default color. Or if anyone knows how to change the textAreas default color with a stylesheet. Anyone??

I've tried myTextArea.setStyle("color", 0xFFFFFF);
and it only works for non-html text

thanks,

TextArea...what The Heck?
Is it just me or is this new textArea component difficult to use? Does anyone know how to load a simple XML file into a textArea component and have it scroll??

TextArea Not Showing Up
I have a textarea on a frame that is displaying some HTML formatted text (that I typed in). It shows up fine in flash, yet when I publish it, there is nothing there (i.e. there is no box, or text).

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 Help
is it possible to make the background transparent?

Copyright © 2005-08 www.BigResource.com, All rights reserved