Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 01-29-2008, 09:12 PM   #1
tommymcglynn
Registered User
 
Join Date: Jan 2008
Posts: 13
Question Handling onPlayStatus

I'm instantiating a NetStream object. I've defined the client and within it defined a handler as follows:

public function onPlayStatus(infoObject:Object):void
{

}


The handler is not being called. Anyways, I just want to handle this event somehow. Thank you.
tommymcglynn is offline   Reply With Quote
Old 01-29-2008, 09:19 PM   #2
panel
AS3
 
panel's Avatar
 
Join Date: Mar 2007
Location: Warsaw
Posts: 1,991
Send a message via Skype™ to panel
Default

I have played with it for a while but it just wouldn't work in my case ;/ so I am also interested in this topic
panel is offline   Reply With Quote
Old 02-01-2008, 11:42 PM   #3
Flash Gordon
rather be programming
 
Flash Gordon's Avatar
 
Join Date: Feb 2005
Location: City of Angels
Posts: 10,140
Default

yea....I too am having troubles with this. I know for metadata I have to do it like this:
ActionScript Code:
_listener.onMetaData = function(data:Object):void { _metaData = data; } _listener.onPlayStatus = function(data:Object):void { "onPlayStatus" } _ns.client = _listener;
However, not happens for the onPlayStatus method
__________________
trace("Good bye Flash.") Log.i(TAG, "Hello Droid");
Flash Gordon is offline   Reply With Quote
Old 02-02-2008, 12:54 PM   #4
panel
AS3
 
panel's Avatar
 
Join Date: Mar 2007
Location: Warsaw
Posts: 1,991
Send a message via Skype™ to panel
Default

@tommymcglynn I wonder do you need onPlayStatus for some specified purpose like movie playback completion? or you jus wanna know why this dosen't work?
panel is offline   Reply With Quote
Old 02-04-2008, 09:15 PM   #5
Flash Gordon
rather be programming
 
Flash Gordon's Avatar
 
Join Date: Feb 2005
Location: City of Angels
Posts: 10,140
Default

Quote:
Originally Posted by panel View Post
@tommymcglynn I wonder do you need onPlayStatus for some specified purpose like movie playback completion? or you jus wanna know why this dosen't work?
I know you aren't talking to me, but yes, I need to know when playback is completed and I don't want to do it with a Timer. I'd much rather use an EventListener
__________________
trace("Good bye Flash.") Log.i(TAG, "Hello Droid");
Flash Gordon is offline   Reply With Quote
Old 02-04-2008, 09:30 PM   #6
panel
AS3
 
panel's Avatar
 
Join Date: Mar 2007
Location: Warsaw
Posts: 1,991
Send a message via Skype™ to panel
Default

this the point ...
..but still when creating custom flvPlayback class you have to use timer for other things (monitor progress monitor loaded data status)
panel is offline   Reply With Quote
Old 02-04-2008, 09:44 PM   #7
Flash Gordon
rather be programming
 
Flash Gordon's Avatar
 
Join Date: Feb 2005
Location: City of Angels
Posts: 10,140
Default

Eh....it's still more overhead. It should work (it is in the docs), and comparing times is not a great way to go about it. The duration is not guarenteed to be close to the actually channel.time. I saw your thread about this either too (I beleive I did). Did you ever get it to work.
__________________
trace("Good bye Flash.") Log.i(TAG, "Hello Droid");
Flash Gordon is offline   Reply With Quote
Old 02-04-2008, 10:39 PM   #8
abeall
Senior Member
 
Join Date: Feb 2006
Location: Washington, DC
Posts: 2,812
Send a message via AIM to abeall
Default

Quote:
This event is intended for use with Flash Media Server
In other words, it doesn't work outside of an FMS stream. A progressive FLV load does not fire this event, as well as most of the netStatus events. JFYI
abeall is offline   Reply With Quote
Old 02-04-2008, 10:43 PM   #9
Flash Gordon
rather be programming
 
Flash Gordon's Avatar
 
Join Date: Feb 2005
Location: City of Angels
Posts: 10,140
Default

Eh...that's funny wording. If it doesn't work with progressive download they should say that rather than "the intended". I don't care what it is "intended" for only what it can do!

I've found that most netStatus event fire fine. What are you refering to when you say that?
And thanks for the help
__________________
trace("Good bye Flash.") Log.i(TAG, "Hello Droid");
Flash Gordon is offline   Reply With Quote
Old 02-05-2008, 12:41 AM   #10
abeall
Senior Member
 
Join Date: Feb 2006
Location: Washington, DC
Posts: 2,812
Send a message via AIM to abeall
Default

Quote:
Originally Posted by Flash Gordon View Post
Eh...that's funny wording. If it doesn't work with progressive download they should say that rather than "the intended". I don't care what it is "intended" for only what it can do!
I agree, I think the documentation is very hazy about the relationship of FMS with some of these APIs.

Quote:
I've found that most netStatus event fire fine. What are you refering to when you say that?
I guess I'm not positive that it's the same with AS3, but with AS2 there were a lot of additional status events that were added to FMS which were not available with a progressively loaded FLV. The Flash Authoring docs listed only the ones available with progressive FLV, while the FMS docs listed the rest, but in AS3 all those events are listed together in the Flash Authoring AS3 documentation ("for convenience" I think it states at one point):

NetStream.Buffer.Empty
NetStream.Buffer.Full
NetStream.Buffer.Flush
NetStream.Failed
NetStream.Publish.Start
NetStream.Publish.BadName
NetStream.Publish.Idle
NetStream.Unpublish.Success
NetStream.Play.Start
NetStream.Play.Stop
NetStream.Play.Failed
NetStream.Play.StreamNotFound
NetStream.Play.Reset
NetStream.Play.PublishNotify
NetStream.Play.UnpublishNotify
NetStream.Play.InsufficientBW
NetStream.Pause.Notify
NetStream.Unpause.Notify
NetStream.Record.Start
NetStream.Record.NoAccess
NetStream.Record.Stop
NetStream.Record.Failed
NetStream.Seek.Failed
NetStream.Seek.InvalidTime
NetStream.Seek.Notify
NetConnection.Call.BadVersion
NetConnection.Call.Failed
NetConnection.Call.Prohibited
NetConnection.Connect.Closed
NetConnection.Connect.Failed
NetConnection.Connect.Success
NetConnection.Connect.Rejected
NetConnection.Connect.AppShutdown
NetConnection.Connect.InvalidApp
SharedObject.Flush.Success
SharedObject.Flush.Failed
SharedObject.BadPersistence
SharedObject.UriMismatch

The AS3 docs mashes them all in one list without any distinction (that I can see), but I've added bold to the only ones that work with a progressive download, at least in AS2. I'd love to hear if you find any of the others work in AS3.

Also note there are a few new ones added in the livedocs for the Flash 9 Update 3 player.

Last edited by abeall; 02-05-2008 at 12:45 AM.
abeall is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is a custom event handling class wise? frank grimes ActionScript 3.0 8 07-28-2007 03:25 AM
Synchronous & Asynchronous Error Handling tptompkins ActionScript 3.0 5 05-09-2007 08:59 PM
Adding event handling to dynamically generated movie clips mskibbz ActionScript 2.0 9 07-30-2005 12:07 AM
Event Handling And Scope In ActionScript 2.0 Classes slim.chrisp ActionScript 2.0 0 01-17-2005 03:19 PM
large dataset handling problem jcasp ActionScript 1.0 (and below) 4 12-09-2002 02:31 PM


All times are GMT. The time now is 03:11 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.