This content has been marked as final. Show 4 replies
> Can you not use a Date object in an actionscript .AS file
> for some reason?
You can use *any* AS datatype in an AS class file.
> Also my class extends ASBroadcaster.
I've never tried to do that, since ASBroadcaster is a mixin class. Any
reason why you're extending it?
Adobe Community Expert
Dev blog, http://www.quip.net/blog/
"Luck is the residue of good design."
> Hi all,
> I have created a class where I have initialized a Date object and I am trying
> to get the current Day Month and Year for some
> data checking purposes. The only problem is that they get() methods of the
> date object all return undefined. Can you not
> use a Date object in an actionscript .AS file for some reason? Also my class
> extends ASBroadcaster.
Here's a working class maybe you can compare what you're doing to what
private var _date:Date;
public function get Month ():Number
return _date.getMonth ();
public function Foo ()
_date = new Date ();
var foo:Foo = new Foo ();
trace( foo.Month );
James O'Reilly Consultant
Adobe Certified Flash Expert
Design Code Train
I want the class to fire an event to a listener on my main timeline. The listener executes some code
to parse together a couple of strings, then uses remoting to send the string to a database.
Here is my class code.
Ok I got it. If you notice that Get Date property function I have in there. Yeah
it didn't like that at all. Once I renamed it everything else cleared up. Thanks
for the help. The stub class helped big time.