ActionScript 2.0 :: XML - Fetch News From Xml And Populate That News Headings Into Four Text Fields
May 17, 2010
I am working on the news ticker module (AS2) where I have to fetch news from xml and populate that news headings into four text fields and these 4 headings will stay for a while and fade until last record. this process will continue.
View 0 Replies
Similar Posts:
Nov 15, 2006
I'd like to add a second news ticker text field right beneath the first one that loads its headlines from a different XML file. So my question is this -- (not very XML savy mind you...) How would I need to adjust the AS code to be able to have both text fields going at the same time? What parts of the AS code can be omitted? (to not have redundant functions) Is there anything I should be aware of that might be cancelling out the second text field from running? At this point, I can get only one of the tickers working at a time -- the other just sits empty.
[Code]...
View 1 Replies
Mar 24, 2007
Making an XML news reader based off of senocular Squirrel XML news.
I'm using Fuse and wanted to target the dynamic text and or background portions of the headline section.
However, this movie clip is attached to the menu_mc so I'm stumped as to what I should exactly target for the fuse sequence (or any mx.transition/zigo engine based code-tweening process for that matter).
I've attached the files in a .zip for people to look at (and possibly conquer my problem!
View 3 Replies
Jul 17, 2009
I wanted to add a second news box under the first one and have it pull the first two news items in the xml file and have it displayed on the movie. Currently it is putting the first news item in both news boxes.ction script so that the second box is actually the second "<news> tag". From the tutorial I removed the <info> <author> and <comment> tags.
View 0 Replies
Mar 9, 2005
Do you know Kirupa's News Editor tutorial?O.K. I have problems with text formatting. I need "title" in a different font than "body".Here is the part of original code:
ShowNews = function(news_xml){
if (!news_xml.firstChild.hasChildNodes()){
content_txt.text = "No news available.";
[code]......
View 8 Replies
Sep 20, 2009
I want to create a news bulliten in my website. I'm talking about a small 200*200 pixel box, where the user see's news coming from down to up. Of cours i can use a primitive way editing the flash file whenever News are fed but i want to do this just by editing a text file which will contain the news and the flesh box will automaticly take the text and animate it.
View 2 Replies
Jun 7, 2010
My text animation scrolls from left to right, which is OK. I want to keep it simple but change it up little. How do I get the text to go right to left?
AS3 Example
mask = customMask;
var my_str:String = " Ad hoc ad loc and quid pro quo ";
function addUm():void {
my_str = my_str.charAt(my_str.length - 1) + my_str.slice(0, my_str.length - 1);
[code]....
View 1 Replies
Jul 4, 2006
I've made a horizontal news ticker that scrolls a string from right to left using substring method and by changing the alignment. This works OK but I would like the text to start displaying again before it disappears completly off the left of the screen. I've attached the fla and swf.
View 5 Replies
Sep 14, 2007
I need help related to kirupa's News Ticker Tutorial. I want the text to be fade in like it's fade out. Currently the text does not come with fade in effect. You can see the news ticker here: [URL]
[Code]...
View 1 Replies
Jan 6, 2005
I have this news scroller for work - Vertical member (160 X 600) And the idea is that it has 3 text fields (Headlines). These fields are lined up vertically (one at the top of the scroller, one at the middle, and one at the bottom.). I load them dynamically from XML, and after about 5 seconds, I have them all move up. (the top one goes up the top, and comes back from the bottom, the other two move up). The problem is that I am trying to center justify them. When they're loaded I can center justify them, using this code:
Code:
MovieClip.prototype.centerFunction = function() {
format = new TextFormat();
format.align = "center";
_root.news2.headline2_txt.setTextFormat(format);
_root.news3.headline3_txt.setTextFormat(format);
_root.news1.headline1_txt.setTextFormat(format);
}
Now, when they are first center justified by the code, they look slightly off, and once they move they arrange themselves correctly.
View 5 Replies
Feb 3, 2007
I've got a news-style scroller that has audio clips and text loaded in via an XML file. The text works fine and I can read the string of the mp3 file to play, but if I actually hit play, it only plays the LAST listed mp3 in the array instead of the one that should be playing.
Here's some code:
stop();
MovieClip.prototype.mV = function() {
this.onRollOver = function() {
this.t.colorTo(0x815249, .5);
this.roller.gotoAndPlay("over");
[Code] .....
What's happening is when you click the play button, it only plays the last song named in the XML file, and doesn't link to the correct url, but all the text is in the correct places.
View 6 Replies
Jul 13, 2009
I'm creating a vertical news scroller, that will eventually load in from an external text file and then just scroll the text in a movie clip vertically. I have this working but I have a couple of questions.
1. As the text reaches the end of the scroll I want it to start to fade out, I've added a IF statement to do this but it doesn't seem to fire. Why is this?
2. Even though I don't have any easing the scroll seems to slow down as its nearing the end of the animation, do you know why this is happening?
Code:
import gs.TweenLite;
import gs.easing.*;
var myTimer:Timer = new Timer(0,1);
myTimer.addEventListener(TimerEvent.TIMER, scrollNow);
myTimer.start();
[Code] .....
View 5 Replies
Mar 2, 2010
I'm making a very simple news ticker that uses XML to load four items: copy text, an image, date and a URL. The script was pieced together from tutorials and a bit of self-teaching, so I know it's probably not great. The AS is pasted below. Everything loads just fine, but the button script returns an "undefined" error. I assume this is because the item is no longer found in the array, but I'm not entirely sure. I also think it may be that the loadMovie method isn't working well with a specific item in the array. Also the link does not work. *Note* I know there are probably more advanced ways to tackle this but I'd like to keep this at my learning level so I can grow with it. :-)
[Code]....
View 4 Replies
Sep 1, 2010
I am trying to figure out how to dynamically populate textfields in Flash. The text in the fields will either say ON or OFF based on the value of bstatus.var bstatus will either have a value of 0 or 1 I have the following textfields listed below.I'm not sure if the syntax is correct, but I was thinking that the text fields would be in an array, and I would create a for loop--that will go through the array in order to have the fields populated.
var textFields:Array = new Array();
textFields[0] = compTxt.text;
textFields[1] = bathLightTxt.text;
[code].....
View 1 Replies
Mar 19, 2011
Despite adding: source="myScript.as" (that basically feeds the main.mxml file)
to my TitleWindow component MXML file (which I instantiate from the main.mxml file) the variables defined in myScript.as appear to be null hence I can't populate my text fields in the title window, even though those variables work fine in the main.mxml.
View 1 Replies
Aug 15, 2007
I'm trying to populate a set of dynamic text fields with text using a for() loop and cant seem to get it to work.I have 9 seperate dynamic text boxes each labled picNum0 - picNum8. I want to read a number of pictures from an external file then have those numbers populate 1 through 9 into the text fields.I get the variables loaded in with the correct values but the text fields wont populate.[code]When I trace(curPic) inside the for(){} it outputs: picNum0 - picNum8, so I know that the variables are allocating ok, but dynamic text fields arent populating with the correct numbers.
View 3 Replies
Jan 21, 2004
I've created a full flash site for a band. I need it to be easy for them to add news and press entries.
I know that I can do this with a database, but I want to do something with the entry text - like, when they have a link specified in the text (how can I do that, btw), when they submit the entry, flash/PHP/whatever should change it to the appropriate HTML code, and also change the color of the link (again with HTML). Only then will the information be displayable on the main flash site.
Know what I mean? Is this possible?
View 6 Replies
Aug 10, 2007
I have a Flash site I am developing that feeds in XML into various arrays and populates dynamic movie clips and text fields. I am having trouble making a for loop that works with my movieclips and text fields. I am probably only missing one step and if I can figure it out I will cut my lines of code about 10X. I have attached the fla and image files in a zip file.
View 1 Replies
May 25, 2009
Loading news via xml and then scrolling the news.
View 1 Replies
Dec 30, 2005
im trying to make my own news class with xml and i can't get it to work, all my text field says is "undefined";
here is my code:
Code:
_global.News = function(xml_file, txt_holder) {
this.xml_file = xml_file;
this.text_holder = txt_holder;
[Code]....
View 1 Replies
Mar 2, 2007
I have UP and DOWN buttons and i want them to scroll my newsMC when rolledOver.this is the code in emptyMC on a second frame:
Code:
if (_root.up) {
_root.newsMC._y += 10;[code]....
It works,but only after i roll over the UP button then both UP and DOWN work.If i go over down button first nothing happens
View 1 Replies
Nov 20, 2008
I created a News Ticker in Flash CS3 from a tutorial on your site URL...But it just flashes "undefined" I know I must be messing something up with the location of the XML file or where it's defined in the action script. I don't think I understand the "cache" part of the tutorial or why the file can't be local? I have gone to the suggested links in the tutorial, and being a total novice, I must be missing some main point.
View 3 Replies
Dec 23, 2008
I am trying to load a news feed in xml. It works fine when I run it in flash by clicking ctrl + enter but when I load the .swf in the browser or try to load the .html in the browser I get a Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation:
[Code]...
View 5 Replies
Oct 18, 2004
I just want a horizontal news ticker that loops a bunch of news headlines that are housed in an xml file. the headlines will link to pages will the full news story.
View 1 Replies
Jun 23, 2010
I am going to redesign a website and for that website I want there to be a news section on the homepage. The news section should be built in Flash with images representing news headlines animating on a loop however a user should be able to click one of these images and then within the homepage a Flash pop up will appear with the news article. This is similar to sites that have an image gallery with thumbnails of images but when an thumbnail is clicked then the full size image loads within the same webpage. I want a similar effect but in my case, when a full size image is clicked, a text based news article loads.
View 1 Replies
Nov 27, 2006
Could anyone recommend a nice and free Flash News Ticker?
View 6 Replies
May 1, 2009
I'd like to make a news slider for flash that not only shows images and text, but can also play videos that are presented as news, through an XML file or something.A good example is the flash news slider that ea.com uses, which can play videos on clal as well.Can anyone direct me to a tutorial or guide me here on how I cna achieve this through Flash CS4?
View 18 Replies
Jun 12, 2009
I am trying to make a very simple rss reader to display news feeds. All I really want to do is have a text box display the first item of the feed, wait for a moment, then display the next one. I've been searching around and can't find any decent tutorials on the subject.
View 1 Replies
Oct 2, 2010
How can I make such a News-Ticker as on URL...(The nice box, which has 4 advertisements is ment)I´m making a website for a friend and want to add something like this. Unfortunately its the first time I´m using Flash.
View 3 Replies
Aug 25, 2009
Here is what I'm trying to do: recreate the news ticker from [url]...
HEre is the trick: The client wants to be able to change the news themselves via an external .txt file, the also want each piece of news to link and the link will change..
I've got the text loading into the .swf just fine, but I have no idea how I can make the news pieces hot to a dynamically changing link that will be changed by them
View 6 Replies