> If you think he wants to do "sorting" as you described it, why don't you
> post some code that does that instead of arguing about the code sample I
> posted trying to help him accomplish what I think he wants to do?
Hehe, that shut him up, Jason. :)
I already posted my solution to this list. :)
--
Andrew Murphy
Interactive Media Developer
amur...@delvinia.com
Delvinia
370 King Street West, 5th Floor, Box 4
Toronto Canada M5V 1J9
P (416) 364-1455 ext. 232
F (416) 364-9830
W www.delvinia.com
-Original Mess
You can do something like:
var xml:XML =
;
var a:Array = new Array();
for each(var item:XML in xml.node){
a.push(item);
}
a.sortOn(["@ccc"]);
var newxmllist:XMLList = new XMLList();
for(var i:uint = 0, len:uint = a.length; i < len; i++){
newxmllist += a[i];
}
tra
Merrill, Jason skriver:
Get an XMLList of all the nodes where the "aaa" attribute has a value of
"eee":
That's selection, not sorting.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashc
The Flash flvplayback component?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>> He never once made it look like selection. It is clearly a sorting
task.
>> He wants all the nodes, but in a different order, one defined by the
ordering
>> of their value fora given attribute.
Really? You're so sure? All he said was, "Any easy way to sort xml
based on an attribute: so if I
Merrill, Jason skriver:
That's selection, not sorting.
What is the difference from what he's trying to accomplish?
the end result?
He never once made it look like selection. It is clearly a sorting task.
He wants to sort the xml elements based on their attribute values.
He wants all the n
>> That's selection, not sorting.
What is the difference from what he's trying to accomplish? I don't see
why it matters - if you did a sort to *get* the nodes, then you're doing
a selection anyway. You're talking semantics, but I think what I showed
him is what he wants to do.
Jason Merrill
Get an XMLList of all the nodes where the "aaa" attribute has a value of
"eee":
var myXML:XML =
var mySortedXMLList:XMLList = myXML.node.(@aaa=="eee");
trace(mySortedXMLList);
Jason Merrill
Instructional Technology Architect
Bank of America Global Learning
Join the Bank
Hh - maybe if I made it a multidimensional array - how would you sort that?
From: Lehr, Theodore
Sent: Tuesday, August 31, 2010 10:28 AM
To: Flash Coders List
Subject: sorting xml
Any easy way to sort xml based on an attribute:
so if I want
Yahoo! Messenger IMVs are made with SWFs. Are there any other chat clients or
consumer apps that use SWFs to create custom skins?
_ _ _
Erik Mattheis
Senior Web Developer
Minneapolis
T 952 346 6610
C 612 377 2272
Weber Shandwick
Advocacy starts here.
PRWeek Global Agency Report Card 2009 - Gol
Any easy way to sort xml based on an attribute:
so if I wanted to sort based on aas or ccc
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
so whats your solution?
On Tue, Aug 31, 2010 at 9:42 AM, Andrew Murphy wrote:
> Thank you, but I came up with a solution. :)
>
> --
> Andrew Murphy
> Interactive Media Developer
> amur...@delvinia.com
>
> Delvinia
> 370 King Street West, 5th Floor, Box 4
> Toronto Ca
Thank you, but I came up with a solution. :)
--
Andrew Murphy
Interactive Media Developer
amur...@delvinia.com
Delvinia
370 King Street West, 5th Floor, Box 4
Toronto Canada M5V 1J9
P (416) 364-1455 ext. 232
F (416) 364-9830
W www.delvinia.com
-Original Messa
Good morning.
I came up with a solution, it's not elegant but it works:
1) Break up the HTML into an array of chunks of code based on where the
links occour. So this:
[p]Lorem ipsum [a href="event:block1"]dolor sit[/a] amet.[/p]
Gets turned into this:
blocks[0] = [p]Lorem ipsum
I have textfield link detection in this class -
https://code.google.com/p/kurstcode/source/browse/trunk/libs/com/kurst/utils/TextFieldUtils.as
using it for link roll-over / roll-out events. And I think it could be extended
to get the link's start/end position.
Have a look at the 'dete
16 matches
Mail list logo