it's a scope issue.  ns object doesn't know about calltheFunction()

use Delegate

import mx.utils.Delegate;

...later in your code

ns.onStatus = Delegate.create(this, myCustomStatusMethod);

private function myCustomStatusMethod(evtObj:Object):Void
{
    trace(evtObj.info);
    f(evtObj.code == "NetStream.Play.Start") {
      callTheFunction();
  }
}

hth,

jpg

On 9/12/06, Christian Pugliese <[EMAIL PROTECTED]> wrote:

can't I call a function inside a ns.onStatus ?
ie:

ns.onStatus = function(info) {
   if(info.code == "NetStream.Play.Start") {
      trace(info.code);
       callTheFunction();
   }
}

the trace line executes, an any other event occurs normally, but the
callTheFunction() is never called?

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com




--
[  JPG  ]
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to