Re: [Flashcoders] Ángel Ambrosio quiere mantener el contacto en LinkedIn
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 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 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 : >> -- >> >> 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/XEzBlT6odM8buZtuxRkFg2aRojmbrRCwd4dkwunRTj8bdkAw2T/blk/I1907571572_2/1BpC5vrmRLoRZcjkkZt5YCpnlOt3RApnhMpmdzgmhxrSNBszYOnP8Tdj4TdjsMej59bSV3nQ8OlP15bPcPcjkQe3oScj4LrCBxbOYWrSlI/EML_comm_afe/ >> >> Voir l'invitation de Ángel Ambrosio >> >> >> http://www.linkedin.com/e/XEzBlT6odM8buZtuxRkFg2aRojmbrRCwd4dkwunRTj8bdkAw2T/blk/I1907571572_2/39vczsRcjsRdP0VckALqnpPbOYWrSlI/svi/ >> -- >> >> SAVEZ-VOUS que vous pouvez être le premier informé quand un membre de >> votre >> réseau change de poste ? Les "Nouvelles du réseau" sur votre page >> d'accueil >> LinkedIn vous informe des évolutions de carrière dans votre réseau. Soyez >> le/la premier(e) informé(e) ! >> http://www.linkedin.com/ >> >> >> -- >> (c) 2010, LinkedIn Corporation >> ___ >> Flashcoders mailing list >> Flashcoders@chattyfig.figleaf.com >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >> >> Karl DeSaulniers >> Design Drumm >> http://designdrumm.com >> >> >> >> ___ >> Flashcoders mailing list >> Flashcoders@chattyfig.figleaf.com >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >> >> ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Karl DeSaulniers > Design Drumm > http://designdrumm.com > > > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Ángel Ambrosio quiere mantener el contacto en LinkedIn
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? > > 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 : > > -- > > > > 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/XEzBlT6odM8buZtuxRkFg2aRojmbrRCwd4dkwunRTj8bdkAw2T/blk/I1907571572_2/1BpC5vrmRLoRZcjkkZt5YCpnlOt3RApnhMpmdzgmhxrSNBszYOnP8Tdj4TdjsMej59bSV3nQ8OlP15bPcPcjkQe3oScj4LrCBxbOYWrSlI/EML_comm_afe/ > > > > Voir l'invitation de Ángel Ambrosio > > > > > http://www.linkedin.com/e/XEzBlT6odM8buZtuxRkFg2aRojmbrRCwd4dkwunRTj8bdkAw2T/blk/I1907571572_2/39vczsRcjsRdP0VckALqnpPbOYWrSlI/svi/ > > -- > > > > SAVEZ-VOUS que vous pouvez être le premier informé quand un membre de > votre > > réseau change de poste ? Les "Nouvelles du réseau" sur votre page > d'accueil > > LinkedIn vous informe des évolutions de carrière dans votre réseau. Soyez > > le/la premier(e) informé(e) ! > > http://www.linkedin.com/ > > > > > > -- > > (c) 2010, LinkedIn Corporation > > ___ > > Flashcoders mailing list > > Flashcoders@chattyfig.figleaf.com > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > > > Karl DeSaulniers > > Design Drumm > > http://designdrumm.com > > > > > > > > ___ > > Flashcoders mailing list > > Flashcoders@chattyfig.figleaf.com > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Ángel Ambrosio quiere mantene r el contacto en LinkedIn
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 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 : -- 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/ XEzBlT6odM8buZtuxRkFg2aRojmbrRCwd4dkwunRTj8bdkAw2T/blk/ I1907571572_2/1BpC5vrmRLoRZcjkkZt5YCpnlOt3RApnhMpmdzgmhxrSNBszYOnP8Tdj 4TdjsMej59bSV3nQ8OlP15bPcPcjkQe3oScj4LrCBxbOYWrSlI/EML_comm_afe/ Voir l'invitation de Ángel Ambrosio http://www.linkedin.com/e/ XEzBlT6odM8buZtuxRkFg2aRojmbrRCwd4dkwunRTj8bdkAw2T/blk/ I1907571572_2/39vczsRcjsRdP0VckALqnpPbOYWrSlI/svi/ -- SAVEZ-VOUS que vous pouvez être le premier informé quand un membre de votre réseau change de poste ? Les "Nouvelles du réseau" sur votre page d'accueil LinkedIn vous informe des évolutions de carrière dans votre réseau. Soyez le/la premier(e) informé(e) ! http://www.linkedin.com/ -- (c) 2010, LinkedIn Corporation ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Ángel Ambrosio quiere mantener el contacto en 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 PM, Ángel Ambrosio wrote: > > 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/XEzBlT6odM8buZtuxRkFg2aRojmbrRCwd4dkwunRTj8bdkAw2T/blk/I1907571572_2/1BpC5vrmRLoRZcjkkZt5YCpnlOt3RApnhMpmdzgmhxrSNBszYOnP8Tdj4TdjsMej59bSV3nQ8OlP15bPcPcjkQe3oScj4LrCBxbOYWrSlI/EML_comm_afe/ > > Voir l'invitation de Ángel Ambrosio > > http://www.linkedin.com/e/XEzBlT6odM8buZtuxRkFg2aRojmbrRCwd4dkwunRTj8bdkAw2T/blk/I1907571572_2/39vczsRcjsRdP0VckALqnpPbOYWrSlI/svi/ > -- > > SAVEZ-VOUS que vous pouvez être le premier informé quand un membre de votre > réseau change de poste ? Les "Nouvelles du réseau" sur votre page d'accueil > LinkedIn vous informe des évolutions de carrière dans votre réseau. Soyez > le/la premier(e) informé(e) ! > http://www.linkedin.com/ > > > -- > (c) 2010, LinkedIn Corporation > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Karl DeSaulniers > Design Drumm > http://designdrumm.com > > > > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Ángel Ambrosio quiere mantene r el contacto en LinkedIn
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 : -- 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/ XEzBlT6odM8buZtuxRkFg2aRojmbrRCwd4dkwunRTj8bdkAw2T/blk/ I1907571572_2/1BpC5vrmRLoRZcjkkZt5YCpnlOt3RApnhMpmdzgmhxrSNBszYOnP8Tdj4T djsMej59bSV3nQ8OlP15bPcPcjkQe3oScj4LrCBxbOYWrSlI/EML_comm_afe/ Voir l'invitation de Ángel Ambrosio http://www.linkedin.com/e/ XEzBlT6odM8buZtuxRkFg2aRojmbrRCwd4dkwunRTj8bdkAw2T/blk/ I1907571572_2/39vczsRcjsRdP0VckALqnpPbOYWrSlI/svi/ -- SAVEZ-VOUS que vous pouvez être le premier informé quand un membre de votre réseau change de poste ? Les "Nouvelles du réseau" sur votre page d'accueil LinkedIn vous informe des évolutions de carrière dans votre réseau. Soyez le/la premier(e) informé(e) ! http://www.linkedin.com/ -- (c) 2010, LinkedIn Corporation ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Ángel Ambrosio quiere mantener el c ontacto en LinkedIn
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/XEzBlT6odM8buZtuxRkFg2aRojmbrRCwd4dkwunRTj8bdkAw2T/blk/I1907571572_2/1BpC5vrmRLoRZcjkkZt5YCpnlOt3RApnhMpmdzgmhxrSNBszYOnP8Tdj4TdjsMej59bSV3nQ8OlP15bPcPcjkQe3oScj4LrCBxbOYWrSlI/EML_comm_afe/ Voir l'invitation de Ángel Ambrosio http://www.linkedin.com/e/XEzBlT6odM8buZtuxRkFg2aRojmbrRCwd4dkwunRTj8bdkAw2T/blk/I1907571572_2/39vczsRcjsRdP0VckALqnpPbOYWrSlI/svi/ -- SAVEZ-VOUS que vous pouvez être le premier informé quand un membre de votre réseau change de poste ? Les "Nouvelles du réseau" sur votre page d'accueil LinkedIn vous informe des évolutions de carrière dans votre réseau. Soyez le/la premier(e) informé(e) ! http://www.linkedin.com/ -- (c) 2010, LinkedIn Corporation ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] xml: counting parents
> 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 makes for very lean code and is completely flexible and scalable. Also, organizations of people are made up of people, not units. If Steve Ballmer leaves and somebody else is President, then the name changes, but not the role/title. I don't see how writing tons of custom Actionscript to parse custom nodes in XML is a workable solution. It's not scalable, it's not flexible. If you add a new role at your company, you have to write new code to support the parsing of that node name and a new class to handle drawing it, as well. The Strategy pattern (which is present in my example) was made to solve this issue elegantly. Let's take it out of XML altogether. Would you write a bunch of classes like this? public class Director { public var title:String; public var name:String; public var somethingDirectorsAndAboveHave:String; public var somethingManagersAndAboveHave:String; } public class Manager { public var title:String; public var name:String; public var somethingManagersAndAboveHave:String; } public class Person { public var title:String; public var name:String; } Or this... public class Person { public var title:String; public var name:String; } public class Manager extends Person { public var somethingManagersAndAboveHave:String; } public class Director extends Manager { public var somethingDirectorsAndAboveHave:String; } If that's even necessary, which I'm not sure it is in the data. It seems like the role of the person only defines how they're rendered in the view and potentially what events they fire off to the controller (if you're using RobotLegs, you can pair with a Mediator). Leave rendering instructions out of the data and put it in the view where it belongs. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] xml: counting parents
> 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 of thing happens all the time, and a rigid hierarchy simply won't be able to match that without frequent changes. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] xml: counting parents
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--you're usually right on money. 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. It's also clearer to read, and easier to program, when every node isn't named the same. Of course, there should be some flexibility--instead of you could have something more generic, such as . Cordially, Kerry Thompson ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] flv stop loading / close netconnection
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 instance of FLVPlayback! Cheers > From: c...@chello.nl > To: flashcoders@chattyfig.figleaf.com > Subject: RE: [Flashcoders] flv stop loading / close netconnection > Date: Mon, 22 Mar 2010 21:35:29 +0100 > > 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: maandag 22 maart 2010 21:32 > To: Flash Coders List > Subject: RE: [Flashcoders] flv stop loading / close netconnection > > >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 Report Global Agency of the Year > PR News Agency of the Year > > > -Original Message- > From: flashcoders-boun...@chattyfig.figleaf.com > [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of David Hunter > Sent: Monday, March 22, 2010 12:34 PM > To: flashcoders@chattyfig.figleaf.com > Subject: [Flashcoders] flv stop loading / close netconnection > > > 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 > situation i jump to the image and once the video has finished downloading it > suddenly appears. Going from video to video (halfway through a download) is > fine as the source is being overwritten each time but when it comes to an > image I need to use myFLV.getVideoPlayer(0).close() to stop the download. > That works ok except if I try to go back to the same video which download I > terminated then it says "Error: Cannot call reconnect on an http > connection" . I cannot set the source to be "" or null either or it pulls an > error. . Can anyone give me any help on stopping an FLV from loading once > you have set the source and then being able to restart that download? . > Thanks in advance, > David > _ > We want to hear all your funny, exciting and crazy Hotmail stories. Tell us > now > http://clk.atdmt.com/UKM/go/195013117/direct/01/ > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > Geen virus gevonden in het binnenkomende-bericht. > Gecontroleerd door AVG - www.avg.com > Versie: 9.0.791 / Virusdatabase: 271.1.1/2763 - datum van uitgifte: 03/22/10 > 08:33:00 > > > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders _ Do you have a story that started on Hotmail? Tell us now http://clk.atdmt.com/UKM/go/195013117/direct/01/___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] flv stop loading / close netconnection
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 VideoPlayer classes stacked inside an FLVPlayback instance (eg. myFLVPlayback.getVideoPlayer() or myFLVPlayback.visibleVideoPlayerIndex ) . Any ideas? I have temporarily solved the problem with the nastiest workaround ever by passing "#" as the source. Seems to work for some reason but I'm sure it will come back and bite me. In the end I may have to make a new instance of FLVPlayback for each video and kill the old instance. Thanks, David > From: ematth...@webershandwick.com > To: flashcoders@chattyfig.figleaf.com > Date: Mon, 22 Mar 2010 15:31:52 -0500 > Subject: RE: [Flashcoders] flv stop loading / close netconnection > > >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 Report Global Agency of the Year > PR News Agency of the Year > > > -Original Message- > From: flashcoders-boun...@chattyfig.figleaf.com > [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of David Hunter > Sent: Monday, March 22, 2010 12:34 PM > To: flashcoders@chattyfig.figleaf.com > Subject: [Flashcoders] flv stop loading / close netconnection > > > 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 situation i > jump to the image and once the video has finished downloading it suddenly > appears. Going from video to video (halfway through a download) is fine as > the source is being overwritten each time but when it comes to an image I > need to use myFLV.getVideoPlayer(0).close() to stop the download. That works > ok except if I try to go back to the same video which download I terminated > then it says "Error: Cannot call reconnect on an http connection" . I cannot > set the source to be "" or null either or it pulls an error. . Can anyone > give me any help on stopping an FLV from loading once you have set the source > and then being able to restart that download? . Thanks in advance, > David > _ > We want to hear all your funny, exciting and crazy Hotmail stories. Tell us > now > http://clk.atdmt.com/UKM/go/195013117/direct/01/___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders _ Send us your Hotmail stories and be featured in our newsletter http://clk.atdmt.com/UKM/go/195013117/direct/01/___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] flv stop loading / close netconnection
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: maandag 22 maart 2010 21:32 To: Flash Coders List Subject: RE: [Flashcoders] flv stop loading / close netconnection >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 Report Global Agency of the Year PR News Agency of the Year -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of David Hunter Sent: Monday, March 22, 2010 12:34 PM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] flv stop loading / close netconnection 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 situation i jump to the image and once the video has finished downloading it suddenly appears. Going from video to video (halfway through a download) is fine as the source is being overwritten each time but when it comes to an image I need to use myFLV.getVideoPlayer(0).close() to stop the download. That works ok except if I try to go back to the same video which download I terminated then it says "Error: Cannot call reconnect on an http connection" . I cannot set the source to be "" or null either or it pulls an error. . Can anyone give me any help on stopping an FLV from loading once you have set the source and then being able to restart that download? . Thanks in advance, David _ We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now http://clk.atdmt.com/UKM/go/195013117/direct/01/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Geen virus gevonden in het binnenkomende-bericht. Gecontroleerd door AVG - www.avg.com Versie: 9.0.791 / Virusdatabase: 271.1.1/2763 - datum van uitgifte: 03/22/10 08:33:00 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] flv stop loading / close netconnection
>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 Report Global Agency of the Year PR News Agency of the Year -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of David Hunter Sent: Monday, March 22, 2010 12:34 PM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] flv stop loading / close netconnection 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 situation i jump to the image and once the video has finished downloading it suddenly appears. Going from video to video (halfway through a download) is fine as the source is being overwritten each time but when it comes to an image I need to use myFLV.getVideoPlayer(0).close() to stop the download. That works ok except if I try to go back to the same video which download I terminated then it says "Error: Cannot call reconnect on an http connection" . I cannot set the source to be "" or null either or it pulls an error. . Can anyone give me any help on stopping an FLV from loading once you have set the source and then being able to restart that download? . Thanks in advance, David _ We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now http://clk.atdmt.com/UKM/go/195013117/direct/01/___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] xml: counting parents
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: 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 PM To: Flash Coders List Subject: Re: [Flashcoders] xml: counting parents 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 { public var title:String; public var name:String; public var subordinates:Vector.; public function Person(value:XML) { deserialize(value); } private function deserialize(value:XML):void { title = val...@title; name = val...@name; subordinates = parseSubordinates(value.person); } private function parseSubordinates(value:XMLList):Vector. { var vector:Vector. = new Vector.(); var len:int = value.length(); for (var i:int = 0; i< len; ++i) { vector.push(new Person(value[i])); } return vector; } } And you feed that to your view which traverses the stack: public class PersonView extends Sprite { protected var _data:Person; public function PersonView() { super(); } public function set data(value:Person):void { _data = value; draw(); } public function get data():Person { return _data; } protected function draw():void { // draw based on the data } } Pseudo-code but you get the idea. The PersonView would create other PersonViews inside of itself to draw the subordinates, and each view would be responsible for doing its own layout in the draw function, taking into account the width/height of its children, etc. Pretty clean overall. The reason draw() is protected is because you might want to create concrete implementations of PersonView. Perhaps some titles use a specific view and you don't want to clutter PersonView with too many if then else statements, so you just instantiate a specific ConcretePersonView based on the _data.title and the concrete views take care of drawing themselves. That's how I would build it, at least. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] xml: counting parents
>> 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 Community and visit our Instructional Technology Design Blog (note: these are for Bank of America employees only) -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Lehr, Theodore Sent: Monday, March 22, 2010 3:40 PM To: Flash Coders List Subject: RE: [Flashcoders] xml: counting parents 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 PM To: Flash Coders List Subject: Re: [Flashcoders] xml: counting parents 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 { public var title:String; public var name:String; public var subordinates:Vector.; public function Person(value:XML) { deserialize(value); } private function deserialize(value:XML):void { title = val...@title; name = val...@name; subordinates = parseSubordinates(value.person); } private function parseSubordinates(value:XMLList):Vector. { var vector:Vector. = new Vector.(); var len:int = value.length(); for (var i:int = 0; i < len; ++i) { vector.push(new Person(value[i])); } return vector; } } And you feed that to your view which traverses the stack: public class PersonView extends Sprite { protected var _data:Person; public function PersonView() { super(); } public function set data(value:Person):void { _data = value; draw(); } public function get data():Person { return _data; } protected function draw():void { // draw based on the data } } Pseudo-code but you get the idea. The PersonView would create other PersonViews inside of itself to draw the subordinates, and each view would be responsible for doing its own layout in the draw function, taking into account the width/height of its children, etc. Pretty clean overall. The reason draw() is protected is because you might want to create concrete implementations of PersonView. Perhaps some titles use a specific view and you don't want to clutter PersonView with too many if then else statements, so you just instantiate a specific ConcretePersonView based on the _data.title and the concrete views take care of drawing themselves. That's how I would build it, at least. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] xml: counting parents
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 PM To: Flash Coders List Subject: Re: [Flashcoders] xml: counting parents 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 { public var title:String; public var name:String; public var subordinates:Vector.; public function Person(value:XML) { deserialize(value); } private function deserialize(value:XML):void { title = val...@title; name = val...@name; subordinates = parseSubordinates(value.person); } private function parseSubordinates(value:XMLList):Vector. { var vector:Vector. = new Vector.(); var len:int = value.length(); for (var i:int = 0; i < len; ++i) { vector.push(new Person(value[i])); } return vector; } } And you feed that to your view which traverses the stack: public class PersonView extends Sprite { protected var _data:Person; public function PersonView() { super(); } public function set data(value:Person):void { _data = value; draw(); } public function get data():Person { return _data; } protected function draw():void { // draw based on the data } } Pseudo-code but you get the idea. The PersonView would create other PersonViews inside of itself to draw the subordinates, and each view would be responsible for doing its own layout in the draw function, taking into account the width/height of its children, etc. Pretty clean overall. The reason draw() is protected is because you might want to create concrete implementations of PersonView. Perhaps some titles use a specific view and you don't want to clutter PersonView with too many if then else statements, so you just instantiate a specific ConcretePersonView based on the _data.title and the concrete views take care of drawing themselves. That's how I would build it, at least. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] xml: counting parents
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 { public var title:String; public var name:String; public var subordinates:Vector.; public function Person(value:XML) { deserialize(value); } private function deserialize(value:XML):void { title = val...@title; name = val...@name; subordinates = parseSubordinates(value.person); } private function parseSubordinates(value:XMLList):Vector. { var vector:Vector. = new Vector.(); var len:int = value.length(); for (var i:int = 0; i < len; ++i) { vector.push(new Person(value[i])); } return vector; } } And you feed that to your view which traverses the stack: public class PersonView extends Sprite { protected var _data:Person; public function PersonView() { super(); } public function set data(value:Person):void { _data = value; draw(); } public function get data():Person { return _data; } protected function draw():void { // draw based on the data } } Pseudo-code but you get the idea. The PersonView would create other PersonViews inside of itself to draw the subordinates, and each view would be responsible for doing its own layout in the draw function, taking into account the width/height of its children, etc. Pretty clean overall. The reason draw() is protected is because you might want to create concrete implementations of PersonView. Perhaps some titles use a specific view and you don't want to clutter PersonView with too many if then else statements, so you just instantiate a specific ConcretePersonView based on the _data.title and the concrete views take care of drawing themselves. That's how I would build it, at least. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] RE: right-click triggers MOUSE_LEAVE?
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:MouseEvent) { e.target.setSelection(0, e.target.text.length); } function stageOffHandler(e:Event) { // I don't want this to fire on RIGHT_CLICK trace('mouse is off stage or right mouse button clicked'); embedCode.visible = false; } _ _ _ 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 Report Global Agency of the Year PR News Agency of the Year -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Mattheis, Erik (MIN - WSW) Sent: Monday, March 22, 2010 1:08 PM To: Flash Coders List Subject: [Flashcoders] right-click triggers MOUSE_LEAVE? 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't the expected behavior but am at a loss for looking what is causing this in my code, there's no RIGHT_CLICK listener and from within a class, I have _stage.stage.addEventListener(Event.MOUSE_LEAVE, videoOffHandler); where _stage is a reference to the Document class. _ _ _ 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 Report Global Agency of the Year PR News Agency of the Year ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] xml: counting parents
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 believe that they fixed that long a go. uint and int has the same speed. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] xml: counting parents
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: You could come up with a better structure than that, I'm sure, but that's the basic idea. Cordially, Kerry Thompson On Mon, Mar 22, 2010 at 1:59 PM, Eric E. Dolecki wrote: > 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 >> of assisting in layout for example, say you have the follwing xml: >> >> >> >> >> >> >> >> >> >> >> >> >> And you used this to create an organizational flow chart... my thought was >> to use the depth to figure out where the names should go... I have thought >> about how to do this 12,002 ways so my head is getting muddled >> >> >> From: flashcoders-boun...@chattyfig.figleaf.com [ >> flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Steven Sacks [ >> flash...@stevensacks.net] >> Sent: Monday, March 22, 2010 1:15 PM >> To: Flash Coders List >> Subject: Re: [Flashcoders] xml: counting parents >> >> 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 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 that it has 0 parents, 2 would say it has 1 parent, 3& 4 >> would say they have 2 parents >> > >> > hope that makes sense >> > >> > Ted >> > ___ >> > Flashcoders mailing list >> > Flashcoders@chattyfig.figleaf.com >> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >> > >> ___ >> Flashcoders mailing list >> Flashcoders@chattyfig.figleaf.com >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >> ___ >> Flashcoders mailing list >> Flashcoders@chattyfig.figleaf.com >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >> > > > > -- > http://ericd.net > Interactive design and development > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] flv stop loading / close netconnection
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:20 + > Subject: [Flashcoders] flv stop loading / close netconnection > > > 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 situation i > jump to the image and once the video has finished downloading it suddenly > appears. Going from video to video (halfway through a download) is fine as > the source is being overwritten each time but when it comes to an image I > need to use myFLV.getVideoPlayer(0).close() to stop the download. That works > ok except if I try to go back to the same video which download I terminated > then it says "Error: Cannot call reconnect on an http connection" . I cannot > set the source to be "" or null either or it pulls an error. . Can anyone > give me any help on stopping an FLV from loading once you have set the source > and then being able to restart that download? . Thanks in advance, > David > _ > We want to hear all your funny, exciting and crazy Hotmail stories. Tell us > now > http://clk.atdmt.com/UKM/go/195013117/direct/01/___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders _ Tell us your greatest, weirdest and funniest Hotmail stories http://clk.atdmt.com/UKM/go/195013117/direct/01/___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] xml: counting parents
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 From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of kennethkawam...@gmail.com [kennethkawam...@gmail.com] Sent: Monday, March 22, 2010 2:06 PM To: Flash Coders List Subject: Re: [Flashcoders] xml: counting parents 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 = 0, len:uint = xml.children().length(); i < len; i++){ original..*.(@name == xml.children()[...@name && @title == xml.children()[...@title)@parent = n; transformXMLWithParentCount(original, xml.children()[i], n + 1); } } var testXML:XML = ; transformXMLWithParentCount(testXML, testXML, 1); trace(testXML); Trace: But this fails when you have two or more people with identical name and title: you should create unique ID for each person :) -- Kenneth Kawamoto http://www.materiaprima.co.uk/ On 22 March 2010 17:33, 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, say you have the follwing xml: > > > > > > > > > > > > > And you used this to create an organizational flow chart... my thought was to > use the depth to figure out where the names should go... I have thought about > how to do this 12,002 ways so my head is getting muddled > > > From: flashcoders-boun...@chattyfig.figleaf.com > [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Steven Sacks > [flash...@stevensacks.net] > Sent: Monday, March 22, 2010 1:15 PM > To: Flash Coders List > Subject: Re: [Flashcoders] xml: counting parents > > 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 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 that it has 0 parents, 2 would say it has 1 parent, 3& 4 >> would say they have 2 parents >> >> hope that makes sense >> >> Ted ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: Re[2]: [Flashcoders] AS3 -> Objective-C
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 familiarize > and then working fore real with apple frameworks. > > Before I started XCode for good, I bought some books: > > 1) "Programming in Objective-C 2.0 (2nd Edition)" by Stephen G. Kochan. > It's about complete basics of ObjC, this one explains details of the > ObjC syntax, classes, interfaces, implementation, protocols, special > characters, memory management... in general - roots. > > In Kochan's book, there is an interesting paragraph related directly to > your question about C (chapter "Underlaying C Language Features"): > "This chapter describes features of the ObjC language that you don't > necessarily need to know to write ObjC programs. In fact, most of > these come from the underlaying C programming language. (...) some of > these features go against the grain of object oriented programming. > They can also interfere with some of strategies implemented by > Foundation framework such as memory allocation methodology or work > with character strings containing multibyte (UTF8) characters." > > > 2) "Cocoa Design Patterns" Erik M. Buck > This one is great. It is like GOF translated to Apple frameworks. But > it is not as general as GOF. It is really based on the Cocoa language > features. > > Kochan's book is like looking at ObjC through a microscope and Buck's > book is more like looking from a mountain into the cocoa valley :) > > 3,4) Two others by Dave Mark, dedicated to pure iPhone development. > They provide good intro to Interface Builder and iPhone features - > accelerometer, giro, multitouch, but most important - outlets and > delegates: > "Beginning iPhone 3 Development: Exploring the iPhone SDK" > "More iPhone 3 Development: Tackling iPhone SDK 3 (Beginning)" > > g. > > > > Tuesday, March 16, 2010 (9:36:01 PM): > >> I think of the .h files as interfaces - it makes sense after that > >> Sent from my iPhone > >> On 16 Mar 2010, at 18:59, "Eric E. Dolecki" wrote: > >>> I have heard that one should know C before diving into Obj-C. I did >>> not do >>> that as I wanted to dive in quicker. Once you get your head around >>> memory >>> management and how to manipulate NSString, etc. you'll be well on >>> your way. >>> The whole .h .m thing is strange, etc. I'm not sure if it would have >>> made a >>> big difference for me to learn C first or not, but I chose not to >>> and spent >>> a lot of time reading tutorials and books about Obj-C. I suppose it >>> all >>> depends on what kind of sponge you are. >>> >>> Eric >>> >>> On Tue, Mar 16, 2010 at 2:30 PM, .matt wrote: >>> So is it a fools errand to try to dive into iPhone dev without knowing C going in? Can one bypass C and dive directly into O-C? .m > > > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] xml: counting parents
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 something and clear my head From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Steven Sacks [flash...@stevensacks.net] Sent: Monday, March 22, 2010 2:03 PM To: Flash Coders List Subject: Re: [Flashcoders] xml: counting parents 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, say you have the follwing xml: > > > > > > > > > > > > > And you used this to create an organizational flow chart... my thought was to > use the depth to figure out where the names should go... I have thought about > how to do this 12,002 ways so my head is getting muddled ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] right-click triggers MOUSE_LEAVE?
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't the expected behavior but am at a loss for looking what is causing this in my code, there's no RIGHT_CLICK listener and from within a class, I have _stage.stage.addEventListener(Event.MOUSE_LEAVE, videoOffHandler); where _stage is a reference to the Document class. _ _ _ 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 Report Global Agency of the Year PR News Agency of the Year ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] xml: counting parents
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 = 0, len:uint = xml.children().length(); i < len; i++){ original..*.(@name == xml.children()[...@name && @title == xml.children()[...@title)@parent = n; transformXMLWithParentCount(original, xml.children()[i], n + 1); } } var testXML:XML = ; transformXMLWithParentCount(testXML, testXML, 1); trace(testXML); Trace: But this fails when you have two or more people with identical name and title: you should create unique ID for each person :) -- Kenneth Kawamoto http://www.materiaprima.co.uk/ On 22 March 2010 17:33, 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, say you have the follwing xml: > > > > > > > > > > > > > And you used this to create an organizational flow chart... my thought was to > use the depth to figure out where the names should go... I have thought about > how to do this 12,002 ways so my head is getting muddled > > > From: flashcoders-boun...@chattyfig.figleaf.com > [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Steven Sacks > [flash...@stevensacks.net] > Sent: Monday, March 22, 2010 1:15 PM > To: Flash Coders List > Subject: Re: [Flashcoders] xml: counting parents > > 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 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 that it has 0 parents, 2 would say it has 1 parent, 3& 4 >> would say they have 2 parents >> >> hope that makes sense >> >> Ted ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] xml: counting parents
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, say you have the follwing xml: And you used this to create an organizational flow chart... my thought was to use the depth to figure out where the names should go... I have thought about how to do this 12,002 ways so my head is getting muddled ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] xml: counting parents
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 > of assisting in layout for example, say you have the follwing xml: > > > > > > > > > > > > > And you used this to create an organizational flow chart... my thought was > to use the depth to figure out where the names should go... I have thought > about how to do this 12,002 ways so my head is getting muddled > > > From: flashcoders-boun...@chattyfig.figleaf.com [ > flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Steven Sacks [ > flash...@stevensacks.net] > Sent: Monday, March 22, 2010 1:15 PM > To: Flash Coders List > Subject: Re: [Flashcoders] xml: counting parents > > 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 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 that it has 0 parents, 2 would say it has 1 parent, 3& 4 > would say they have 2 parents > > > > hope that makes sense > > > > Ted > > ___ > > Flashcoders mailing list > > Flashcoders@chattyfig.figleaf.com > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > -- http://ericd.net Interactive design and development ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] xml: counting parents
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: And you used this to create an organizational flow chart... my thought was to use the depth to figure out where the names should go... I have thought about how to do this 12,002 ways so my head is getting muddled From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Steven Sacks [flash...@stevensacks.net] Sent: Monday, March 22, 2010 1:15 PM To: Flash Coders List Subject: Re: [Flashcoders] xml: counting parents 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 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 that it has 0 parents, 2 would say it has 1 parent, 3& 4 > would say they have 2 parents > > hope that makes sense > > Ted > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] xml: counting parents
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.parent() twice each loop. You can shortcut this by setting p to its parent in the condition check. Pre-increment is faster than post-increment. Searching for a Boolean resolve instead of a specific value is faster. var p:XML = myNode; var depth:int; while (p = p.parent()) { ++depth; } On 3/22/2010 10:26 AM, mark.jonk...@comcast.net wrote: 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 you only want to count parents where parent().name() == "person" then change the while statement to read: while ((p.parent() != undefined)&& (p.parent().name() == "person")) { depth++; p = p.parent(); } - Original Message - From: "Theodore Lehr" To: "Flash Coders List" Sent: Monday, March 22, 2010 12:27:50 PM GMT -05:00 US/Canada Eastern Subject: [Flashcoders] xml: counting parents 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 hope that makes sense Ted ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] flv stop loading / close netconnection
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 situation i jump to the image and once the video has finished downloading it suddenly appears. Going from video to video (halfway through a download) is fine as the source is being overwritten each time but when it comes to an image I need to use myFLV.getVideoPlayer(0).close() to stop the download. That works ok except if I try to go back to the same video which download I terminated then it says "Error: Cannot call reconnect on an http connection" . I cannot set the source to be "" or null either or it pulls an error. . Can anyone give me any help on stopping an FLV from loading once you have set the source and then being able to restart that download? . Thanks in advance, David _ We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now http://clk.atdmt.com/UKM/go/195013117/direct/01/___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] xml: counting parents
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; transformXMLWithParentCount(original, xml.children()[i], n + 1); } } You have this XML: var testXML:XML = ; Then: transformXMLWithParentCount(testXML, testXML, 0); trace(testXML); You should get: -- Kenneth Kawamoto http://www.materiaprima.co.uk/ On 22 March 2010 16:27, 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 that it has 0 parents, 2 would say it has 1 parent, 3 & 4 > would say they have 2 parents > > hope that makes sense > > Ted ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] xml: counting parents
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 you only want to count parents where parent().name() == "person" then change the while statement to read: while ((p.parent() != undefined) && (p.parent().name() == "person")) { depth++; p = p.parent(); } - Original Message - From: "Theodore Lehr" To: "Flash Coders List" Sent: Monday, March 22, 2010 12:27:50 PM GMT -05:00 US/Canada Eastern Subject: [Flashcoders] xml: counting parents 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 hope that makes sense Ted ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] AS3 -> Objective-C
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 learning Objective-C (or any C-based language), coming from an AS/Scripting background? I came to AS3 from a designer origin, taking the route from design to HTML/CSS/Javascript to AS's 1,2 and 3, so while I'm pretty comfortable in an oop/coding environment, I havent ventured into true programming languages as of yet. The few times I've looked at the code it seems like its less "natural" and more complex than an ECMA-based scripting language but maybe thats just an initial reaction and not reality based. Anyway I'd love to hear y'alls 2¢... (oh and in case you hadnt guessed this is iphone related ;) Since Adobe doesnt seem to be planning to release CS5 any time soon — and no, October 2010 doesn't count as soon — I figured it was time to dive in ). .m ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] xml: counting parents
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 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 that it has 0 parents, 2 would say it has 1 parent, 3& 4 would say they have 2 parents hope that makes sense Ted ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] xml: counting parents
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/listinfo/flashcoders
Re: [Flashcoders] xml: counting parents
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 that it has 0 parents, 2 would say it has 1 parent, 3 & 4 would say they have 2 parents hope that makes sense Ted ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] xml: counting parents
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 hope that makes sense Ted ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Flex3: how to refer the child canvas of a TabNavigator
> > 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 answer them when I see them, but that's kind of hit or miss. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Flex3: how to refer the child canvas of a TabNavigator
>> 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 Community and visit our Instructional Technology Design Blog (note: these are for Bank of America employees only) ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Recursive:Part II
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 person nodes exist, this will still return an XMLList instance with 0 items. var childList:XMLList = pNode.person; for each (var personNode:XML in childList) { // if there is a chance that @firstName or @lastName is optional then assuming they are the code below // will generate a runtime exception. If you are generating your XML against a schema and thus // are absolutely certain that the attributes are there then doing the extra checking would not be worth // it. The simplest safety valve would be to put a try catch around accessing those attributes as I've done. try { trace(personno...@firstname+" "+personno...@lastname); } catch(err:Error) { //suppress error, trace a warning that includes name of class, function, message and node with missing attributes trace("WARN::[" + getQualifiedClassName(this) + "]::createPeople() found person node with missing attribute:" + personNode.toXMLString()); } // check to see if the node has any person children, if so, call the function recursively increment the depth if (personNode.person.length() > 0) { createPeople(personNode, pDepth+1); } } } Now depth indicates how far into the nest you are. Note, assuming you call this method from "your root depth" whatever that is and don't pass in a depth parameter, this will automatically start at 0 and increment upwards as it finds a child level. Remember, if you need to see up one level then simply see if the current node has a parent node. var parent:XML = pNode.parent(); if (parent != undefined) { // do something with parent } however, you would have to use recursion again if you wanted to see the depth as in the example I gave you on Friday where if you needed all the person nodes you could do: var people:XMLList = peopleList..*.(name() == "person"); but to get the depth of each node you would need to put in a recursive function that incremented until the following condition was not met: ((person.parent() == undefined) || (person.parent().name() != "person")) if you need a list of all person nodes with no depth, I'd go with: var people:XMLList = peopleList..*.(name() == "person"); if you need need a list that includes depth then I'd go with the recursion example above that passes a depth. Sincerely Mark R. Jonkman - Original Message - From: "Theodore Lehr" To: "Flash Coders List" Sent: Monday, March 22, 2010 8:03:02 AM GMT -05:00 US/Canada Eastern Subject: RE: [Flashcoders] Recursive:Part II 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...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Merrill, Jason [jason.merr...@bankofamerica.com] Sent: Friday, March 19, 2010 4:57 PM To: Flash Coders List Subject: RE: [Flashcoders] Recursive:Part II Actually, I got thinking, and this recursive function should work for you eh? - this traces out all the first and last names of all nodes: var _xml:XML = new XML( ); function createPeople (xml:*):void { var xmlList:XMLList = xml.children(); for each (var personNode:* in xmlList) { trace(personno...@firstname+" "+personno...@lastname); if(personNode.children()) createPeople(personNode); } } createPeople(_xml); And yeah, I prefer doing XML that way, I think avoids XML verbosity, large file sizes, and confusion in reading. Jason Merrill Bank of America Global Learning Learning & Performance Solutions Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (note: these are for Bank of America employees only) -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Lehr, Theodore Sent: Friday, March 19, 2010 4:48 PM To: Flash Coders List Subject: RE: [Flashcoders] Recursive:Part II thanks - I'll chew on this Monday... fyi - I have changed my xml to how Jason suggested and find it much easier to work with Ted From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of mark.jonk...@comcast.net [mark.jonk...@comcast.net] Sent: Friday, March 19, 2010 4:42 PM To: Flash Coders List Subject: Re: [Flashcoders] Recursive:Part II If what you are doing is looking for nodes with firstnames then you can do something like this: Assuming
RE: [Flashcoders] Recursive:Part II
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...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Merrill, Jason [jason.merr...@bankofamerica.com] Sent: Friday, March 19, 2010 4:57 PM To: Flash Coders List Subject: RE: [Flashcoders] Recursive:Part II Actually, I got thinking, and this recursive function should work for you eh? - this traces out all the first and last names of all nodes: var _xml:XML = new XML( ); function createPeople (xml:*):void { var xmlList:XMLList = xml.children(); for each (var personNode:* in xmlList) { trace(personno...@firstname+" "+personno...@lastname); if(personNode.children()) createPeople(personNode); } } createPeople(_xml); And yeah, I prefer doing XML that way, I think avoids XML verbosity, large file sizes, and confusion in reading. Jason Merrill Bank of America Global Learning Learning & Performance Solutions Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (note: these are for Bank of America employees only) -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Lehr, Theodore Sent: Friday, March 19, 2010 4:48 PM To: Flash Coders List Subject: RE: [Flashcoders] Recursive:Part II thanks - I'll chew on this Monday... fyi - I have changed my xml to how Jason suggested and find it much easier to work with Ted From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of mark.jonk...@comcast.net [mark.jonk...@comcast.net] Sent: Friday, March 19, 2010 4:42 PM To: Flash Coders List Subject: Re: [Flashcoders] Recursive:Part II If what you are doing is looking for nodes with firstnames then you can do something like this: Assuming Jason's XML with attributes: var peopleList:XML = ; var firstNames:XMLList = peopleList..*.(hasOwnProperty("@firstName")); trace(firstNames); The ..* automatically selects all nodes that have a firstName attribute regardless of nesting. Thus you could loop over firstNames with no recursion and get a list of all firstnames. The list will contain all the nodes witha firstName attribue, so you will get one node with Bob as firstName that still has 3 children, but you will also get 2 of those children in the firstNames list so you would simply ignore the children inside of Bob. For testing purposes I purposefully added an extra child node with no firstName to Bob. This is the result You can do something similar with your structure: var peopleList:XML = Bob Smith Timmy Smith Jenny Smith Tom Williams Sa Williams ; var firstNames:XMLList = peopleList..*.personFirstName; trace(firstNames); result: Bob Timmy Jenny Tom Sa Your structure produces a simpler list, however I favor Jason's attribute version as it is far more compact, simpler to read, etc. Personal preference. But if you don't need to do recursion then don't. Saves many headaches. Sincerely Mark R. Jonkman - Original Message - From: "Theodore Lehr" To: "Flash Coders List" Sent: Friday, March 19, 2010 4:15:11 PM GMT -05:00 US/Canada Eastern Subject: RE: [Flashcoders] Recursive:Part II sorry a couple of typos... the function should be: function createPeople (_xml:*):void { var xmlList:XMLList=_xml.children(); for each (var fn_xml in xmlList) { createPeople(fn_xml); trace(item_xml.personFirstName); } } From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Merrill, Jason [jason.merr...@bankofamerica.com] Sent: Friday, March 19, 2010 4:07 PM To: Flash Coders List Subject: RE: [Flashcoders] Recursive:Part II I would write the XML this way instead: .etc. Also, recursive functions call themselves - and then break when some value or condition is reached for yours, add to your object, and then check to see if there are child nodes in the xml below it, if so, call the function again to add more, if not, break out of the function. However, this will only get you through the top level nodes and one of the top level nodes's sub nodes - not the others - I actually can't think of how to get into the OTHER sub-nodes - though I know there are people on this list who do. I