Re: [Flashcoders] ns.onStatus calling a function

2006-09-12 Thread eka

Hello :)

where is your function ? :)

var write = function ( message ) {
   trace("> " + message) ;
}

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


???

EKA+ :)


2006/9/12, Christian Pugliese <[EMAIL PROTECTED]>:


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?

___
Flashcoders@chattyfig.figleaf.com
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


___
Flashcoders@chattyfig.figleaf.com
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


Re: [Flashcoders] ns.onStatus calling a function

2006-09-12 Thread John Grden

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?

___
Flashcoders@chattyfig.figleaf.com
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  ]
___
Flashcoders@chattyfig.figleaf.com
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


Re: [Flashcoders] ns.onStatus calling a function

2006-09-12 Thread Johannes Nel

its a scope issue, try delegating the onstatus function

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?

___
Flashcoders@chattyfig.figleaf.com
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





--
j:pn
http://www.lennel.org
___
Flashcoders@chattyfig.figleaf.com
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


[Flashcoders] ns.onStatus calling a function

2006-09-12 Thread Christian Pugliese

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?


___
Flashcoders@chattyfig.figleaf.com
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