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], "danielvlopes" <[EMAIL PROTECTED]> 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. >

