Posts by timmylogue

332 posts
  • 8 Years of Membership
  • Collector Level 4
  • United States
timmylogue
says
I agreed with @pezflash. use a tweener for that. I hate onEnterframe things. And you can check greensock too, it is powerfull.
But Timmy, if you’re planing to sell your ticker here in AD, note that you’ll need to buy a GS license. I don’t use it but i know it’s a powerful engine.

Thanks. I don’t plan on selling it yet…. but if I do thanks for the heads up :D

332 posts
  • 8 Years of Membership
  • Collector Level 4
  • United States
timmylogue
says

Awesome. Thanks guys. Worked.

Tim

332 posts
  • 8 Years of Membership
  • Collector Level 4
  • United States
timmylogue
says

I’m building this RSS Ticker. It’s working but I’m having one issue with it. Right now I have it setup to use

setInterval(showNext,5000);
so every 5 sec it displays the next RSS article.

I need it to switch to the next article after the current article is done scrolling completely off the screen.

I’m sure you guys probably know what I’m doing wrong. This stuff is cake for you guys.

Thanks Tim

Here is my code:

#include "XMLSA.as" 

speed = 3
extraWaitTime = 500 //extra margin at end of text

//moves text to left
this.onEnterFrame = function(){
    body._x -= speed
    if(body._x < ((100-body._width)-extraWaitTime)){
        body._x = Stage.width
    }
}

// Setup text fields
body.autoSize = "right";
head.autoSize = "left";
body.text = "Loading Stories";

rssURL = "http://rss.cnn.com";
// Load the XML/RSS
news = new XMLSA();
// Load the RSS file

news.load("http://feeds.news.aol.com/synfeeds/artsynop/2604/rss.xml");
news.onLoad = function(success){
    parseText(news);
    if (success) {
        // Check RSS version and make shorthand
        if(news.channel[0].item){
            // Where to find data items for RSS 0.91
            newsNode = news.channel[0];
        } else {
            // Where to find data items for RSS 1.0 and 2.0
            newsNode = news;
        }
        // Store the number of news items
        rssCount = newsNode.item.length;
        // Call the showNext function
        setInterval(showNext,5000);
    } else {
        // Show error message
        body.text = "Error loading XML";
    }
}
// Function for getting next entry
showNext = function(){
    // Zero the counter if the last article has been shown
    if(rssCounter == rssCount || rssCounter == undefined){ rssCounter = 0; }
    // Get values from XMLSA array
    head.text         = newsNode.item[rssCounter].title.getValue();
    body.htmlText     = newsNode.item[rssCounter].description.getValue();
    rssURL             = newsNode.item[rssCounter].link.getValue();
    // Position the body text below the heading
    body._y = head._y + head._height;
    // Increment the counter
    rssCounter++;
}
332 posts
  • 8 Years of Membership
  • Collector Level 4
  • United States
timmylogue
says
Flash player now updates using an Adobe Download Manager who also automatically downloads and installs a McAfee Security Scan software which I don’t want! Argh! Are they trying to make people hate to install their products?!

\\

Thats what I see when I use Firefox and IE. You don’t see that?

- Tim

332 posts
  • 8 Years of Membership
  • Collector Level 4
  • United States
timmylogue
says
332 posts
  • 8 Years of Membership
  • Collector Level 4
  • United States
timmylogue
says

congrats!

332 posts
  • 8 Years of Membership
  • Collector Level 4
  • United States
timmylogue
says

thanks zoom! worked great!

Tim

332 posts
  • 8 Years of Membership
  • Collector Level 4
  • United States
timmylogue
says
should have mentioned it…

http://www.republicofcode.com/tutorials/flash/xml/

Yeah I realized that 20mins after I post it. I tried to add that I was using AS2 but I got a comment from activetofocus and you cant edit the post after the first comment :( sorry.

but anyway! thanks guys I’ll take a look at that!

Tim

332 posts
  • 8 Years of Membership
  • Collector Level 4
  • United States
timmylogue
says
var xml:XML;
var xmlLoader:URLLoader = new URLLoader();

xmlLoader.addEventListener(Event.COMPLETE, handleXML);
xmlLoader.load(new URLRequest("yourxml.xml"));

function handleXML(e:Event)
{
//when xml has loaded
xml = new XML(e.target.data);
trace(xml);
city=xml.city;
}
xml should look like this
<content>
<city>32</city>
</content>

AS2 ?

Thanks!

332 posts
  • 8 Years of Membership
  • Collector Level 4
  • United States
timmylogue
says

;)

does anyone know how to get this to work?

var city:String = "19134";

weather_data.load("load_xml.php?url=http%3A//www.google.com/ig/api?weather="+city);

I need the +city to read from a text file or xml.

Any ideas?

Thanks :D

Tim

by
by
by
by
by
by