Thanks Ben,

  I've been poking through the docs, I just have no concept of what
each element is called yet - jumping in head first with tons of heavy
programming experience, but zero Flash/AS/Flex experience. Your
answers here are incredibly appreciated

  Back on topic..

1. I've added 

public var callback:Function = null;

..to the object class.  Further, at the point where the callback
object should fire, I've added this code:

if( callback != null )
  callback( 3 );

2. In the main app where I'm creating this object, I've added, inside
of a "creationComplete" block, the following:

customObject.callback = menuSelect;

private function menuSelect( index:int ):void{
   ....
}
  

Unfortunately, it doesn't seem to fire..

--- In [email protected], Benjamin Schwehn <[EMAIL PROTECTED]> wrote:
>
> > I'd like at some point, after the
> > button is clicked and the functions performed, that a certain callback
> > function be performed.  Something like a function pointer
> 
> 
> you can pass functions as arguments or assign to properties just as you 
> would with any other type.
> eg.
> 
> private function foo(callback :Function = null) :void {
>    callback();
> }
> 
> well, I recommend just reading the docs. First sentence in the Function 
> help entry would have told you this :)
> 
> hth
> ben
>


Reply via email to