PDA

View Full Version : [as3]Error with video class



smizzle
April 24th, 2007, 05:46 PM
When I try and use the video class in as3, I get this error:

Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095: flash.net.NetStream was unable to invoke callback onMetaData. error=ReferenceError: Error #1069: Property onMetaData not found on flash.net.NetStream and there is no default value.
at com.infinity.components::ISMPlayer$iinit()
at Timeline0_d569d4230dd2142a716fd8ed9b47926/::frame1()

Any ideas?

sarahelizabeth
April 24th, 2007, 05:52 PM
I haven't used the video class yet, but it looks like the help files on adobe's site haven't been updated (just a guess) as they don't follow the new event model. I would think you'd add an event listener to listen to the onMetaData event, then write your own event handler, much like mouse events.

//edit: or maybe i'm wrong, it's documented that way in flex too... it just seems weird. Do you have a listener to handle the AsyncErrorEvent?

http://blogs.adobe.com/pdehaan/2006/07/playing_back_flvs_with_actions_1.html

smizzle
April 24th, 2007, 06:18 PM
thanks that aritcle worked. I wonder why they didn't use listeners and instead went with the weird client object, it seems rather as2 or as1 since everything else is done with listeners.

sarahelizabeth
April 25th, 2007, 02:30 PM
yeah. me too. it's so weird.