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

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] Problem Importing Class

2010-03-04 Thread Keith Reinfeld
This reproduces the error: package { import flash.display.MovieClip; import Star; public class App extends MovieClip { public function App() { trace('app'); Star(); } } }

Re: [Flashcoders] Problem Importing Class

2010-03-04 Thread Henrik Andersson
Susan Day wrote: 1136 Incorrect number of arguments. Expected 1. Star.as What argument is it expecting?! The object to convert to the type. You omitted the keyword new and got the function style typecast. ___ Flashcoders mailing list