Articles in the Code Samples Category
Code Samples, FMS, Flash, Flash Components, New Developments »
We’ve recently added some pretty significant new features to our FLV Player Flash Component. One really neat new offering is our Free FLV Player, which allows you to stream videos from Youtube!, Vimeo, or your own sources including Flash Media Server. All you need is a video source, your player width and height requirements, and you can get your embed code in 3 easy steps.
Take a look at FLV Player, and our new Free FLV Player at http://flvplayer.com.
If you ever wanted to add video to your projects or websites, there …
Code Samples, Flash, Flash Components, New Developments »
After a recent partnership with FLVplayer.com, and a lot of work developing and tweaking our latest product, we’ve officially released our highly customizable FLV Player Flash Video Component. Have a look at flvplayer.com
FLVplayer supports all of the video formats available through the Adobe Flash platform including, but not limited to, MOV, MP4, F4V, and of course FLV.
Customize FLVplayer to match the look and feel of your current website or project. Modify the component to give it your own custom interface.
Our FLVplayer is loaded with features. If you’re a seasoned programmer, …
Code Samples, FMS, Flash, Tutorials »
This tutorial is the final in a series of three. Part one of this tutorial outlined what is needed to detect a users upload, download, and latency between a Flash client and the Flash Media Server. Part two adds on the ability to detect which ports are available while connecting. In part three, we will be adding an external xml file that will allow you to compare connections to different Flash Media Servers in order to find which of them is the best connection for serving media. If you haven’t …
Code Samples, FMS, Flash, Tutorials »
This tutorial is the second in a series of three. Part one of this tutorial outlined what is needed to detect a users upload, download, and latency between a Flash client and the Flash Media Server. Part 2 adds on the ability to detect which ports are available while connecting.
Again, Bandwidth detection is most important when connecting your users to the correctly compressed media to be streamed, recorded, or delivered via a Flash Media Server. This second example will walk you through the process of being able to detect a …
Code Samples, FMS, Flash, Tutorials, Uncategorized »
This tutorial is the first in a series of three that builds upon the first Flash Bandwidth & Port Detection tutorial I created a while back. These three articles look to make it even easier than the original post, and go more in depth on some of the streaming options, and have better structured server side code.
If you are interested in the original article, you can find it here.
Bandwidth detection is most important when connecting your users to the correctly compressed media to be streamed, recorded, or delivered via a …
Code Samples, Flex, Tutorials »
Using Flex, it’s extremely easy to create a simple FLV player. This simple flv player has a scrub bar, pause/play buttons, and can load a flv from any url. The example is pretty basic, but it’s a great starting point on understanding how to stream video using Flex.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="top" backgroundColor="white" viewSourceURL="srcview/index.html">
<mx:Script>
<![CDATA[
private function formatTime(item:Date):String {
…
Code Samples, FMS, Flash, Tutorials »
Being able to detect a users bandwidth can be an important part of serving them streaming video. Using their bandwidth you can stream a video that will play well using their connection speeds.
The first step is to create our NetConnection.as file. This is used by our bandwidth checking script to connect to our Flash Media Server via RTMP, select an available port, and talk with our bw_check.asc to report the users available bandwidth.
import mx.events.EventDispatcher;
class NCManager extends Object {
// EventDispatcher needs these
var addEventListener:Function;
var removeEventListener:Function;
var dispatchEvent:Function;
var dispatchQueue:Function;
// Constants
private var k_DEFAULTCONNLIST = [{protocol:"rtmp", …
Code Samples, Flash, Tutorials »
A friend my mine just asked me how he could find out how to detect his version of flash, so I wrote a quick bit of AS2 to help him out. Here’s a quick and easy way to detect a users flash version from within your Flash project.
//trace(eval("$version"));
version = eval("$version");
//The operating system: WIN, MAC, LNX
var osType;
//The player versions. 9,0,115,0
var majorVersion; 9
var majorRevision; 0
var minorVersion; 115
var minorRevision; 0
vers.text = version;
osArray = version.split(’ ‘);
osType = osArray[0];
versionArray = osArray[1].split(’,');
majorVersion = versionArray[0];
majorRevision = versionArray[1];
minorVersion = versionArray[2];
minorRevision = versionArray[3];
feedback.text = "Operating System: "+osType + "\n" …
Code Samples, Flash, Tutorials »
I have an upcoming project that will require an mp3 player that can load multiple songs, and let users choose which track they would like to listen to. I created this as a test, and will be developing it further for use on the site itself.
The player loads in mp3’s from an external file based on xml settings.
Here’s the actionscript 3 that is involved:
var getMusic:URLRequest;
var music:Sound = new Sound();
var soundChannel:SoundChannel;
var currentSound:Sound = music;
var pos:Number;
var currentIndex:Number = 0;
var songPlaying:Boolean = false;
var xml:XML;
var songlist:XMLList;
//preloader
function loadProgress(event:ProgressEvent):void {
var percentLoaded:Number = …
Code Samples, Flash, SEO »
A very simple RSS feed reader that displays links off to your blog created using Actionscript 2.
stop();
//create the xml object
xmlLoad = new XML();
xmlLoad.load(_root.feed);
xmlLoad.ignoreWhite = true;
xmlLoad.onLoad = function(success){
//if successful
if(success && xmlLoad.status == 0){
//reset the text
xml_text="";
//list of items
var xmlItems:XML = xmlLoad.firstChild.firstChild;
for (var m = 0; m<xmlItems.childNodes.length; m++) {
//grab each item
if (xmlItems.childNodes[m].nodeName == "item") {
for (var n = 0; n<xmlItems.childNodes[m].childNodes.length; n++) {
if (xmlItems.childNodes[m].childNodes[n].nodeName == "link") {
//grab the link of the item
itemlink=xmlItems.childNodes[m].childNodes[n].firstChild.toString();
}
if (xmlItems.childNodes[m].childNodes[n].nodeName == "title") {
//grab the title of the item
itemtitle=xmlItems.childNodes[m].childNodes[n].firstChild.toString();
}
}
//add the current item
xml_text+= "<a href=\""+itemlink+"\">"+itemtitle+"</a><br><br>";
}
}
}
//set the text
xml_holder.text = xml_text;
}
The only library item needed …








