RE: [Flashcoders] Recursive:Part II

2010-03-22 Thread Lehr, Theodore
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:

Re: [Flashcoders] Recursive:Part II

2010-03-22 Thread mark . jonkman
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

RE: [Flashcoders] Flex3: how to refer the child canvas of a TabNavigator

2010-03-22 Thread Merrill, Jason
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

Re: [Flashcoders] Flex3: how to refer the child canvas of a TabNavigator

2010-03-22 Thread Dave Watts
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 to

[Flashcoders] xml: counting parents

2010-03-22 Thread Lehr, Theodore
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: person att=1 person att=2 person att=3/ person att=4/ /person /person 1 would return that it has 0 parents, 2 would

Re: [Flashcoders] xml: counting parents

2010-03-22 Thread Glen Pike
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: person att=1 person att=2 person

Re: [Flashcoders] xml: counting parents

2010-03-22 Thread Henrik Andersson
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

Re: [Flashcoders] xml: counting parents

2010-03-22 Thread Steven Sacks
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

Re: [Flashcoders] AS3 - Objective-C

2010-03-22 Thread Kevin Newman
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

Re: [Flashcoders] xml: counting parents

2010-03-22 Thread mark . jonkman
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

Re: [Flashcoders] xml: counting parents

2010-03-22 Thread kennethkawam...@gmail.com
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 =

[Flashcoders] flv stop loading / close netconnection

2010-03-22 Thread David Hunter
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

Re: [Flashcoders] xml: counting parents

2010-03-22 Thread Steven Sacks
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

RE: [Flashcoders] xml: counting parents

2010-03-22 Thread Lehr, Theodore
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: person name=Ted title=director of the world person name=Bob

Re: [Flashcoders] xml: counting parents

2010-03-22 Thread Eric E. Dolecki
How about having the nodes be more descriptive? director name=Ted deputy name=Bob ... /deputy /director Then use those node names On Mon, Mar 22, 2010 at 1:33 PM, Lehr, Theodore ted_l...@federal.dell.comwrote: Perhaps I do have a bigger issue (actually, I have LOTS of issues ;-), but the

Re: [Flashcoders] xml: counting parents

2010-03-22 Thread Steven Sacks
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,

Re: [Flashcoders] xml: counting parents

2010-03-22 Thread kennethkawam...@gmail.com
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 =

[Flashcoders] right-click triggers MOUSE_LEAVE?

2010-03-22 Thread Mattheis, Erik (MIN - WSW)
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

RE: [Flashcoders] xml: counting parents

2010-03-22 Thread Lehr, Theodore
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. person 1/ person 2/ or is it a child? person 1 person 2/ /person then auhhh I

RE: [Flashcoders] xml: counting parents

2010-03-22 Thread Lehr, Theodore
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

Re: Re[2]: [Flashcoders] AS3 - Objective-C

2010-03-22 Thread Matt S.
Thanks, I'll check these out as well! .m On Sat, Mar 20, 2010 at 7:43 AM, Greg Ligierko gre...@l-d5.com 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

RE: [Flashcoders] flv stop loading / close netconnection

2010-03-22 Thread David Hunter
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

Re: [Flashcoders] xml: counting parents

2010-03-22 Thread Kerry Thompson
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: people person name=Ted title=director of the world / person name=Jim title=Manager - North America / /people It would be

Re: [Flashcoders] xml: counting parents

2010-03-22 Thread Henrik Andersson
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

[Flashcoders] RE: right-click triggers MOUSE_LEAVE?

2010-03-22 Thread Mattheis, Erik (MIN - WSW)
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

Re: [Flashcoders] xml: counting parents

2010-03-22 Thread Steven Sacks
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. people person title=CEO name=Bill Gates person title=President name=Steve Ballmer/ person title=Manager - North America

RE: [Flashcoders] xml: counting parents

2010-03-22 Thread Lehr, Theodore
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

RE: [Flashcoders] xml: counting parents

2010-03-22 Thread Merrill, Jason
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

Re: [Flashcoders] xml: counting parents

2010-03-22 Thread Steven Sacks
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:

RE: [Flashcoders] flv stop loading / close netconnection

2010-03-22 Thread Mattheis, Erik (MIN - WSW)
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: [Flashcoders] flv stop loading / close netconnection

2010-03-22 Thread Cor
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:

RE: [Flashcoders] flv stop loading / close netconnection

2010-03-22 Thread David Hunter
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

RE: [Flashcoders] flv stop loading / close netconnection

2010-03-22 Thread David Hunter
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

Re: [Flashcoders] xml: counting parents

2010-03-22 Thread Kerry Thompson
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. people    person title=CEO name=Bill Gates        person title=President name=Steve Ballmer/        person title=Manager

Re: [Flashcoders] xml: counting parents

2010-03-22 Thread Dave Watts
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 sort

Re: [Flashcoders] xml: counting parents

2010-03-22 Thread Steven Sacks
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

[Flashcoders] Ángel Ambrosio quiere mantener el c ontacto en LinkedIn

2010-03-22 Thread Ángel Ambrosio
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

Re: [Flashcoders] Ángel Ambrosio quiere mantene r el contacto en LinkedIn

2010-03-22 Thread 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 PM, Ángel Ambrosio wrote: LinkedIn Ángel Ambrosio souhaite se connecter à vous sur LinkedIn :

Re: [Flashcoders] Ángel Ambrosio quiere mantener el contacto en LinkedIn

2010-03-22 Thread Zeh Fernando
Yeah. Just the normal someone wants to keep contact in linkedin type of stuff. 2010/3/22 Karl DeSaulniers k...@designdrumm.com 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,

Re: [Flashcoders] Ángel Ambrosio quiere mantene r el contacto en LinkedIn

2010-03-22 Thread Karl DeSaulniers
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 k...@designdrumm.com My

Re: [Flashcoders] Ángel Ambrosio quiere mantener el contacto en LinkedIn

2010-03-22 Thread Christian Pugliese
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 z...@zehfernando.com Yeah. Just the normal someone wants to keep contact in linkedin type of stuff. 2010/3/22 Karl DeSaulniers k...@designdrumm.com My spanish is

Re: [Flashcoders] Ángel Ambrosio quiere mantener el contacto en LinkedIn

2010-03-22 Thread Zeh Fernando
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 k...@designdrumm.com Who put flashcoders as the