I introduced working with youtube API and playing a ripped flv file in the flash player. This sample shows a player that the video can be moved and zoomed up and down freely in the stage.
It is composed of four objects; a video, a guide, a handle and an area. A flv plays under the area object that is a draggable rectangle as the same size as itself. It is used to move a video around in the stage and the handle is used to zoom it in the same way. The guide object will appear when a user drags a handle to resize the video.
The genetic feature was added in the version, and it uses three new classes; Env class, GeneticWorld class and GeneticBug class. A GeneticWorld class creates a graph upper on the stage how much bugs fit a world. It has a Env object that refers to four elements; temperature, water, food and predator, can be changed with sliders right below on the stage. A GeneticBug class also has a Env object. A bug has its own elements in it, and they will be estimated for which bug should weed out when it evolve. As time is going by in the world, the least fit bug will weed out, and the fitness of bugs will be more suitable for a circumstance of the world.
The change of fitness of any bugs caused by mutations at age will appear with a red vertical line. You can download the source.
The start parameter -2 or omitted
plays the live stream at the URI.
plays the recorded stream at that location if the live stream is not found.
waits for the stream to be published if a recored stream is also not found.
-1
plays only a live stream at the URI.
waits for the stream to be published if a recored stream is not found.
0
plays only a recorded stream at the URI from its beginning.
returns an infomation object to NetStream.onStatus() if a recored stream is not found.
Greater than 0
plays only a recorded stream at the URI.
indicates how many seconds into the stream to begin playing.
returns an infomation object to NetStream.onStatus() if a recored stream is not found.
The length parameter
indicates how many seconds the stream should play. The stream plays until it ends if it is -1 or omitted. The length can be limited for live streams to play with the length parameter.
The Playlist
To create a playlist in the server can provide that the server treats a sequence of recorded streams as a continuous stream.
In the second issue as a series of articles, I introduced how to use a loaded data with Spry in last month. The last of these, I will introduce how you use another data set in a data set.
You can see the preview here.
Namespace
It is used in the same way as xmlns in XML like "namespace::data" when you use the data in another name space. The "{dsAlbum::folder}" refers to a current value named "folder" in the dsAlbum.
var dsAlbum =new Spry.Data.XMLDataSet("album.xml","/contents/album");var dsPhoto =new Spry.Data.XMLDataSet("{dsAlbum::folder}.xml","/album/pic");
The onChange event will be occur when a user clicks a different item in the list, and the "dsAlbum" in it will invoke the setCurrentRow() method with a value of the selected item. The method changes the current row in the data set. Next, the "dsPhoto" will invoke loadData() method with the current value to reload its own data set.
The {} tags of a folder and a image will be displace with a real string dynamically. Notice that two data is set in the 'spry:detaionregion' attribute of a div tag.