For sure the function loaderCompleteHandler exists. Any other suggestions????? I have one similar example.....and i get the result succesfully. Here is the soruce..... <?xml version="1.0" encoding="utf-8"?><mx:Canvas creationComplete="doInit()" width=" height="xmlns:mx="http://www.adobe.com/2006/mxml" 100%"438" backgroundAlpha="1.0" borderStyle="solid"><mx:Script><![CDATA[importcom.cairngorm.events.movieimage.GetCoverEvent;importcom.cairngorm.model.ViewModelLocator;publicvarmodel : ViewModelLocator = ViewModelLocator.getInstance();privatevarmyMovieId:String = null;privatefunctiondetailMovie():void{ varmyMainAcorName:String; varmySecondAcorName:String; varmyDirectorName:String = this.grdMovies.selectedItem.director.directorName; varmyGenreName:String = this.grdMovies.selectedItem.genre.genreName; .......................... //Set the variable with wich we control if the movie to save is an insert or an update showCover(); }// Called to display the cover of the selected movie getCoverEvent.dispatch(); } publicfunctionloaderCompleteHandler(event:Event):void{ } ]]> this.coverImg.source = event.currentTarget.content asBitmap; </mx:Script><mx:DataGridid="grdMovies" height="199" dataTipField="synopsis" click="detailMovie()" dataProvider="{model.listMovies}" top="231" left="10" width="95%"> <mx:columns> <mx:DataGridColumnshowDataTips="true" headerText="Title" dataField="title"/> <mx:DataGridColumnheaderText="Director" dataField="director" labelFunction="showDirectorName" sortCompareFunction="ordenarPorDirector"/> <mx:DataGridColumnheaderText="Main Actor" dataField="mainActor" labelFunction="showActorName"/> <mx:DataGridColumnheaderText="Year" dataField="movieYear"/> </mx:columns> </mx:DataGrid>privatefunctionshowCover():void{ this.coverImg.source = null; vargetCoverEvent:GetCoverEvent = newGetCoverEvent(this.myMovieId); this.myMovieId = this.grdMovies.selectedItem.movieId; In this example....i display the image...when i selected one row in the datagrid. The event, command and other class are the same as in the other example. And teh unique thing diferent thing in the ViewModelLocator.as import { loader.loadBytes( loader.contentLoaderInfo.addEventListener(Event.COMPLETE, Application.application.adminmovies.loaderCompleteHandler); } } I hope someone can help me. Thanks in advanceflash.display.Loader;publicfunctiondisplayImage():void{ if(this.movieCover != null&& this.movieCover.length > 0) varloader:Loader = newLoader();this.movieCover); ----- Original Message ---- From: valdhor <[EMAIL PROTECTED]> To: flexcoders@yahoogroups.com Sent: Saturday, April 26, 2008 3:26:28 AM Subject: [flexcoders] Re: TypeError: Error #2007: The parameter listener must not be NULL + Cairngorm
Instead of adding an event listener, just try to call the function - does it work? Does the function exist? --- In [EMAIL PROTECTED] ups.com, Jon Santos <[EMAIL PROTECTED]> wrote: > > But i don´t understand.. ..i have debug my application. ...i have traced...... ..but i donñt understand why always this error....from where is generated... . > please...can you check my source... > Thanks in advance. > > > > ----- Original Message ---- > From: valdhor <[EMAIL PROTECTED] ..> > To: [EMAIL PROTECTED] ups.com > Sent: Thursday, April 24, 2008 8:19:27 PM > Subject: [flexcoders] Re: TypeError: Error #2007: The parameter listener must not be NULL + Cairngorm > > > Check the value of your listener function: > > Application. application. repeatermovies. detailmovie. loaderCompleteHa ndler > > The error says that this is null. > > > > > ____________ _________ _________ _________ _________ _________ _ > Be a better friend, newshound, and > know-it-all with Yahoo! Mobile. Try it now. http://mobile. yahoo.com/ ;_ylt=Ahu06i62sR 8HDtDypao8Wcj9tA cJ > ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ