I dunno, that's how I have it set up and it works fine for me - Perhaps
your Flash 9 Preview Alpha is messed up.  I assume your publish settings
are all correct, - I don't know why it would do that.

Jason Merrill
Bank of America  
GT&O Learning & Leadership Development
eTools & Multimedia Team


 

>>-----Original Message-----
>>From: [EMAIL PROTECTED] 
>>[mailto:[EMAIL PROTECTED] On Behalf 
>>Of Rob Romanek
>>Sent: Friday, March 23, 2007 10:10 AM
>>To: [email protected]
>>Subject: Re: [Flashcoders] Actionscript 3.0 help w/ simple HelloWorld
>>
>>Hi Jason,
>>
>>My packageTest.fla is
>>
>>import MyPackage.*;
>>var hw:HelloWorld = new HelloWorld();
>>var mc:MyClass = new MyClass();
>>
>>and in the same directory I have MyPackage.as
>>
>>//MyPackage.as
>>package MyPackage
>>{
>>
>>      public class HelloWorld
>>      {
>>              public function HelloWorld()
>>              {
>>                      trace("hello world constructor");
>>              }
>>      }
>>      
>>      public class MyClass
>>      {
>>              public function MyClass()
>>              {
>>                      trace("MyClass constructor");
>>              }
>>      }
>>}
>>
>>In the windows Flash 9 Alpha IDE I try to run this and I get
>>
>>**Error** Scene 1, Layer 'Layer 1', Frame 1 : Line 2, Column 8 :  
>>[Compiler] Error #1046: Type was not found or was not a compile-time
>>constant: HelloWorld.
>>var hw:HelloWorld = new HelloWorld();
>>**Error** Scene 1, Layer 'Layer 1', Frame 1 : Line 3, Column 8 :  
>>[Compiler] Error #1046: Type was not found or was not a compile-time
>>constant: MyClass.
>>var mc:MyClass = new MyClass();
>>ReferenceError: Error #1065: Variable
>>Timeline0_f549bc2eccff3a4d88caed7024db465e is not defined.
>>
>>This seems to me as if it should work. I don't know if it is 
>>the Flash IDE causing me grief, if there is some preference 
>>file I don't have set correctly or what.
>>
>>Other than this issue I'm having a lot of fun with AS3 
>>especially the new text features.
>>
>>thanks,
>>
>>Rob
>>
>>On Thu, 22 Mar 2007 20:39:14 -0400, Merrill, Jason 
>><[EMAIL PROTECTED]> wrote:
>>
>>>>> I have a question back at you along this example.
>>>>> any insights why yours can run as MyPackage.as?
>>>
>>> Do you start out your package as:
>>>
>>> package MyPackage
>>> {
>>>     //class definitions
>>> }
>>>
>>> and then import like this:
>>>
>>> import MyPackage.*
>>>
>>> ?
>>>
>>> That should work.
>>>
>>_______________________________________________
>>[email protected]
>>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
>>
_______________________________________________
[email protected]
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

Reply via email to