1 Comment » -->

Hi there,
I thought to share this little utility to take one element of an array, and put in the first place, without changing the order of the rest of items

var _arr_videos : Array = new Array( 'a' , 'b' , 'c' , 'd' , 'e')  ; 

_arr_videos = arrayReOrder('e')
trace(_arr_videos)

function arrayReOrder( id : String ) : Array
{
	var newArr : Array = new Array ;
	var idIter : int = _arr_videos.indexOf( id ) ;
	trace(' id Iter :' + idIter )
	if( idIter > 0)
	{
		for( var i : int = 0 ; i < _arr_videos.length ; i ++ )
		{
			if( i == 0 )
			{
				newArr.push( _arr_videos[ idIter ]) ;
			}
			else
			{
				 if( i <= idIter)
				{
					newArr.push( _arr_videos[ i - 1 ]) ;
				}
				else
				{
					newArr.push( _arr_videos[ i  ]) ;
				}
			}
		}
	}
	return newArr ;
}

Posted on April 22, 2010
1 Comment » -->

Here is a good resource to find out what percentage of users have what browser… or what size screen, and much more :
http://www.w3schools.com/browsers/default.asp
http://www.w3schools.com/browsers/browsers_stats.asp
http://www.w3schools.com/browsers/browsers_display.asp


Posted on March 19, 2010
1 Comment » -->

Always client come up with
“on some computer the site doesnt work”. “no idea which computer no no mac? dunnooo”.
And you go mad trying to understand what’s going on
Here a perfect tool to help you debug your online application
supportdetails


1 Comment » -->

I was just going mad trying to get bytesLoaded, streaming from flash media server.
Wasting my time :
This property doesn’t exist in fms

the concept of bytesLoaded and bytesTotal is lost when using FMS. The server only sends data as needed, and video data is not stored in cache on the client side

This property applies when you are using a NetStream object for progressive video download (standalone files), or when you are loading files that are outside the calling file’s own domain. This property is ignored when you are using a NetStream object to get an RTMP asset.


2 Comments » -->

Hi there,
I’ve just spent a few googling time to understand how to detect the ‘onComplete’ event for a video streamed with FMS.
Problem i was expecting the event on the nsNetStatus method.
I was wrong, as you get the NetStream.Play.Complete on the onPlayStatus
Here a quick sample


ns = new NetStream( conn );
ns.addEventListener(NetStatusEvent.NET_STATUS, nsNetStatus) ;
var customClient:Object = new Object() ;
customClient['onCuePoint'] = onCuePoint ;
customClient['onMetaData'] = onMetaData ;
customClient['onPlayStatus'] = onPlayStatus ;
ns.client = customClient;

video.attachNetStream(ns);
private function onPlayStatus( info : Object ) : void
		{
			trace(' info code :' + info['code'])
			switch (info['code'])
			{
				case "NetStream.Play.Complete":
					State = 'Stopped' ;
					trace('COMPLETED')
					break;
			}
		}

« Previous Entries
Category:
Archives: