: Re: [Flashcoders] Calling Event methods and Other Classes
methods.
Even if myButton is not static?
and even so, if in main
myButton.addEventListener(MouseEvent.CLICK, fun);
and in other Class
Main.myButton. << now what?
On Sun, Mar 23, 2008 at 3:52 PM, Cor <[EMAIL PROTECTED]>
In another class file you can trigger the button like this:
>
> Main.myButton.whatever...
>
> -Oorspronkelijk bericht-
> Van: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Namens Omar Fouad
> Verzonden: zondag 23 maart 2008 14:28
> Aan: Flash Coders List
> Ond
List
Onderwerp: [Flashcoders] Calling Event methods and Other Classes methods.
look at this.
Main FLA Document Class
public class Main extends Sprite {
public function Main() {
myButton.addEventListener(MouseEvent.CLICK, fun)
}
public function fun(e:MouseEvent):void {
trace(&qu
8
Aan: Flash Coders List
Onderwerp: [Flashcoders] Calling Event methods and Other Classes methods.
look at this.
Main FLA Document Class
public class Main extends Sprite {
public function Main() {
myButton.addEventListener(MouseEvent.CLICK, fun)
}
public function fun(e:MouseEvent)
look at this.
Main FLA Document Class
public class Main extends Sprite {
public function Main() {
myButton.addEventListener(MouseEvent.CLICK, fun)
}
public function fun(e:MouseEvent):void {
trace("Clicked");
}
}
Now supposed I need to call the function fun by some other
5 matches
Mail list logo