ActionScript 2.0 :: RSS Feed With 1 'undefined' Node
Aug 8, 2006
I have the following code that is a part of an XML object in my actionscript. It fills a dynamic text field (which is buried in a few symbols) with text from the RSS feed.Problem is, one of the nodes on the RSS feed is empty. When it's empty, my text field returns 'undefined'. I've tried with the code below to specify if the text is 'undefined', then it should display something else, like HELLO for instance.
Code:
var news = newsNode.item[rssCounter].description.getValue();
if (news.htmlText == "undefined") {
_root.afterpreload.everything.ticker.newsmc.head.htmlText = "HELLO";
}else{
_root.afterpreload.everything.ticker.newsmc.head.htmlText = news;
}
I've had no luck, as the feed just plays as normal returning an 'undefined' whenever I get to the node with no data.
I've also tried...
Code:
if(news.htmlText == "") {
...but had no luck there either.
View 3 Replies
Similar Posts:
Mar 28, 2011
I can get all the normal nodes of my rss parsed fine but there are a few nodes that I am having trouble with. In the code below I can pull the info from "<item>", "<title>" and "<description>" but how would I go about pulling the info from the node "<enews:url>" ? Currently to get to item I am using: xml..item[0] in my parsing of the xml to an object.
Code: Select all<item>
<title>Blake Lively</title>
<enews:author/>
[Code]....
View 2 Replies
Mar 2, 2004
I am trying to call a functoin which will use the xml object to retrieve data and return the data to the function call. When I trace "test_var" inside the "book_xml.onLoad" functoin, it works. but I can pass the xml data out of the get_data function.
stop();
//define function
function get_data(id) {
[Code]....
View 3 Replies
Jul 7, 2009
How would I go about creating a conditional statement that checks to see if all the needed data in a particular node is defined or else move on to the next node in the iteration? AS3 to move through the XML:
[Code]...
View 7 Replies
Jan 14, 2010
I have an AdvancedDataGrid tree with a ArrayCollection as its dataprovider. Now, for instance, i drag a leaf from one node to another node. To catch the event I'm adding a Listener to dragComplete.
[Code]...
My Problem: I want to know the new node where the leaf was dropped. Actually i would have expected that in the event there is a property like dropParent. This is not the case.
View 1 Replies
Jan 18, 2011
I have a tree im my mxml that uses a XMLListCollection as dataProvider. It´s XML is like:
<list>
<conta nome="Plano de Contas" id="1">
<conta nome="Creditos" id="2" />
<conta nome="Vendas" id="4" />
[code]....
How can I make the node for, say, id==4 visible AND selected?
View 2 Replies
Sep 21, 2011
i have a question whether we can create a new xml node in as3 node containing dynamic value inside.....
as like if i want to get like..var newNode:XML = <IMAGE FULL="fullimages/3.jpg"THUMB="thumbnails/3.jpg"/>
where the images are dynamic values...
View 5 Replies
May 26, 2005
I thought this was going to be easy! I would like to search an XML file for a particular data set i.e. set of nodes depending on a passed variable. However, storing a subset of my XML file via Code:var gallery = this.firstChild; and then searching 'gallery' as you would an array-using a for()-doesn't work since this.firstChild isn't returning an array
Code:
<gallery>
<collection title="Christmas 2004">
[code].....
View 3 Replies
Sep 1, 2010
I've got some xml:
var xmlData:XML =
<1stNode>
<buttonID>first child node value</buttonID>
[Code]....
Then I want to read specific node value based on a value passed to a function. .
var buttonID = new Button;
var imageID = new Image;
var labelID = new Label;
[Code]....
I'm don't know how to get the value when node name is dynamically changed.
View 3 Replies
Jun 24, 2008
just trying to get straight how this works. Say I create some XML like so:
ActionScript Code:
var sample:XML = <sample>
<items>
[code]......
View 4 Replies
Oct 12, 2010
im having problems getting some as3 generated (not drawn on stage) movie clips moving across the screen.
Code:
package {
import flash.geom.ColorTransform;
import flash.display.MovieClip;
import fl.motion.Color;
import flash.display.*;
[code]....
View 7 Replies
Jul 12, 2007
i am using flash, .Net, and MySQL and have elements (text fields) posting in flash.Question is, if the table in the data base is not holding the var char how can I set the text field in flash to not show undefined and just be blank?
View 6 Replies
Aug 24, 2010
just creating a module to pull a BlogSpot feed. Having trouble reading it. XML object doesn't seem like it likes the way it's formatted.
Code:
import flash.net.URLLoader;
import flash.xml.*;
import flash.events.*;
import flash.net.URLRequest;
[Code]...
View 1 Replies
May 26, 2011
I've created a flash with an RSS feed inside it, I've seen it work on other websites but it won't work when I upload it to my server. I've tested it and had to authorize it on my local computer and it's all there, but flash seems to have blocked it when it's online, Here's my AS code, I'm using flash 8
Actionscript Code: [code].....
View 2 Replies
Dec 16, 2010
i'm trying to use actionscript to display an RSS feed on the stage. the code i am using is:
[Code]....
View 5 Replies
Apr 23, 2011
I'm rather new to Flash and AS3. I need to call a REST web service, passing it a location code and two arguments, and parse 3 nodes from the resulting XML.[code]...
View 1 Replies
Oct 4, 2010
pull some simple text from an external website's RSS feed into a basic text box in a Flash movie. It would need to be in AS2 to fit with the website. The RSS feed is on a PHP page: [URL]
I understand I need to pull the content via an xml / php page under my own domain in order to get around the Flash security, but I still can't scrape together the right code for it to work.
View 4 Replies
Jan 26, 2011
I have a few projects that are coming up at work where I will have to take a feed given to us and grab and display titles for example and pictures. I was able to do this in AS2 but I now need to do it in AS3 now and I don't have the time to dig in and figure it out. I would be willing to pay someone to display one of the images and one of the headlines in the example feed below. I think I can learn the rest, but there is a good chance I might need some more help and I would be willing to pay for that also. So basically I need a small script and a file that displays the info. Can you guys throw some offers my way here or at my email:
Note: If you use Firefox the feed will display and you can see where you would need to traverse this feed to get a headline and a pic
View 0 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
Jul 17, 2009
I made this BlogFeed.swf file. Everything works just fine in Flash IDE. It loads the XML, renders it, displays fine and that's it: the world is filled with love and data.
The problem occurs when I try to use my swf online.
Here's the scenario:
SERVER A (Altervista)
hosts the swf file, trying to read the RSS Feed from...
SERVER B (my client's server)
serves the RSS Feed of his blog
[ things I already tryed ]
1) I wrote a crossdomain.xml file (allowing SERVER B domain to access the swf), place it at the same level of the swf file on SERVER A;
2) Set System.security.allowInsecureDomain("*") in the flash file
3) checked on both servers the server-to-server permissions (Altervista lets you do this via its own control panel; the client's server needed me to email the support: did it and they allowed me to connect)
4) moved the swf on ANOTHER server, on which I am completely sure that server-to-server communications are allowed, since I already did something like that.
Nothing changes: always getting the damn HTTPStatus = 0 and no items are shown.
What I really don't understand is why it does work from Flash IDE connecting to SERVER B and it fails (with NO IOError and HTTPStatus = 0, so no debug hints at all...) when I use it in server-to-server mode.
View 1 Replies
Oct 21, 2009
setting up an RSS feed into my flash site. I've been trying to work with the code below, but when it displays the code includes all the HTML code of the RSS feed (ie image and link tags). I'd also like it to scroll.
Code (AS2):
Code:
// create a new XML object
var feed:XML = new XML();
[Code].....
View 2 Replies
Nov 7, 2009
I'm trying to get the last post of a clients' Twitter feed embedded into a dynamic .swf file. I thought I had it and indeed if you go here it works:
[URL]
but then I embedded it into the page and now I get the .swf to appear but no feed!
[URL]
It's supposed to connect to a php page that does the work and I'm enclosing it here. I do have crossdomain.xml set up properly. Anyone know why it doesn't connect on my page but it does by itself?
<?php
/*
* @return string
* @param string $url
[code]....
View 4 Replies
Nov 27, 2009
I've created this code for an RSS Feed Widget I would like to post on a site. the Widget will pull info from various sites. The code is built on Adobe CS4. When testing I don not get any errors, however, it does not display any information either.
Code:
var widget //Widget;
var rss;
var textfield:TextField;
addEventListener("widget-loaded",onWidgetLoaded);
function onWidgetResize( evt:Event ):void
[Code] .....
View 1 Replies
Jun 10, 2010
I know that you can grab your web server's current time with php, .net, or whatever server side scripting language you have available, and create a variable to feed into your flash movie at the embed time.What I am wondering is if there is a time server out there with an XML feed that you could connect to with flash to grab the current time based on whatever parameters you feed into the query string.I would doubt such a thing exists (at least for free) since so many people would probably tap into it and overload the server with requests, but it would be an easy way to set up someone's flash movie to grab a somewhat accurate current time stamp at load time (or any other time you'd want to call on it) without the need for server side scripting.
View 1 Replies
Jul 13, 2011
how I might get a Twitter widget working INSIDE a AS2 flash file?I found widgets on the twitter site, but, although I've seen references elsewhere to SWF widgets at twitter, right now the only thing I can find is using Javascript. (Maybe they canned all of the SWF widgets?)[I have found some AS3 stuff, but my understanding is that I can NOT load an AS3 swf into an AS2 one.]
Is there a way to load external javascript content into an object inside of the SWF? (kinda like an iFrame inside of the swf that can load the file with the javascript)
View 3 Replies
Jan 19, 2009
I'm trying to parse a RSS which comes from a page to Flash. But Im having some trouble, I wonder if someone could with some input/hits/tips whatever to take out links to picture, texts and attributes from the RSS so I can make flash with dynamic pictures. I found two components but I cant make them work.[URL] Also this tutorial but it seems confusing. I can get on with some articles, tutorials or something.?[URL]
View 3 Replies
Mar 16, 2010
I've just started experimenting with RSS in Flash - so far I am able to pull a feed in, but what I want to try now is to actually separate values from within a feed to go to different movie clips. So let's say my feed looks like this:
<rss version="2.0">
<channel>
<title>title goes here</title>
<link> [URL]>
<description>description</description>
[Code] .....
What I'm trying to do is have a few bubbles of boxes etc floating everywhere where you can click one and it shows a different (or random) <item> from the feed (with the relevant item child values inside). I've looked at creating nodes etc but it seems to only create to pulling the first one with that specific name, instead of choosing from the whole array.
View 5 Replies
May 25, 2010
I have never looked into RSS feeds before, I now have someone that wants Yahoo rss newsfeed embedded in his main.fla. I have an AS 2.0 rss newsreader he sent to me, knowing nothing about RSS I started to look around and eventually got to a point where I went to a Yahoo RSS feed and copied the source page and dropped it in the xml file that came with the feedreader. When saved, published and uploaded to the server the file displays the feed from yahoo fine, but it never update the stories. I would think this has to do with the xml as it is embedded in the page so it can't change so my question is how do I get an rss feed converted to xml to update???
View 1 Replies
Sep 14, 2010
Can you load an RSS Feed onto a web site with only Flash AS3 or do you need something else like flex?
View 1 Replies
Jan 10, 2011
I would like to have a map of the 50 U.S. states. I would like to click on a state and have a small pop-up window that displays the temperature of the capital of that state. After 5 seconds the pop-up closes. Behind the scenes I would also like the clicks being tracked by a database. I am digging around weather.com trying to figure out linking RSS feeds to Flash and I am thinking MySql to count the clicks. Does anyone have any tips or a quicker, easier way to set this up?
View 3 Replies