Re: [Flashcoders] Problem Importing Class

2010-03-05 Thread Susan Day
This was a case of stripping down a class that worked to make the example smaller and easier for you all, then accidentally stripping out a necessary detail. Here's a different stripped down and tested version, different because I'm actually working with an mc not a string: package { import

RE: [Flashcoders] Problem Importing Class

2010-03-05 Thread Benny
Hi susan, In the 'other package' try: import Star; var myStar:Star = new Star(); addChild(myStar); --- Why are you getting the error? .. because you are trying to cast 'nothing' as a Star. Because Flash can't cast 'nothing' it tells you it's missing an argument. --- Regards, Benny

RE: [Flashcoders] Problem Importing Class

2010-03-05 Thread Merrill, Jason
Star(); Again Susan, as others have said, you're still just calling Star(). What you need to do in your other class is call var myStar:Star = new Star(); addChild(myStar); By calling new Star(), the constructor function (the Star() function inside your Star class) is called automatically and

[Flashcoders] addChildAt

2010-03-05 Thread Lehr, Theodore
Why can I (seemingly) not do: parentSprite.addChildAt(childSprite,6); seems like I can only do: parentSprite.addChild(childSprite) or addChildAt(childSprite,6); ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com

Re: [Flashcoders] Problem Importing Class

2010-03-05 Thread Susan Day
On Fri, Mar 5, 2010 at 8:34 AM, Benny b.vlug...@hccnet.nl wrote: Hi susan, In the 'other package' try: import Star; var myStar:Star = new Star(); addChild(myStar); That works. --- Why are you getting the error? .. because you are trying to cast 'nothing' as a Star. Because Flash

Re: [Flashcoders] addChildAt

2010-03-05 Thread Matt S.
You should in theory be able to do to mc.addChildAt(childmc,6), so there's a problem elsewhere in how you're doing it. Are you getting error messages? .m On Fri, Mar 5, 2010 at 8:54 AM, Lehr, Theodore ted_l...@federal.dell.com wrote: Why can I (seemingly) not do:

Re: [Flashcoders] addChildAt

2010-03-05 Thread Nathan Mynarcik
Does your parent sprite have 6 displayobjects in it? If the 6th position is not available, you can't add it to that layer. If it works when adding to the stage, you must have atleast 6 displayobjects on the stage. --Original Message-- From: Lehr, Theodore Sender:

[Flashcoders] RE: addChildAt

2010-03-05 Thread Mendelsohn, Michael
On occasion, I've had to write code like this: parentSprite[addChildAt](childSprite,6); - MM ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

[Flashcoders] OOP Tutorial

2010-03-05 Thread Susan Day
Hi; Now I would like to call my class Star from another class, but pass different values to its variables. Do I need to implement the inheriting class as Star? I'm kinda lost here. I've been googling as3 oop but the tutorials don't seem to address my needs. Can you help me understand what it is

RE: [Flashcoders] OOP Tutorial

2010-03-05 Thread Karina Steffens
Hi Susan, I wouldn't recommend relying just on online tutorials, or discussion posts for a something as huge as learning AS3 OOP. The best thing would be to get a book that covers the subject, such as Colin Moock's Essential ActionScript 3.0 from O'Reilly, or any one of the other excellent books

Re: [Flashcoders] OOP Tutorial

2010-03-05 Thread Valentin Schmidt
Susan Day wrote: Hi; Now I would like to call my class Star from another class, but pass different values to its variables. Do I need to implement the inheriting class as Star? I'm kinda lost here. I've been googling as3 oop but the tutorials don't seem to address my needs. Can you help me

RE: [Flashcoders] OOP Tutorial

2010-03-05 Thread Benny
No need for inheritance then, just give your Star class the desired parameters in the constructor, e.g package { import flash.display.MovieClip; public class Star extends MovieClip { public function Star(lineColor:uint, fillColor:uint) {

RE: [Flashcoders] OOP Tutorial

2010-03-05 Thread Karina Steffens
I guess so. I'm not happy to delve into a new programming language before I've read an entire book from cover to cover. Yes, even bricks :) I've got all the Moock-books and some cook-books and a whole lot of other books... -Original Message- From:

Re: [Flashcoders] OOP Tutorial

2010-03-05 Thread Paul Andrews
On 05/03/2010 16:38, Meinte van't Kruis wrote: Guess it depends on the person, I have been a Flash developer for over 5 years and have yet to open a book about it. Gosh. We can all learn something from a good book, no matter how accomplished we are. You might have learned something new

Re: [Flashcoders] OOP Tutorial

2010-03-05 Thread Susan Day
On Fri, Mar 5, 2010 at 12:41 PM, Benny b.vlug...@hccnet.nl wrote: No need for inheritance then, just give your Star class the desired parameters in the constructor, e.g package { import flash.display.MovieClip; public class Star extends MovieClip {

[Flashcoders] OOP Books (OT)

2010-03-05 Thread Susan Day
I'm going to start another thread on this, a bit OT. What are the best books for learning OOP? TIA, Susan ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

[Flashcoders] components

2010-03-05 Thread Jim Lafser
I've been doing some component development and have seen some posts for MXI creators / editors. I can't seem to find the right words for Google to actually locate one. Any help?   If this is off-topic and there's a better place to ask. let me know.   tia

Re: [Flashcoders] OOP Tutorial

2010-03-05 Thread Paul Andrews
On 05/03/2010 18:04, Dave Watts wrote: Guess it depends on the person, I have been a Flash developer for over 5 years and have yet to open a book about it. Gosh. We can all learn something from a good book, no matter how accomplished we are. You might have learned something new or just

[Flashcoders] calender component

2010-03-05 Thread Bassam M
Hi guys anyone know where can I get free calender event component I really need it Thanks Bassam ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders