First time i try use like Robert said: <mx:Metadata> [Event (name="uploadCompleted", type="com.MultipleUploadFileEvent")] </mx:Metadata> And still having same error.
After, i try remove Metadata tag, and compiler said "Cannot resolve attribute 'uploadCompleted' for component type com.MultiUploadFile." I don't wat can i do more. Some one can help? --- In [email protected], "robertdx.tw" <[EMAIL PROTECTED]> wrote: > > Thanks for the correction, Mayank. > Robert > --- In [email protected], Mayank <mayank.kumar@> wrote: > > > > The metadata tag is only to assist your compiler and does not > translate in > > any runtime code. > > > > Since you are using actionscript to dispatch and catch the event you can > > skip this tag. The application will work just fine. > > > > On 9/7/07, robertdx.tw <robertdx.tw@> wrote: > > > > > > Hi, > > > I think that you should state complete class path in metadata tag. > > > > > > something like: > > > <mx:Metadata> > > > [Event > > > (name="uploadComplete",type="com.somdomain.MultipleUploadFileEvent")] > > > </mx:Metadata> > > > otherwise, compiler won't know where the event class is. > > > > > > Good luck. > > > > > > Robert > > > --- In [email protected] <flexcoders%40yahoogroups.com>, > > > "danielvlopes" <danielvlopes@> > > > > > > wrote: > > > > > > > > Hello, > > > > > > > > I'm trying create a custom event, this event is dispatched completed > > > > upload of some files. > > > > But "Event type 'MultipleUploadFileEvent' is unavailable." the erro > > > > appear. > > > > > > > > i think the reason is because i extended custom event from > > > > flash.event.Event and this custom event need to be extended of other > > > > package, but i don't who. > > > > > > > > Here is part of my code: > > > > > > > > My meta data is (extended of flash.event.Event): > > > > <mx:Metadata> > > > > [Event (name="uploadComplete", type="MultipleUploadFileEvent")] > > > > </mx:Metadata> > > > > > > > > in function make upload i had de following code: > > > > refUploadFile.addEventListener(DataEvent.UPLOAD_COMPLETE_DATA, > > > > onUploadCompleteData); > > > > > > > > And in this moment (onUploadCompleteData) a try to dispatche event > > > > calling uploadComplete function: > > > > > > > > public function onUploadCompleteData(event:DataEvent):void { > > > > numCurrentUpload++; > > > > uploadProgress.visible=false; > > > > uploadForm.visible=true; > > > > if (numCurrentUpload < arrUploadFiles.length) { > > > > startUpload(false); > > > > }else{ > > > > uploadComplete(event.data.toString()); > > > > } > > > > } > > > > > > > > this is the function to dispatch event: > > > > public function uploadComplete(xmlResult:String) :void{ > > > > var eventObj:MultiUploadFileEvent = new > > > > MultiUploadFileEvent(xmlResult,"uploadComplete"); > > > > dispatchEvent(eventObj); > > > > } > > > > > > > > > > > > Thanks everyone. > > > > > > > > > > > > > > > >

