[EMAIL PROTECTED] wrote:
Send Flashcoders mailing list submissions to flashcoders@chattyfig.figleaf.com To subscribe or unsubscribe via the World Wide Web, visit http://chattyfig.figleaf.com/mailman/listinfo/flashcoders or, via email, send a message with subject or body 'help' to [EMAIL PROTECTED] You can reach the person managing the list at [EMAIL PROTECTED] When replying, please edit your Subject line so it is more specific than "Re: Contents of Flashcoders digest..." Today's Topics: 1. Re: Multi-dimensional array problems in classes (slangeberg) 2. questions about [embed] in AS3 (August Gresens) 3. ASBroadcaster deprecated in AS3 ? (Stephen Ford) 4. Re: iTunes-encoded mp3's duration doesn't show up in ID3 from Flash (Marlon Harrison) 5. Re: ASBroadcaster deprecated in AS3 ? (Francis Chary) 6. Re: questions about [embed] in AS3 ([EMAIL PROTECTED]) 7. Re: questions about [embed] in AS3 (Fumio Nonaka) 8. Flashlite for Windows mobile 4 (Eric Priou) 9. Q:The case for Functional vs OOP programming ([EMAIL PROTECTED]) ---------------------------------------------------------------------- Message: 1 Date: Sat, 20 Jan 2007 14:41:52 -0600 From: slangeberg <[EMAIL PROTECTED]> Subject: Re: [Flashcoders] Multi-dimensional array problems in classes To: "Flashcoders mailing list" <flashcoders@chattyfig.figleaf.com> Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=ISO-8859-1; format=flowed I agree with previous, however, it is good to deal with references in classes. Best design for your 2D array depends on what it's intended for?: var reactionStoichiometry:Array = new Array (); public function addItem( newArr:Array ):Number { //returns len(?) return reactionStoichiometry.push( newArr ); } used like: var yorObject:YourClass = new YourClass(); var newArr:Array = new Array (1, 3, 2, 0), yorObject.addItem( newArr ); yorObject.addItem( new Array( 1,2,1,0 ) ); ...etc.... -Scott On 1/20/07, Ron Wheeler <[EMAIL PROTECTED]> wrote:BTW, Classes love Objects of all types regardless of the arrays. Just a hint. Often multi-dimensional arrays are just crying out to be single arrays of objects and if their wish is granted, your code becomes amazingly small and elegant as your reward for granting their wish. Help make an array's wish become true!!! If you pass this on to 6 programmers in the next 24 hours, you will be granted good karma for a year. Ron Stan Vassilev wrote:When you assign dynamic or more complex values, and especially if you don't want this array to be shared (by reference) to all instances of the class, it's best to initialize in the constructor. There aren't any limitations on multidim. arrays in objects, classes, or objects in classes and so on. I suspect the particular syntax you used was not correct, hence your issues. It'd help to post this instead. Regards, Stan Vassilev ----- Original Message ----- From: "Gareth Hudson" <[EMAIL PROTECTED]> To: <flashcoders@chattyfig.figleaf.com> Sent: Saturday, January 20, 2007 2:02 PM Subject: [Flashcoders] Multi-dimensional array problems in classesHi there, Does anyone know if it we are supposed to use multi-dimensional arrays (an array consisting of arrays) within a class? If so, what is the best, legal way to create them? The only way I have managed to do it is by this method: var reactionStoichiometry:Array = new Array ( new Array (1, 3, 2, 0), new Array (1, 2, 1, 0), new Array (2, 1, 2, 0), new Array (2, 0, 1, 3), new Array (2, 0, 2, 1), new Array (1, 0, 1, 1), new Array (1, 1, 2, 0), new Array (1, 1, 2, 0), new Array (1, 1, 1, 1)); Any other ways of creating them give me a compile error saying thattheyare not allowed within a class. I need to assign these values dynamically, the above ones a for testing, and would prefer to do it by addressing the locations in the main array by position number for inserting the other arrays within it. Classes don't seem to like Objects containing arrays either. Many thanks, Gareth Hudson. _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com_______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com_______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
_______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com