----- Original Message ----

> From: Taka Kojima <t...@gigafied.com>
> To: Flash Coders List <flashcoders@chattyfig.figleaf.com>
> Sent: Mon, July 26, 2010 1:33:43 PM
> Subject: Re: [Flashcoders] Listeners (was no subject)
> 
> John,
> 
> This is going to come across as harsh, however you really should  maybe go
> and get a book on AS3.
> 
> These problems, forgetting an import,  trying to pass arguments to a
> listener, etc. are pretty rudimentary, and not  really the purpose of this
> list.

Yep, a little rough. Got a good book. My question isn't how to pass arguments. 
I 
know how to do that. My question is far more specific. It's why don't I have to 
pass the e:Event argument? Why does the compiler complain that I only pass one 
argument when I try to pass the other since apparently the first argument is 
passed automatically? How can I pass that first argument manually when I can't 
even see what it is? Didn't notice that Moock addressed those questions, so I 
thought I'd ask here. Would you be so kind as to address those questions, not 
how to "pass arguments"?
TIA,
John


> 
> Taka
> 
> On Mon, Jul 26, 2010 at  10:58 AM, John Singleton <johnsingleton...@yahoo.com
> >  wrote:
> 
> >
> >
> > ---- Original Message ----
> >
> >  > From: Henrik Andersson <he...@henke37.cjb.net>
> > >  To: Flash Coders List <flashcoders@chattyfig.figleaf.com>
> >  > Sent: Mon, July 26, 2010 12:06:55 PM
> > > Subject: Re:  [Flashcoders] (no subject)
> > >
> > > John Singleton  wrote:
> > > >          function   RotateGearsLoaded(e:Event):void
> > > Why is that? I tried to pass that  var like  this:
> > > >
> > > >
> >
> >  
>>loader.contentLoaderInfo.addEventListener(Event.COMPLETE,RotateGearsLoaded(displayGearsCounter));
>
> >  >
> > > >
> > >
> > > RotateGearsLoaded   returns void, not Function. The return value is not a
> > > legal  listener. Yet  you are calling it here to get the listener to add.
> >  >
> > > Remember, you are not  the one calling the listener,  thusly, you can't
> > > decide the  arguments.
> >
> > That  makes sense. Unfortunately, it's not clear to me how I should proceed.
> >  Could you either recommend a tutorial or give an example?
> > TIA,
> >  John
> > PS. Original code for those who skipped this message because it had  no
> > subject:
> >
> >        function  Main()
> >        {
> >             InitRotateGears();
> >         }
> >
> >        function  InitRotateGears()
> >        {
> >             for (var i = 0; i < gearsPaths.length;  i++)
> >            {
> >                 RotateGears();
> >                 displayGearsCounter +=  1;
> >            }
> >
> >         function RotateGears()
> >         {
> >            var path:String = new  String();
> >            path =  gearsPaths[displayGearsCounter];
> >             var req:URLRequest = new URLRequest(path);
> >             var loader:Loader = new Loader();
> >             loader.load(req);
> >
> >
> >  
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,RotateGearsLoaded);
> >         }
> >
> >        function  RotateGearsLoaded(e:Event):void
> >         {
> >            var loaderInfo:LoaderInfo =  e.target as LoaderInfo;
> >            var  displayObject:DisplayObject = loaderInfo.content;
> >             displayObject.width =  gearWidths[displayGearsCounter];
> >             displayObject.height = gearHeights[displayGearsCounter];
> > //             displayObject.x = -  gearWidths[displayGearsCounter];
> > //             displayObject.y = - gearWidths[displayGearsCounter];
> >             displayObject.x = 0;
> >             displayObject.y = 0;
> >             trace(displayGearsCounter);
> >             parent_container.addChild(displayObject);
> >             parent_container.x = 0;
> >             parent_container.y = 0;
> >             parent_container.alpha = 1;
> >             addChild(parent_container);
> >             var myTimeline:TimelineLite = new
> >  TimelineLite({useFrames:true});
> >             myTimeline.append(new TweenMax(parent_container, 1,
> >  {shortRotation:{rotation:gearAngles[displayGearsCounter]}}));
> >             }
> >         }
> >
> >
> >
> >
> >  _______________________________________________
> > Flashcoders mailing  list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> _______________________________________________
> Flashcoders s mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> 


      

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to