Works great... I am wondering now How would I track where I am as I go
through the xml... I would like to know when I am at the "parent" or when I am
at a "child" or when I move into a "grandchild" and so on and son on
From: flashcoders-boun...@ch
Hi
If your using recursion you could do something like the following (email, AS3,
not tested):
public function createPeople (pNode:XML, pDepth:uint=0):void
{
// lets assume that you might have child nodes that aren't "person" nodes. So
select only the nodes
// of type person. Even if no p
>> not sure if Flex questions are allowed here?
Not sure if they are disallowed, but IMO, the best place to ask
questions like this is the Flexcoders list on Yahoo.
Jason Merrill
Bank of America Global Learning
Learning & Performance Solutions
Join the Bank of America Flash Platform Commun
> > not sure if Flex questions are allowed here?
>
> Not sure if they are disallowed, but IMO, the best place to ask
> questions like this is the Flexcoders list on Yahoo.
They certainly aren't disallowed, but Jason is right about Flexcoders
being a better bet for answering Flex questions. I try t
I am still trying to find a way to see where a child is within the xml - on
what level... is it possible to count a nodes parents?
So if I had:
1 would return that it has 0 parents, 2 would say it has 1 parent, 3 & 4 would
say they have 2 parents
ho
You can access the parent of any XMLNode with it's parentNode property
Lehr, Theodore wrote:
I am still trying to find a way to see where a child is within the xml - on
what level... is it possible to count a nodes parents?
So if I had:
1 would return
Glen Pike wrote:
You can access the parent of any XMLNode with it's parentNode property
But that is the old xml parser. Most people uses the new one.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/l
I think you mean ancestors. A node can only have one parent. Parents can have
many children.
I think you have a bigger issue, though. Why do you need to know the depth of an
xml node? I can't think of a single example that I would need that information.
On 3/22/2010 9:27 AM, Lehr, Theodore w
I had no trouble following this tutorial:
http://cocoadevcentral.com/d/learn_objectivec/
The C one was enlightening really. Worth the read even if you don't end
up developing in C or Objective-C
Kevin N.
On 3/11/10 10:15 AM, Matt S. wrote:
Have any of you taken on the challenge of learnin
If you have a node, you can count its depth using one of two methods
calling a recursive function or simply doing something like this:
var p:XML = myNode;
var depth:uint = 0;
while (p.parent() != undefined)
{
depth++;
p = p.parent();
}
// depth here would be the number of parent.
if yo
It's very hackish, but here we go :)
Say you have this recursive function:
private function transformXMLWithParentCount(original:XML, xml:XML,
n:uint):void {
for(var i:uint = 0, len:uint = xml.children().length(); i < len; i++){
original..*.(@att == xml.children()[...@att)@parent = n
Hi list, . Reallly hoping for some help on this.. Making a portfolio site
that handles both images and video. I have an flv instance and a sprite that
contains loaded images. Images and videos work fine. The problem is if I try to
go to an image half way through a video downloading. in that
A few optimizations for general coding practice:
uint is slower than int for math and should only be used if you're not doing
math on it. Number is faster than uint for numbers higher than int's positive
limit. Generally speaking, always use int in for/while loops.
There's no need to call p.
Perhaps I do have a bigger issue (actually, I have LOTS of issues ;-), but the
reason I need to know the depth is my thought was to use that as a means of
assisting in layout for example, say you have the follwing xml:
How about having the nodes be more descriptive?
...
Then use those node names
On Mon, Mar 22, 2010 at 1:33 PM, Lehr, Theodore
wrote:
> Perhaps I do have a bigger issue (actually, I have LOTS of issues ;-), but
> the reason I need to know the depth is my thought was to use that as a means
> o
Why not go from the top down instead of the bottom up?
On 3/22/2010 10:33 AM, Lehr, Theodore wrote:
Perhaps I do have a bigger issue (actually, I have LOTS of issues ;-), but the
reason I need to know the depth is my thought was to use that as a means of
assisting in layout for example, s
I don't think you need to know the depth of the node in order to
create a chart because you can traverse the XML and generate the chart
as you go along.
But if you need to know the deapth:
function transformXMLWithParentCount(original:XML, xml:XML, n:uint):void {
for(var i:uint =
I want to allow users to copy text from a dynamic text field. When I
right-click on the textfield the MOUSE_LEAVE event fires (which hides the
textfield - I intend for MOUSE_LEAVE to hide the textfield).
Googling, I find no results of someone else experiencing the problem I'm
assuming this isn
I guess... I just can not wrap my head around how to get a useable number to
assist in layout... Say that I know the first member will be at the top of the
chart... then the second - is it a sibling? i.e.
or is it a child?
then auhhh I don;t know I need to go for a run or s
But that is what I am trying to do as I go along I am going through the xml
line by line (of course) so as I go line by line, I need a way to find out who
this node belongs to and where it should be Is it a sibling of a prevoius
node or a child of a child
___
Thanks, I'll check these out as well!
.m
On Sat, Mar 20, 2010 at 7:43 AM, Greg Ligierko wrote:
> I am learning ObjC for about a month. The purpose is porting and
> existing AS2 application to iphone/ipad. Having very poor C experence
> I can say, that knowing C is not something essential to fami
sorry, my emails always seem to lose returns somehow! very annoying.
Essentially how do i stop a progressively downloading flv from continuing to
download?
All help greatly appreciated,
David
> From: davehunte...@hotmail.com
> To: flashcoders@chattyfig.figleaf.com
> Date: Mon, 22 Mar 2010 17:34
I agree with Eric. Your basic issue is the way you're forming your XML.
First, the way you have it, there is no need to have a hierarchy. This
would work just as well:
It would be better, though, to make the node names meaningful and
hierarchical. So, something like this:
Steven Sacks wrote:
A few optimizations for general coding practice:
uint is slower than int for math and should only be used if you're not
doing math on it. Number is faster than uint for numbers higher than
int's positive limit. Generally speaking, always use int in for/while
loops.
I believ
Code that illustrates the behavior I'm trying to avoid:
stage.addEventListener(Event.MOUSE_LEAVE, stageOffHandler);
// embed code is a dynamic textfield
embedCode.text = 'Here is somer text';
embedCode.addEventListener(MouseEvent.CLICK, selectAllEmbedCode);
function selectAllEmbedCode(e:MouseEv
I disagree with using explicit node names. He's building an org chart of
people, so the nodes should be person and the title should be an attribute.
You create a Person VO that you pass the node for deserialization:
public class Person
{
nice... is vector do-able in cs3 - because I am egtting an error on that...
From: flashcoders-boun...@chattyfig.figleaf.com
[flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Steven Sacks
[flash...@stevensacks.net]
Sent: Monday, March 22, 2010 3:19
>> nice... is vector do-able in cs3 - because I am egtting an error on
that...
No - Vector is only Flash player 10. But with some tweaks, you can use
Array instead.
Jason Merrill
Bank of America Global Learning
Learning & Performance Solutions
Join the Bank of America Flash Platform Commu
Vector is Flash 10 only. So I don't think it works in CS3.
You can substitute Array if you're targeting Flash Player 9.
On 3/22/2010 12:39 PM, Lehr, Theodore wrote:
nice... is vector do-able in cs3 - because I am egtting an error on that...
From: flash
>I need to use myFLV.getVideoPlayer(0).close() to stop the download
Try myFLV.closeVideoPlayer()
_ _ _
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 - Gold Medal Winner
The Holmes Re
I had a kind of problem like that and the solution was;
myFLV.getVideoPlayer(myFLV.activeVideoPlayerIndex).close();
HTH
Cor
-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Mattheis,
Erik (MIN - WSW)
Sent:
Thanks for responding Erik.
Unfortunately I can't use closeVideoPlayer() as it shuts the default player
which isn't allowed. On a side note I can't find anything in the docs on adding
new instances of VideoPlayer Class to an FLV even though there is plenty of
talk of getting different VideoPlay
Thanks Cor,
I've used that sort of call when stopping an flv from playing when closing a
loaded swf. But in this case I need to be able to reconnect the flv again, I'm
not disposing of the FLVPlayback. All I want to do is stop the progressive
download but this seems difficult to do from an inst
Steven Sacks wrote:
> I disagree with using explicit node names. He's building an org chart of
> people, so the nodes should be person and the title should be an attribute.
>
>
>
>
>
>
>
>
>
It's unusual to find myself disagreeing with Steven Sacks--
> But here I do disagree. An org chart shows the organization of a unit,
> and the people are secondary. When Steve Ballmer resigns or gets hired
> by Google, Microsoft will still have a president.
So if there's an organizational shuffle of roles, I'd have to rewrite
my XML schema? Because that so
> So if there's an organizational shuffle of roles, I'd have to rewrite
> my XML schema? Because that sort of thing happens all the time, and a
> rigid hierarchy simply won't be able to match that without frequent
> changes.
Precisely.
My solution uses design patterns, encapsulation and DRY. It
LinkedIn
Ángel Ambrosio souhaite se connecter à vous sur LinkedIn :
--
Marc:
Me gustaría añadirte a mi red profesional en LinkedIn.
- Ángel Ambrosio
Accepter l'invitation de Ángel Ambrosio
http://www.linkedin.com/e/XEzBlT6odM8buZtuxRkFg2aRojm
My spanish is rusty, what did he/she ask?
Is this another one of those emails where someone is wanting
Flashcoders as a friend on LinkedIn?
Karl
On Mar 22, 2010, at 5:55 PM, Ángel Ambrosio wrote:
LinkedIn
Ángel Ambrosio souhaite se connecter à vous sur LinkedIn :
---
Yeah. Just the normal "someone wants to keep contact in linkedin" type of
stuff.
2010/3/22 Karl DeSaulniers
> My spanish is rusty, what did he/she ask?
> Is this another one of those emails where someone is wanting Flashcoders as
> a friend on LinkedIn?
>
> Karl
>
>
>
> On Mar 22, 2010, at 5:55
Who put flashcoders as the contact for their LinkedIn profile? lol
Or is it because of the groups?
Karl
On Mar 22, 2010, at 9:04 PM, Zeh Fernando wrote:
Yeah. Just the normal "someone wants to keep contact in linkedin"
type of
stuff.
2010/3/22 Karl DeSaulniers
My spanish is rusty, what
thought i was the only one to notice that, and for a second i thought my
name was marc... lol
chris.
2010/3/22 Zeh Fernando
> Yeah. Just the normal "someone wants to keep contact in linkedin" type of
> stuff.
>
> 2010/3/22 Karl DeSaulniers
>
> > My spanish is rusty, what did he/she ask?
> >
This is more likely because someone had the list's email in their contact
list (say, a gmail contact list), and they use the "invite your friends!"
feature of those websites without a lot of care, bulk-inviting everybody.
2010/3/22 Karl DeSaulniers
> Who put flashcoders as the contact for their
42 matches
Mail list logo