Hi Ron,
Thanks for the suggestion but still no luck on my end.
It seems that on my set up I need to have a constructor named the same as
the .as file and that constructor has to be initiated prior to any of the
other classes being initiated. So I set up
public class MyPackage{
Hi Rob,
The ability to define multiple classes in a single package was removed as of
Flex 1.5. It was removed with the class modifier *private*. There is still a
way to do it though.
First you need to change your file name to match the main class that is
being defined. The main class is the
Here is a good article on class/package syntax and structure:
http://probertson.com/articles/2006/07/28/one-file-many-as3-classes/
It turns out that one class per package is a Flex limitation.
On 3/26/07, elibol [EMAIL PROTECTED] wrote:
Hi Rob,
The ability to define multiple classes in a
Rob Romanek wrote:
Hi Ron,
Thanks for the suggestion but still no luck on my end.
It seems that on my set up I need to have a constructor named the same
as the .as file and that constructor has to be initiated prior to any
of the other classes being initiated. So I set up
Cat.as should
On Mon, 26 Mar 2007 12:17:10 -0400, elibol [EMAIL PROTECTED]
wrote:
Here is a good article on class/package syntax and structure:
http://probertson.com/articles/2006/07/28/one-file-many-as3-classes/
___
Flashcoders@chattyfig.figleaf.com
To change
Hi Ron and elibol,
Thanks for the explanations and link both helped straighten out my
understanding of the packaging structure.
Rob
On Mon, 26 Mar 2007 12:17:10 -0400, elibol [EMAIL PROTECTED]
wrote:
Here is a good article on class/package syntax and structure:
10:10 AM
To: flashcoders@chattyfig.figleaf.com
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
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of Rob Romanek
Sent: Friday, March 23, 2007 10:10 AM
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] Actionscript 3.0 help w/ simple HelloWorld
Hi Jason,
My packageTest.fla is
import
Hi Jason,
I wrote a simple tutorial for AS3 (and Flex2) in FlashDevelop, doesn't
involve the FlashIDE but a good place to get started playing with AS3 and if
you're interested in flex it covers the basics of that too. Also explains my
setup for having an FD for AS2 and one for AS3.
] Actionscript 3.0 help w/ simple HelloWorld
Try adding this to your fla
addChild(hw);
In your HelloWorld class you've added your textField inside
but since you have added you HelloWorld() object to the
display list of the movie it will never get drawn.
my.fla
[MyPackage]
MyPackage.as
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()
Sent: Thursday, March 22, 2007 7:43 PM
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] Actionscript 3.0 help w/ simple HelloWorld
Hi Jason,
I wrote a simple tutorial for AS3 (and Flex2) in
FlashDevelop, doesn't involve the FlashIDE but a good place
to get started playing
Getting my feet wet with AS3, I just bought the AS3 cookbook and have
learned a lot already - great book. I feel like an idiot asking this as
I'm pretty good in AS2, but with AS3, I'm not getting a simple script
working. I have the Flash 9 AS3 preview, trying to write a simple
HelloWorld class
Hey off the top of my head, I think I see the problem.
So, you add the text field child to the HelloWorld Sprite. Adding the
child in the hello world sprite, does not add it to the stage. When you
use add child alone, you have to pretend it's this.addChild. If you
chose to import
Hi Jason,
I'm just guessing here but how about:
addChild(hw);
Anthony
On 3/22/07, Merrill, Jason [EMAIL PROTECTED] wrote:
Getting my feet wet with AS3, I just bought the AS3 cookbook and have
learned a lot already - great book. I feel like an idiot asking this as
I'm pretty good in AS2,
Hi,
In your fla add:
import MyPackage.*
var hw:HelloWorld = new HelloWorld();
//You need to add the Child to the Stage
addChild(hw);
Other way to do it is set as 'Main Class 'of the fla file Helloworld.as, you
can do it in Publish settings in ActionScript option (the same where you set
the
@chattyfig.figleaf.com
Subject: [Flashcoders] Actionscript 3.0 help w/ simple HelloWorld
Getting my feet wet with AS3, I just bought the AS3 cookbook and have
learned a lot already - great book. I feel like an idiot asking this
as
I'm pretty good in AS2, but with AS3, I'm not getting a simple script
The constructor traces fine in the output window, but the TextField does
not show. What have I done wrong? My Export settings in F9 As3 preview
are for AS 3.0 and FP9. In later scripts, I tried moving the textfield,
changing the color, changing the stage color to be sure it wasn't
matching the
Hi Jason,
Try setting the width and the height of the Textfield.
www.pierinc.com
On 3/22/07, Merrill, Jason [EMAIL PROTECTED] wrote:
Getting my feet wet with AS3, I just bought the AS3 cookbook and have
learned a lot already - great book. I feel like an idiot asking this as
I'm pretty good
help w/ simple HelloWorld
Getting my feet wet with AS3, I just bought the AS3 cookbook and have
learned a lot already - great book. I feel like an idiot asking this as
I'm pretty good in AS2, but with AS3, I'm not getting a simple script
working. I have the Flash 9 AS3 preview, trying to write
I see,
You need to add HelloWorld to the main DisplayList.
import MyPackage.*
var hw:HelloWorld = new HelloWorld();
addChild(hw);
On 3/22/07, elibol [EMAIL PROTECTED] wrote:
Hi Jason,
Try setting the width and the height of the Textfield.
http://www.pierinc.com
On 3/22/07, Merrill,
I should mention why I thought it was a width/height issue.
UITextField and extending components (and some other components) in the Flex
framework initialize to a width/height of 0... It really took me by surprise
.
On 3/22/07, elibol [EMAIL PROTECTED] wrote:
I see,
You need to add
Try adding this to your fla
addChild(hw);
In your HelloWorld class you've added your textField inside but since you
have added you HelloWorld() object to the display list of the movie it
will never get drawn.
I have a question back at you along this example. I'm running on windows
and
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of Andrés González Aragón
Sent: Thursday, March 22, 2007 11:34 AM
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] Actionscript 3.0 help w/ simple HelloWorld
Hi,
In your fla add:
import
24 matches
Mail list logo