It definitely does.  I was starting to suspect that looking at all of the
examples.  So I guess the only workaround for scope in my own functions is
to dispatch events and have classes listen for them.

Mani

On 3/16/06, Alain Rousseau <[EMAIL PROTECTED]> wrote:
>
> Hi Manuel,
>
> The thing about Delegate is that you can't just call it like that. It is
> supposed to be used either with eventHandling "onSomething = " or with
> setInterval, setTimeOut. Here is a link that will make you see the light
> http://www.osflash.org/flashcoders/as2?s=delegate
>
> So for exemple you could do in your code
>
>     ew_netConn.onBWCheck = Delegate.create(this,yourFunction);
>
> Hope this clarifies some things about Delegate.
>
> Alain
>
>
> On 3/16/06 9:39 AM, "Manuel Saint-Victor" <[EMAIL PROTECTED]> wrote:
>
> > I have not been having much luck with using Delegate lately.  If I
> > understand it correctly then it will call a function in the scope of the
> > class file that it is defined -right?
> >
> > Well In one of my classes within this function I have the delegate being
> > used and I'm not sure if it's because of a stupid error or what but the
> > delegated function is not firing. As you can see I had to use the old
> > viewRef workaround because the other Delegate attempt had also not been
> > firing.  If anyone could point out what I'm doing wrong it would help
> > immensely because I keep coming up against the same hurdle every time
> and if
> > I'm writing my Delegate wrong and could figure that out it would
> increase my
> > productivity greatly  today.
> >
> > public function initNetConnection(){
> >         viewRef=this;
> >         netConn=new NetConnection();
> >         if(adMode=="stream"){
> >
> >             trace("stream");
> >             var appURI = "rtmp://...........";
> >             //connection is of type streaming
> >             ew_netConn.onBWCheck = function(arg) {
> >                 return;
> >                 };
> >             ew_netConn.onBWDone = function(bw) {
> >                 trace("BWDone");
> >                 EW.bw = bw;
> >                 EW.Video.setBwAndBuf();
> >                 viewRef.setFileUrl();
> >
> >
> >                 //Begin playing the FLV video and audio based on the
> init
> > settings
> >         if(viewRef._aInit == "host"){
> >             trace(ObjectDumper.toString(parent));
> >             Delegate.create(this,audioOn);
> >         }else{
> >
> >              Delegate.create(this, audioOff);
> >         }
> >
> > Thanks,
> >
> > Mani
> > _______________________________________________
> > 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
>
_______________________________________________
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

Reply via email to