I'm sorry, but I'm confused as to how to implement this. Can you please
explain how I can call this function for my ten possible streams?
Diego wrote:
>
>
> hello,
>
> sNames.onStatus = function(info) {
>
> if (info.code != "NetStream.Play.StreamNotFound") {
> // stream exists
> }
>
> }
>
>
>
> John Gorman escribió:
>> Thanks for the response. Unfortunately, I don't have enough familiarity
>> with AS3 to do something as complicated as this app. Can you think of a
>> way to accomplish this in AS2?
>>
>> Diego Vilariño wrote:
>>
>>> hello,
>>> with as3 maybe you can try something like this:
>>>
>>> sNames.addEventListener(NetStatusEvent.NET_STATUS, netstat);
>>>
>>> public function netstat(stats:NetStatusEvent){
>>> if(stats.info.code != "|NetStream.Play.StreamNotFound|") {
>>> // stream exists
>>> }
>>> }
>>>
>>>
>>>
>>> John Gorman escribió:
>>>
>>>
>>>> First let me think you all for answering all the questions on this list.
>>>> Many of the replies have been helpful to me so far.
>>>>
>>>> I am working with a customized version of oflaDemo. I have archived
>>>> .flv's and also live streams that I would like to be able to display and
>>>> play. I have no experience with Java, so I do everything with
>>>> ActionScript in Flash. I am trying to write a function that will check
>>>> if a live stream exists, and eventually put the stream name into a
>>>> datagrid like the one in the demo.
>>>>
>>>> Here is what I have so far:
>>>>
>>>> function liveCheck() {
>>>> for(var i:Number = 1; i < 11; i++) {
>>>> sName = loadedvar.path + i;
>>>>
>>>> this.ns2 = new NetStream(this.nc);
>>>> ns2.setBufferTime(1);
>>>> ns2.play(sName, -1);
>>>>
>>>> if (ns2.bytesLoaded != undefined) {
>>>> // stream exists
>>>> }
>>>> }
>>>> }
>>>>
>>>> setInterval(liveCheck, 30000);
>>>>
>>>> sName is the name of the stream, which is read in from an external file
>>>> and a number ranging from 1-10 is concatenated to the end of it.
>>>> Unfortunately, this method does not detect live streams that exist.
>>>>
>>>> Any help would be appreciated. I look forward to your suggestions.
>>>>
>>>> _______________________________________________
>>>> osflash mailing list
>>>> [email protected]
>>>> http://osflash.org/mailman/listinfo/osflash_osflash.org
>>>>
>>>>
>>>>
>>> _______________________________________________
>>> osflash mailing list
>>> [email protected]
>>> http://osflash.org/mailman/listinfo/osflash_osflash.org
>>>
>>>
>>>
>>
>>
>> _______________________________________________
>> osflash mailing list
>> [email protected]
>> http://osflash.org/mailman/listinfo/osflash_osflash.org
>>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> osflash mailing list
> [email protected]
> http://osflash.org/mailman/listinfo/osflash_osflash.org
>
_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org