ActionScript 2.0 :: Sorting Values From A RSS Feed?
Mar 13, 2010
I'm trying an an excersise of showing random products from a feed in a flash movie. I want to make a game where boxes fall from the sky and a user can click them. I have made the game, which was a fun learning curve. However, in each box i want some text to appear when clicked -a product, it's link and it's desciprtion. I really need to know the best way of pulling an RSS feed in this way, and also how to seperate the various values and to make only one product appear in each box.
View 3 Replies
Similar Posts:
Nov 6, 2010
In the project I'm working on, there are towers the user can place. However, it you place a tower higher then another one, it appears infront of that one, which looks weird.I want to be able to arrange all the towers so that that does not happen.There is an sprite called towerHolder holding, which all the towers are children of, and an array called towerArray, which the towers get pushed to when they are created.I tried clearing towerHolder, then running the sortOn() function on the array, and then adding each tower back to the towerHolder, but the towers just seem to be randomly placing themselves irrelevent to their height.Here's my code for the relevant parts:
Actionscript Code:
function clearTowers():void { while (towerHolder.numChildren > 0) { towerHolder.removeChildAt(0); }}function orderTowers():void { clearTowers();
[code]....
View 3 Replies
Jun 2, 2011
How can i accomplish sorting an array according to two values. Is there built in function for that?
View 2 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
Dec 15, 2003
I've got five movie clips (called horse1 through horse5) and I want to sort them to find out which has the highest x value. I thought putting them into an array and sorting that would be the best idea but I can't seem to get even the array to work.
This is the code I have so far;
for (n=1; n<6; n++) {
var hr = "horse"+[n];
myArray=[["horse"+[n], _level0.hr._x]];
[Code].....
View 6 Replies
Dec 15, 2003
I've got five movie clips (called horse1 through horse5) and I want to sort them to find out which has the highest x value. I thought putting them into an array and sorting that would be the best idea but I can't seem to get even the array to work.
[Code]...
View 6 Replies
Apr 8, 2011
I have been working on sorting Arraycollection like ascending , descending the numeric list. Total length of my collection will go up to 100. Now I want to preform sort to nested data like this
Data Structure
Name : String
Categories : Array ["A","x or y or z","C"]
Categories array will have maximum 3 items , out of that three items the second item can have 3 different values either X or Y or Z. My result data looks like here
{"Mike" , ["A","x","C"]}
{"Tim" , ["A","y","C"]}
{"Bob" , ["A","x","C"]}[code]....
anyone please explain how to sort this type of data in a way showing all "x" first , "y" next and "z" at the last and vice a versa.
View 2 Replies
Jul 12, 2011
I'm having a hard time wrapping my head around this problem. I have 2 unsorted arrays that need to be compared, array2 must contain all elements of array1 and array2 can any number of extra elements without affecting the result. I don't see any benefits from sorting the arrays and comparing the string values as array2 can have extra information causing noise.
[Code]...
View 5 Replies
Nov 10, 2009
I have a question on coustom sort..I have a datagrid for which one coloum has a itemrenderer. I need to sort a coloum based on the value in the item renderer. In the dataprovider for the datagrid i have a numeric value. Based on the numeric value in dataprovider i have a String associated with that value which is shown in UI. I need to sort based on the statusLabel associated with the numeric value.
[Code]...
View 3 Replies
Dec 6, 2010
I've gotten these sliders to work but can't get the output values to add up. For instance, depending on the values for slider 1, 2 and 3, I need the total to show up in a separate text box. I keep getting a NaN message in the text box.Here's the code I have so far:
//item 1
sliderOne.width = 600;
sliderOne.value = 0;[code].....
View 3 Replies
Mar 17, 2009
I have been deveolping my new site, which is in it's early stages and have most things working ok but i need to open new windows from buttons in the main swf file. please check out my link to see for yourself! new windows load in the same window ad the main swf. [URL] I have been using this code on the thumbs on my design and illustration sections
on (release) {
getURL("javascript:NewWindow=window.open('url.html ','newWin','width=1133,height=425,left=425,top=113 3,screenX=1133,screenY=425');NewWindow.focus();voi d(0);");
}
each of the thumb windows being a different specified size.
View 1 Replies
Nov 26, 2003
Given an XML file similar to this:
Code:
<class>
<student>
[code].....
View 2 Replies
Oct 21, 2009
Is there any way in Flex where in we can sort an arraycollection based on strings .I have a dataprovider with strings like "Critical" "High" "Medium" "Low" where in I need to sort it in such a way that I need Critical to be displayed on the top and next High , Medium and Low follows.
View 1 Replies
Apr 4, 2011
I have an advancedDataGrid and I would like to sort the adg according one AdvancedDataGridColumn(studyDate) which use strings in format DD/MM /YYYY(I receive like this from the server):But i find another problem, I need to sort the columns of the adg the first time it displays so I used the following function but It doesn't sort from the recent day to old one, I do not know what I can I do cause I set sort.descending= true, any ideas?[code]
View 1 Replies
Sep 26, 2011
I have a one comboBox that I fill as:
for (var key:String in values) {
conns.addItem(key);
}
After that I sorted my ComboBox as:
private function sortConnection():void {
var dataSortField:SortField = new SortField();
dataSortField.name = "data";
dataSortField.numeric = true;
var numericDataSort:Sort = new Sort();
numericDataSort.fields = [dataSortField];
conns.sort = numericDataSort;
conns.refresh();
}
And on finish I want to select item on my specific value in ComboBox. How can I do that? I try:
for (var ii:Number=0; ii<combo.rowCount; ii++) {
var item:String = combo.getChildAt(ii);
if (item == name) {
index = ii;
}}
But does not work. I do not know where I made mistake, and how I can select on specific item in my combobox.
View 2 Replies
Mar 28, 2012
I have been trying to sort an XMLListCollection following instructions like this for some time, without success. Here's the relevant code:
<fx:Declarations>
<s:HTTPService id="photoServ" url="pics.xml" resultFormat="e4x"/>
<s:XMLListCollection id="photoList" source = "{photoServ.lastResult.photo}"/>
[code]......
View 2 Replies
Mar 7, 2007
i'm trying to sort out some xml entries based on an attribute when you click a button. an example of my xml is below.
Code:
<list>
<entries cat="all">
[code].....
View 14 Replies
Jul 2, 2003
i just started with isometrics. i got the 3d to 2d coordinates working but i cant seem to get the z sorting to work.
View 2 Replies
Aug 7, 2009
i just started with isometrics. i got the 3d to 2d coordinates working but i cant seem to get the z sorting to work. please check the fla if you have knowledge in the subject.
View 6 Replies
Sep 18, 2009
Trying to re-sort an array of objects from:
var arr:Array = new Array({num:0},{num:1},{num:2},{num:3})
to
var arr:Array = ({num:0},{num:3},{num:1},{num:2})
View 2 Replies
Mar 23, 2010
- Put a bunch of MC's on the stage distributed horizontally.
- Store them in an array.
- yourArray.sortOn("x", Array.DESCENDING)
- loop though the now "sorted" array and trace their x property.
Doesn't work, does it? If it did, shuffle them up and try again (sometimes, perhaps randomly they will be in order).
View 7 Replies
Nov 22, 2010
I'm trying to bring XML nodes into an array so I can sort them in alphabetical order, then display the data in some textfields in a movieclip.I've managed to get the XML displaying fine in the movieclips and all the data in the arrays, but the problem is I'm not sure where to use name.sort();. Right now you can see I have it at the start of the loop that places all the data in, but it will only sort as it populates and hence becomes pointless.Is there a way to add all the data into an array, sort it, THEN display all the data in my movieClips?My XML looks like this:
PHP Code:
<example><item><name>Zack</name><donation>99</donation><message>Zacks msg</message></item><item><name>John</name><donation>70</donation><message>Johns msg</message></item><item><
[code]......
View 2 Replies
Apr 21, 2012
Rows B, D and E do not sort correctly, basically because I am assuming they have numbers with unmatching or too many places. I can not find any help online with this. The columns with percentages work fine unless they go over 99%. ?[code]...
View 7 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