Underlining Dynamic Text
I have MC with a dynamic text field inside it. I am trying to get the dynamic text field to have an underlined format. I have read that all I need to do is place <u></u> tags as part of (and around) the uploading text data to achieve this.
The problem is my uploading text data is from an XML doc. When I try throwing those HTML tags in it disrupts my XML's structure and no data gets sent. Any idea how I can load text in a dynamic text field and make it look like it is an underlined hyperlink?
Appreciate any thoughts...thx
FlashKit > Flash Help > Flash ActionScript
Posted on: 01-18-2005, 04:10 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Underlining Text
how would i create a text rollover so that the selected text becomes underlined when the mouse rolls over it.i understand that in the properties box there is no option of underlining text so im assuming you have to utilize actionscript.
version: flash mx
Underlining Text
how would i create a text rollover so that the selected text becomes underlined when the mouse rolls over it.i understand that in the properties box there is no option of underlining text so im assuming you have to utilize actionscript.
also, i want to use the underlining effect within a list of text. so for example:
events:
6.23.02
6.30.02
7.18.02
i have a text box with various lines of text and i want each line to be able to become underlined when the mouse rolls over. is this possible? or would i have to create a separate text boxes for each phrase?
Underlining Text
I have a static text box that I need the words to be underlined. I tried making the text rendered as html and using the <u> </u>, but that didn't work. Any ideas?
gamist
[MX] Underlining Text
I cannot find a way to underline text and hyperlinks using Flash MX. Any help would be appreciated.
Underlining Text?
This may sound like a simple question/request, but because I seem to be missing the obvioius (missing underline button for text in MX) can anyone tell me how to underline text without actually drawing a line?
I have hundreds of modules with text that has been manually entered in and now a client would like cetain words underlined. The problem with drawing a line is for some reason the line does not print where it appears in the file??? Weird. Anyhow.
Is there a way to do this via actionscripts? The only constraint I have is the flash file can not call an outside soucre (i.e. txt file, html file etc.)
Can you point me to an example? Tutorial?
Ahhhhhhhh. Help.
Underlining Text...
I have a text field with preformatted text in it. I'm not stating: txt = "content..." with HTML code in it. It is just a text box with text in it. If I add the <U>...</U> around the text in the box that I want underlined... it doesn't work. Any suggestions?
Ps. Yes, the render as HTML is checked.
Underlining Static Text
Is it me going mad or have the creaters of the flash mx version removed the ability to underling static text? I know i can underline dynamic text with the <U> thing, but i need it to be static text so that it can be shape tweened etc. I don't rely want to resort to having to use the line tool either :-(.
Any opinions? Daniel
Underlining Text Links
I have a really annoying problem that I just can't suss out. I have text linking to other frames in the flash presentation using this "asfunction:gotoAndStop,392" on the static text properties menu. I need to underline the text with these links. I have worked out how to create underlined text using a variable & I also know how to add a hyperlink to an external url - but I cannot for the life of me work out how to add a link to an internal frame as the "asfunction:gotoAndStop,392" script no longer seems to apply. Any ideas???
Many thanks
Underlining Static Text
Hi,
Is it possible to underline text in a static text field? I know how to do it in dynamic textfields, but in this instance, I'd prefer to use static text. Thanks.
Problem With Underlining Text In CS3
I'm trying to underline a few bits of text, but I'm having trouble, as there doesn't seem to be an underline tool in Flash. The file I'm trying to do this in is here:
http://alpan.secure-mall.com/test.html
The glow effect on the text is triggered by an invisible box in front of it, so to get the underline I'm looking for, I tried creating a line of the appropriate color, making it a movie clip with only two frames, one where the line is visible and one where it isn't, and then having the trigger play the movie clip. The problem is, it turns on and off each time I roll over the trigger. Does anyone have any ideas on how to fix this? Thanks!
Underlining Text In Flash
Just started playing with Flash. Is it just me or Flash doesn't come with a text underline feature? Do you know any text animation tutorials around? Thanks!
Underlining Static Text?
I feel really dumb asking this question, but I just want to underline some static text I'm putting in my movie. I see a bold and italics option on the properties bar, but no underline. Thanks!
Underlining Links
Hello all,
This might be a stupid question. But I was wondering how you would underline a link inside a dynamic text box? I think it is something along the lines of TextFormat.underline = true;, although I tried this and it did not seem to work. I must be doing something worng.
I would appreciate anyone's help.
Thanking you in advance.
Jumping To Areas Of Dynamic Text, Printing Dynamic Text
hello,
I have a movie clip that loads a .txt file into a dynamic text field. Due to the amount of content in the file a scroller bar is needed in order to view all of it. I want to create buttons that jump to different areas of the dynamic text for easier navigation so the user can go directly to various sections instead of having to use the scroller all the time. What kind of coding would I need to put on the buttons and within the .txt file at the areas I want to jump to?
Also, I would like to give the user the option to print everything within the dynamic text field only, not the surrounding elements in my movie clip. Is that possible?
thanks!
Dynamic Text Not Loading On Server . . . Other Dynamic Text Issues
ok - here's the url
http://www.rongilcreast.com/Test_Site/main.html
when I 'test movie' in Flash, the text comes in. But not now that it's online . . .
2nd problem. I want to add a scrollbar to the textbox, but when I drag the scrollbar onto the textbox, it doesn't snap-to the text box and resize itself.
all the files are here:
http://www.rongilcreast.com/Test_Site/main.fla
http://www.rongilcreast.com/Test_Site/main.swf
http://www.rongilcreast.com/Test_Site/Index.txt
whatamIdoin'wrong?
tia . . .
[AS2] Changing Text In Dynamic Text Field With Dynamic Instance Name
I dont know what I am missing here but what I want to do is change the text inside a dynamic text field via actionscript. the code I am using runs in a loop within a function. Trace is outputting the correct values.
PHP Code:
for(i=0; i<=4; i++) {
if(_root["order_"+ q][i] == 0) {
["order_"+ i]text = "First";
trace("first");
} else if (_root["order_"+ q][i] == 1) {
["order_"+ i]text = "Second";
trace("Second");
} else if (_root["order_"+ q][i] == 2) {
["order_"+ i]text = "Third";
trace("Third");
} else if (_root["order_"+ q][i] == 3) {
["order_"+ i]text = "Fourth";
trace("Fourth");
} else if (_root["order_"+ q][i] == 4) {
["order_"+ i]text = "Fifth";
trace("Fifth");
}
}
basically I want to do this -
PHP Code:
order_0.text = "First";
So how can I change this line to work as expected?
PHP Code:
["order_"+ i]text = "First";
EDIT- The instance names for the dynamic text fields are set
Thanks
Trying To Take The Text From One Dynamic Text Field And Populate Another Dynamic Text
I'm trying to take the text from one dynamic text field and populate another dynamic text field with its contents.
I want to display the text that is in the text field _root.MC_Control.tab_title in another text field called _root.video_title.
I have tried this:
_root.video_title.text = _root.MC_Control.tab_title.text;
and this:
_root.video_title.text == _root.MC_Control.tab_title.text;
neither one seems work....am I missing something?
Asfunction - How To Load Dynamic Text With Dynamic Text? [F8]
Hello dear helpers !!!
I'm trying to get external, dynamically loaded text to load different text files into a text box. I've figured out that I need asfunction to do it through calling a function in the movie and passing it variables, although i haven't been able to write this function at all... would anyone mind giving me a hand???
thanks sooo much!!
p.s. I've managed to get this working by creating a toggle function, so at the moment I have 25 text boxes and a show/ hide function, but that's very buggy.
Loaded Text File Wont Show All Of The Text In Dynamic Text Field
When I load an external text file into flash and display the string in a dynamic text box, not all of the text will show in the text box; and using scroll button to scroll the text doesnt help.
The text that is in the text file is as follows, and as far as I can see there is no reason why all this text shouldnt show in the dynamic text field; by the way all my targets are correct, I know that for fact.
message=Code: Cheat:
BEEPSAGONER Deactivate the censor beeps
DRACULASTEABAGS 50 lives
DUTCHOVENS Frying pan mode
XFYHIJERPWAL IELWZS Debug mode
BOVRILBULLETHOLE Shoot all objects
EASY Easy mode
VERYEASY Very easy mode
SPUNKJOCKEY New death animation
SEXYMANN Birdy & Squirrel scene
Code: Unlock chapter:
PRINCEALBERT Barn Boys
CLAMPIRATE Bats Tower
ANCHOVYBAY Slopranos
MONKEYSCHIN Uga Buga
SPANIELSEARS Spooky
BEELZEBUBSBUM It's War
CHOCOLATESTARFISH The Heist
WELDERSBENCH All chapters and scenes
Code: Unlock Multiplayer character:
WELLYTOP Conker
EASTEREGGSRUS Neo Conker
BILLYMILLROUNDABOUT Gregg the Grim Reaper
CHINDITVICTORY Weasel Henchmen
EATBOX Cavemen
RUSTYSHERIFFSBADGE Sergeant and Tediz Leader
BEEFCURTAINS Zombies and Villagers
Trasfering Text From One Dynamic Text Box To A Input Text Box On A Differnt Page?
Ok so I have a text box set up which receives the date on a callendar which you click on. On another page (a seperate html file) I have an input text box for receiveing this text.
I've been trying to do this using various methods using getURL, but, I can't get it to work. This is becoming tedious especially as I'm not able to test it without having to reupload the files.
If someone could please inform me on how I should do this I'd be vary greatful.
If you need any further information I'll reply as soon as possible.
Load Text From A Text File Into A Dynamic Text Field
I'm trying to load text from a text file into a dynamic text field. The text field is on the "blog" page of the website. When I test my movie, the first time I go to the blog page, the text from the external text file (AND the CSS styles) show up fine. But when I click from the blog page to go to the "profit calculator" or "contact" pages and THEN click to go BACK to the blog page, the blog page animates back in, and right as the animation ends, the text on the blog page suddenly disappears and won't come back. PLEASE help me figure this out!
Dynamic Text Box / Xml Content - Text Is Too Close To Border Of Text Box
Hi,
If you take a look at my flash movie you will see that I have draggable movie clips, which contain dynamic text fields. These text fields contain text drawn in from a simple xml document.
The problem I have is that the text in the text fields is hedged right next to the border of the autosized text box. This makes them look untidy and in the worst case difficult to read. I wonder how I can add some margin to the left and right of the text to fill in some space.
http://www.nottingham.ac.uk/home/ccz...AndDrop3.1.swf
http://www.nottingham.ac.uk/home/ccz...AndDrop3.1.fla
(you also need the xml doc at : http://www.nottingham.ac.uk/home/ccz...scriptions.xml )
The code which formats the text boxes is:
with (main["dragAct"+i].dragActText) {
text = actText[i+1];
background = true;
backgroundColor = "0xe2e2e2";
setTextFormat(myFormat);
autoSize = "center";
border = true;
borderColor = "0x666699";
}
my text formatting looks like this, and you can see that I have tried to use leftMargin / rightMargin but these properties don't seem to work:
var myFormat:TextFormat = new TextFormat("Tahoma", 12);
myFormat.leftMargin = 20;
myFormat.rightMargin = 20;
myFormat.bold = true;
Any suggestions most welcome.
Thanks
Dynamic Vars, Dynamic Paths Using Variables And External Text Files
Hi there,
first off, apologies for the long post, but its a tricky problem to explain... and on my first post too! (sorry )
Im have a bit of bother with flash calling variables from a text file, and using them to make paths to other variables, and to control the amount of time a duplicate clip occurs. The first of these 2 problems is this:
Im loading a text file "content.txt" into _root. (this works fine)
it contains the variables:
webclipcount=2
&webhenry=hello hello
&webbutton01=henry
on the main timeline I have this button
on(press){
sectiontitle="web"
clipcount=webclipcount
}
there is a text box on the main timeline with variable name of bodycopy.
on a clip on the main timeline I have this;
onClipEvent (enterFrame) {
if (num< _parent.clipcount) {
duplicateMovieClip(thebutton, "button"+depth, depth);
this["button"+depth].name = _parent[_parent.sectiontitle+"button"+num];
this gives button01 the name henry- this works.
on the duplicated clip I have these actions:
on(mouseDown){
_parent._parent.bodycopy=_parent._parent[_parent._parent.sectiontitle+this.name]
}
so we end up with a path like:
_parent._parent.bodycopy=_parent._parent.webhenry
and it in turn should make the textbox on the main timeline contain "hello hello"
but it doesnt.
also for the duplicating clip, unless i use:
onClipEvent (enterFrame) {
if (num< 2) {.....
<snip>
it wont work either. it seems neither can be dynamic/ pulled from the text file. (well, i can get them to work!)
If I use direct paths like:
on(mouseDown){
_parent._parent.bodycopy="bloody hell it works!"
}
and
onClipEvent (enterFrame) {
if (num< 2) {.....
<snip>
it works, but not if they are dynamicly set from the txt file...
Anyone care to shed some light onto this? its doing my head in!
thanks in advance or the help.
cheers,
chris
Mouseless, Autoscrolling, Dynamic Tweening, Dynamic Text...
I am having the darndest time finding help on this even though it seems like a common task (ok done venting)
What I need is this:
A dynamic text field (from txt file) that will autoscroll vertically. I know that I can do this by motion tweening a movie clip containing my dynamic text, but heres the thing: this source txt file will be updated daily (daily events). Some days it will be a few lines of txt (no scrolling necessary). Some days it may be 500 or more lines of text. So simply motion tweening my movie clip a fixed speed and distance will not work. I need the scroll speed, text box size, and scroll distance to be dynamic.
Please help us. The hack that made our kiosk made it almost impossible to open, so it takes me forever to open it and i don't want to do that every day... oh, you didn't need to know that, sorry.
An .fla or a tutorial would be a huge help as I am not action script savy, yet.
Thanks in advance!
Dynamic Mask For Dynamic Text Won't Working Any Body Pls Help
Im' supposed to make a scrollable gridlike simulation with using MC. Inside that MC there are dynamic text area as cell in which its text will be updated dynamically.
Now i have a strange prob that when i use setMask to mask that grid MC it won't working
I have the MC name 'grid'
above that another MC name 'msk'
code is like tha
grid.setMask("msk");
it only shows the full grid instead of masking area.
Dynamic Text : Dynamic Height (depending On Content)
Hi people.
Im working on a website, and in some part there is a dynamic text space that sets its width depending on the resolution.
But well, I want the text to be sitting downside of my webpage. For this (I guess) I need to set the height of the space to its contents, so that I can use the textspace height as a unit, for putting it to the ground
(myTextSpace.y=stage.StageHeight - myTestSpace.height)
But well, I do not know, if there is any way to set the textspace height to its contents.
I hope I'm clear, thank you.
Dynamic Text Within Dynamic Movie Clip Loops
Ok my predicament. I am trying to create thumbnails, but instead of using pictures as the thumbnails I would like to have text, formatted blah blah for people to select. Now the code I am trying to adapt is fine and dandy to get working with pictures, so I know the part of this code that creates the movie clip is fine. However I cannot seem to dynamically create the text boxes within the movie clips. I need to have them within the movie clips so the opacity will change when they are hovered over.
Code:
currentName = "t"+k
thumbnail_mc.createEmptyMovieClip(currentName, thumbnail_mc.getNextHighestDepth());
thumbnail_mc.currentName.createTextField("text"+cu rrentName, thumbnail_mc.currentName.getNextHighestDepth(), 0, 0, 244, 28)
thumbnail_mc.currentName.text="test"
k will be changing anyway for each time through taht a movie clip is made hence why they will need different names.
Any help...hope this can be understood.
Accessing Dynamic Text Within Dynamic Added Movieclip.
Hi there.
I'm trying to access and change a dynamic text field within a dynamically added movieclip.
This is how I'm trying to accomplish that;
ActionScript Code:
uButton = attachMovie("_button",arr_videos[i][1], ++uDepth);
uButton._x = uButtonStartX;
uButton._y = uButtonStartY + uButtonDistance * uDepth uButton.btn_name.text = "button name";
btn_name is the name of the dyn. textfield.
But this does nothing.. What am I doing wrong?
Thanks for your help
Samuel
Dynamic Text Field Receiving Dynamic Variables...
or something like that . . .
This is my problem: I'm generating _global variables via XML. Each variable represents different types of copy, of varying lengths. For Example:
_global.introduction = xmlDoc_xml.firstChild.firstChild.nodeValue;
_global.body = xmlDoc_xml.firstChild.firstChild.firstChild.nodeVa lue;
_global.summary = xmlDoc_xml.firstChild.firstChild.firstChild.firstC hild.nodeValue;
I want to create ONE text field, with scrolling, that will act as a template to house all types of content. I've assigned a variable that equals "content" to this text field. . . My problem is, I can't get the text field variable (content) to dynamically swap for the global variable (_global.introduction) in order to display the proper content.
This seems simple, but something's not working for me. Any thoughts? . . . BIG thanks in advance!
XML Loading, Dynamic Buttons, Dynamic Text Fields...
My last thread kind of died, I guess, so here's another one that I hope will get me some help; it has an updated FLA attached and what I think to be some better descriptions of my problems... I know I'm totally indebted to whomever will help, but this is an emergency and I need some timely advice.
so here's the FLA, XML, and some sample images: kirupaTest2.zip
1. I pretty much have the enlarged pictures loading I guess, which was my major problem before, but it doesn't matter because I can't get the code to "know" which of the dynamic thumbnails has been clicked (by "know", I mean return an index value, say 0 through 7 if there are 8 projects, that I can use to access that particular project in the array of 8 projects in the rest of the code)... So if the third movieclip thumbnail were clicked, I'd like "2" to come up somehow... I've tried this code, which is kind of lame, I know, based off of the idea of each of the thumbnail movieclips' names ending in their index number:
ActionScript Code:
//"this" is the button that was pressed; would return a string ending in//thumberMC_<number of whichever movieclip thumb was clicked>var: testString:String = this; //storing how many characters are in the string above...var: stringNumb:Number = testString.length;//using that value to take off the last string (hopefully the number)var: finalString = testString.charAt(stringNumb);
And that didn't work. (The code above was entered around line 71 in the layer "actions"; it's gone now)
2. An even bigger problem is I have some containers being drawn dynamically from height and width values pulled from an XML file. When I test the code that creates the objects using hard-coded values, it works fine; say if I put 481 in for the width and 375 for the height. But if I try to do it (sort of) dynamically like:
ActionScript Code:
var picHeight:Number = projects[5].bigPics[0].picHeightvar picWidth:Number = projects[5].bigPics[0].picWidth
it gets all screwed up; please try it for yourself in the supplied FLA. It's hard to describe what goes wrong; some things are drawn, and others aren't. I think it's because the objects are trying to draw before they have the data to draw with. This can be seen at lines 129 and 130.
3. Lastly, there's a dynamic textfield I'm trying to create that never shows up for some reason. Again, you could see in the FLA (in the "createDrawer" function around line 424).
If I can clarify, please let me know.
Dynamic Video Playlist And Dynamic Text Articles
Hi all, hope you can help me..?
I have the task of creating a Dynamic Video Playlist to be incorporated in a FLASH 8/HTML site. The site owner should then be able to upload their recorded videos. The client will be using a low budged camera. I am planning to suggest a video format to the client that will suit me best.
In addition I also need to create a section where text articles will be posted by the site owner.
I am a beginner in Actionscript 2.0, and I have Flash 8 installed in my PC.
Can anyone recommend some FLA source files to get me started, and a tutorial? I've seen some tutorials, but they are either too complicated or don't attend my needs.
Many thanks!
Getting A Dynamic Text Box's Text From HTML-formatted Text?
Hey! You recognize me yet? I've got (hopefully) one last question for a while. Could somebody please tell me how do to get the text value of a text box with text that's formatted as HTML? ( it was formatted similar to "textBox.htmlText = "...";")
I tried "myVariable = textBox.htmlText", but it just gave me the formatting garbage it's using (<TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Verdana" SIZE="12" COLOR="#000000"></FONT></P></TEXTFORMAT>) without the actual text that my users see. I also tried "myVariable = textBox.text;", but it returned a blank variable.
Many thanks, me Flash bruthas
Furry
Dynamic Text, Loading Text From Text File
I have a large text file, full of, believe it or not, alot of text. When it loads into the textbox in flash, it cuts off after a certain amount of lines. How many lines does it cutt off at and if I can, how do I increase this? THanks
How To Add Text To Dynamic Text Field Where Text Cursor Is. Please Help
Hello,
How do you, if possible, can add text to a dynamic text field on where the text cursor.
Example:
| = text cursor
by pressing a button I want to add "How are you?" where the cursor is
____________________________________________
Hello
|
Bye
____________________________________________
Results:
____________________________________________
Hello
How are you?|
Bye
____________________________________________
Please Help!
Thank you in advance!
Dynamic Length Of Dynamic Of Text Field?
is it possible to set the length of a dynamic text field so that the text flowed into it fits perfectly.
I need this so that I can get the _width of the movie clip it sits in.
help appreciated guys.
Dynamic Text Fields In A Dynamic Menu
Anyone can advise how to give names(i.e home,service...) for textfields in a dynamic drop down menu instead of getting the original sequence (ie. text0,text1,text2) or button1,button2,etc...Help please
Dynamic Text Field - Dynamic Size
Hi all
I am trying to do a tooltip that loads a var from database into
a dynamic text field
This I want to customize with a backgrund movie
pls see my illustration!
Because I dont want to have a static size of the background movie
I hope there is a way to make it scale to the textfield
All Ideas welcome
Have a Nice day
Flemming
How To Load Dynamic Text According To Dynamic Image?
Hello all,
I want to make this artist portfolio (ie: a slide show) and I have found a tutorial that showed me how to dynamically load images in an empty movie clip.
Now, I'd like to attach a description for each images and I'd like to keep it dynamic. So, I imagine a folder with one text per image, having a name can can be incremented or decremented (description1.txt, description2.txt, and so on)
and I guess it's a matter of having a recognition of which image we're on in order to load the corresponding text...
Also, I was wondering, can I add html tag in the txt file in order to have some sort of formatting to the output text?
Where do I start?
Thanks
p.
Dynamic Text; Dynamic Gradient Fill
Wow. Its been a long time since I asked a question here!
I'm trying to re-create a tweened banner with gradient filled (and broken apart ) text with dynamic text.
I'm using this code inside a loop: aTxt is an array of strings populated from an XML object
code:
var fmtText:TextFormat = new TextFormat();
fmtText.font = "TrajanPro";
fmtText.size = 30;
fmtText.color = 0xE3D280;
// ...
// get the width of the textfields
var txtMetrics:Object = fmtText.getTextExtent(aTxt[i]);
this["mv_"+i].createTextField("txt", 2, 0, 4, txtMetrics.textFieldWidth, txtMetrics.textFieldHeight);
this["mv_"+i].txt.text = aTxt[i].toUpperCase();
this["mv_"+i].txt.setTextFormat(fmtText);
I need to use the TextFormat method because thats the only way i can get the width of the newly created text filed, which I use for some maths later.
Is there any way to use a gradient fill instead of the color 0xE3D280? Or must I make the text as a mask for a gardient fill layer?
Edit Dynamic Text To Dynamic Textfield
Hey all,
I'm sorry for not having a nice summary!
At this moment I'm working on a project, where the staff has the biggest hate created for anything that looks like a scrollbar. Therefore I'm trying to develop a textblock where texts come slide in from the right. Let's say I've three pages of plain text. This text should be chopped in pieces and placed in an array. Piece 1 becomes page 1 in the textblock, piece 2 becomes page 2 in the textblock which will slide in after a click on a button. Et cetera.
At this moment I've made this with the help op PHP. PHP counts a certain amount of words and devides the text into an array. This array is sent to Flash. The problem: depending on the amount of w's and m's, complete lines will not be displayed or pages will be half full. I'm looking for an alternative here.
The only thing I can come up with is Textfield.maxscroll. With maxscroll I can calculate the number of lines that will not be displayed in the textfield. I'm looking for the possibility to cut off the text after this last word in combination maybe with this maxscroll function. .length counts chars, maxscroll counts the lines, I'm looking for the combination!
Any ideas? Thanks in advance!
Dynamic X_ Propert For Dynamic Text Fields
Hello there.
I want to generate a dynamic text field in action scrip, but I want the length to dynamically adjust to suite the load of the external txt file. So when I change the text I won't have to adjust my text fields or action script.
Can this be done and if so, how would I go about doing it?
Thank you,
RSB
Setting Dynamic Text With Dynamic Path's
Hey guys,
I am pulling in this info with XML and trying to pass it thru a loop to plug in all of the news posts...however, for some reason, I cannot get the paths to work while I have a variable in it.
Any ideas?
ActionScript Code:
import flash.net.*;
import flash.events.*;
var xmlLoader:URLLoader = new URLLoader();
var xmlData:XML = new XML();
var numz:Number = 0;
xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
xmlLoader.load(new URLRequest("news.xml"));
function LoadXML(e:Event):void {
xmlData = new XML(e.target.data);
ParseBooks2(xmlData);
}
function ParseBooks2(tourInput:XML):void {
var tourList:XMLList = tourInput.Newspost.datez;
for each (var dateElement:XML in tourList) {
// create entries newsTitle_txt
["newsButton"+numz+"_but"]addEventListener(MouseEvent.CLICK,onClick);
function onClick(e:Event):void{
trace(this)
//launch news story
}
// THIS IS WHERE I AM HAVING TROUBLE...ANY IDEAS? It pulls the info in, but I cant set this text using the variables..
var newsTitles:String = "newsButton"+numz+"_but.newsTitle_txt";
trace(this[newsTitles].text);
this[newsTitles].text = tourInput.Newspost.title.text()[numz];
numz++
}
}
this.stop();
|