ActionScript 3.0 :: Parsing Out An Image From Atom Feed?
Sep 11, 2010im loading an atom feed from a shopify store and need to access the image, the feed looks like this:
[Code]....
im loading an atom feed from a shopify store and need to access the image, the feed looks like this:
[Code]....
Wanna see something interesting?
var xml:XML = XML(<feed><entry /><entry /><entry /></feed>);
trace(xml.entry.length()) // returns 3
Makes sense, right? Now let's add this attribute. var xml:XML = XML(<feed xmlns="http://www.w3.org/2005/Atom"><entry /><entry /><entry /></feed>); trace(xml.entry.length()) // returns 0
Well that can't be right. Let's try it with a different attribute.
var xml:XML = XML(<feed test="okay"><entry /><entry /><entry /></feed>);trace(xml.entry.length()) // returns 3
Anyone know what would cause this? I used atom as an example, but any 'xmlns' attribute on the root node seems to have this effect. The value returned is straight up false - there are obviously still 3 'entry' child nodes regardless of the attributes their parents possess.
We changed atoms in our newspaper this Monday, but the new .atom feeds no longer parsing using me old .rss code.
View 2 RepliesI try to parse an blogger feed
[URL]
I work on part of the feed :
var myXm : XML = <feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:georss="http://www.georss.org/georss" xmlns:thr="http://purl.org/syndication/thread/1.0">
[code].....
I have seen the following methods to be used in several online examples, but haven't found any documentation on the recommended way of parsing an XML feed.[code]
View 1 RepliesI 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]....
I have a working Rss Feed that I coded with Flash and AS3 but Im only missing the correct code to load the image of a rss feed.For example:
Code:
//WORKS GREAT
titleList.push( theXMLData.channel.item[b].title );
[code].....
Tag Team back again! I feel like I'm on the right track here, but I'm lacking some operative vocabulary along with a fundamental understanding of how this might work.
Some background: There's a great Quality Measures Flash app here. I'm not trying to go all out and pull from an XML to load my content - I just want to accomplish something similar, though much simpler, using the items in my library.
[Code]...
i am wondering if it is possible, and if someone would be so kind to help me code a scene where two thumbnails, side by side, are flipped up and down, and back up, each time revealing a new random image culled from a feed such as a flickr feed (or any others available, is there a random google image search feed that i dont know about?).if this is possible, i would need assistance in coding the script so that the flash movie is dynamic and pulls image data in real time from the feed, displays it within the two thumbnail cells, and for added headache pain, i would hope to also learn how to code a random image to be selected based on a visitors date/time stamp.i am a graphic designer with rudimentary knowledge of action script 2.0 (yikes!) so please, go slowly / explain yourself. i have searched the forum, but i cannot find any previous threads that combine the random image generator idea with a live feed (unless if i missed it, please point it out to me if you can find such threads).
View 1 RepliesI want to read an Atom in Flex.I can see in the debugger that he can read the Atom and that there are entries, I can see each value. So far, so good.But when I want to assign a value from the atom to a variable, he never gives any text. It's always this: "".
My code:
ch.Name = xml.title;
ch.Desc = xml.subtitle;
ch.Updated = xml.updated;
[code]....
But that's strange, because I can see in the debugger that it schould be "Tweakers.net".It becomes even more strange, because it works just fine with RSS.
I'm trying to load YouTube playlist feed data and I'm having some trouble with the ATOM version, which is the YT default. I'm having no problems with the RSS version, but the RSS takes a few minutes longer to update when making changes to a playlist. I can load both and toXMLString(); both feeds but I'm getting an error when I try and parse the ATOM feed.So if the ATOM feed looks like this:
HTML Code:
<feed ... >
<entry>...</entry>
</feed>
Shouldn't I be able to get the following trace to work after the completed load where playlistXML is my new XML for the feed:
Code:
trace(playlistXML.entry[0].title);
I'm getting a "TypeError: Error #1010: A term is undefined and has no properties." when I try and output that title data.And the RSS is like this:
HTML Code:
<rss ... >
<channel>
<item>...</item>
[code]....
I am trying to play on a flash player a video file which has an DREF atom that points to an external movie.
The DREF box has value URL and points to an external video file which has the mdat. However the flash video player (netstream object?) is unable to load the external file. I have been trying to work this out for the last couple of weeks and any tips would be
I have a reader on my site, but it doesn't reader ATOM feeds?
View 1 RepliesI have converted the F4V to a single moof atom file and it now plays in Media Player and I can create a SWF player to play the video file but my question is, how do I convert the F4V single moof atom file into a FLV? Media Encoder will not except it
View 1 RepliesI want to pull in data from a rss / atom feed into flash and show a movieclip everytime the feed is updated. Most tutorials I find are about displaying the information. I want real time movieclips to display if and when the rss / atom feed is updated without any of the information from the actual feed displayed.
View 0 RepliesI have a couple of questions that I hope someone can answer. I have this ActionScript that reads the XML file into the flash movie. The poblem is this: The XML is in this format:
<listitem name="TEST" url="rtmp://000.000.000.000/">
<stream len="-1" name="Test" start="0"/>
<group name="Testing"/>
</listitem>
[code]....
i get a syntax error when everything seems to be in the right place, out..home.swf
PHP Code:
stop();
var xmlLoader:URLLoader = new URLLoader();
[code]........
I want to get id from this [URL] get this id in as3 and use this id in xml and show the message in text field.
[Code]...
This is my first day to try and use XML to display dynamic text in Flash. My skillset is weak with AS3 and Flash, but I found some tutorials online and I have managed to successfully display the first record in mytest.swf. However I also seem to have all records displaying in each dynamic text box as well. My loop isn't stopping after each record. It's reading everything. And dumping the results into each text field.
I need to only display each record individually. Once I accomplish that, I will need to include some form of navigation. Lets say buttons that perform a NEXT, PREVIOUS, LAST, FIRST type function. Then lastly, I'll need to include some type of search navigation option by item number. I assume that I'd have to have a second screen that links to my primary results screen with an input form for the item number.
[Code]...
I am accessing an xml document in actionscript, I know flash can see the xml as I am tracing it but when I add the .text() funtion to my trace to strip out the tags by trace doesn't see anything.
function LoadXML(e:Event):void {xmlData = new XML(e.target.data);ParseXML(xmlData);}function ParseXML(thexmlInput:XML):void {
trace("XML Output");trace("------------------------");trace(thexmlInput.wrapper.page);
[code].....
I am attempting to parse some weather information from the Yahoo weather RSS feed.This is a typical XML node;
<description>Yahoo! Weather for Palm Springs, CA</description>
I used the typical XML parsing code in as2;
var text1 = this.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue;
txt1.text = text1;
I was doing pretty good until I reached a node that was formatted thus;
<yweather:forecast day="Mon" date="28 Sep 2009" low="74" high="103" text="Sunny" code="32" />
This text traced a value of undefined.I have tried to research this and so far all I have been able to find out, is that this is a XML namespace and is very easily handled in as3. Unfortunately I have to use as2.How do I parse out this information into a dyamic text fields?
I am passing a XML document form the Java to Flex using Remote Object.[code]...
View 1 RepliesI'm trying to make a banner which the user can edit his Preferences in a xml file. My xml file looks like below.[code]that means image 1 has three textboxes with fontsize: 14,18,30.now i've the following problem.as you can see i've get function from my billboardData_array i want to call this get function in other classes to get the correct data i need. [code]this function returns the last fontsize but i need to loop through it to display text on the stage.
View 1 RepliesI am trying to parse out the nodeName but nothing was return, what is wrong with my script?
[Code]...
i have this response from a socket server:
[DataEvent type="data" bubbles=false
cancelable=false eventPhase=2
data="Segunda vez"]
How can i parse this info?, for example if i want the data value.
I have an xml file and im putting this xml file in an XML object
var receivedXML:XML
In some function, I have:
var xmlList:XMLList = new XMLList();
xmlList = receivedXML.some.attributes.here;
object.functionDoStuff = xmlList;
The function functionDoStuff takes xmlList as its argument:
function functionDoStuff(xmlList:XMLList) {}
When does receivedXML get parsed, is it when we assign it to xmlList, or is it when it gets used in the next instruction by the function functionDoStuff?
If I use the following XML it does not output anything. Please help me to find what is the issue.
PHP Code:
[Code]...
I have Visual studio with AS and Flex 4 installed into it. Can someone provide me with simple sample code and a simple xml file (can just be like a=8083&b=8873) and grabbing the data for a and b and putting this into 2 different arrays of size 1 (since its simple).
View 1 RepliesIs it possible to parse variables between different swf-files? Say that Ive got this main movie to which I load an external swf-file. Can I then send data from this externally loaded swf to the main movie?
View 1 RepliesI`m trying to load different texts from one XML file into my pre-defined areas. It works with one text....I gt to my frame where the as below is and the text gets loaded. BUT how do I need to proceed if I want to go to another frame and have a different text loaded from the same XML file?
Code:
function loadXML(loaded) {
if (loaded) {
_root.inventor = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
[Code]....