Thanks everyone for the great help! I got it working :) 

-David




________________________________
From: Paul Andrews <[email protected]>
To: [email protected]
Sent: Monday, April 6, 2009 1:52:17 PM
Subject: Re: [flexcoders] How can I call a function from a class?


Declare a class instance, or make the function static.

It's customary to name classes with a capital letter at the start, instances 
with a lower case.

private function callClassFunction( ):void
{
var test:Layout = new Layout();
test.traceTest( );
}

Paul

----- Original Message ----- 
From: "sailorsea21" <sailorsea21@ yahoo.com>
To: <flexcod...@yahoogro ups.com>
Sent: Monday, April 06, 2009 6:36 PM
Subject: [flexcoders] How can I call a function from a class?

> Hi everyone, How can I call a function from a class?
>
> ////// MAIN FILE
> import test.layout;
>
> private function callClassFunction( ):void
> {
> test.layout_ QT.traceTest( );
> }
>
>
>
> ////// CLASS FILE layout.as
> package test
> {
> public class layout
> {
> public function traceTest(): void
> {
> trace("This is a test.");
> }
> }
> }
>
> Thanks.
>
>
>
> ------------ --------- --------- ------
>
> --
> Flexcoders Mailing List
> FAQ: http://groups. yahoo.com/ group/flexcoders /files/flexcoder sFAQ.txt
> Alternative FAQ location: 
> https://share. acrobat.com/ adc/document. do?docid= 942dbdc8- e469-446f- 
> b4cf-1e62079f684 7
> Search Archives: 
> http://www.mail- archive.com/ flexcoders% 40yahoogroups. comYahoo! Groups 
> Links
>
>
>





      

Reply via email to