Techno m’lounge – Where technology meets human senses.

Technology, if not handled with care becomes disruptive, Iam a live example…
Home » Posts tagged 'ActionScript'

Connecting to Flash Media Server Using ActionScript 3.0

September 29th, 2009 Posted in ActionScript 2.0 and 3.0, Flash Tags: ,

A lot of times you will need to connect to Flash Media Server , where there is lot of code avialable for AS 2.0 , I was not able to find much code on AS 3.0 . I hope this helps other fellow Action Script programmers out there.

package
{
import flash.net.NetConnection;
import flash.display.Sprite;
import flash.text.TextField;
import flash.events.NetStatusEvent;

public class FMSManager extends Sprite
{
private var nc:NetConnection;
private var rtmpNow:String;
private var msg:String;
private var connectText:TextField;
private var posX:Number;

public function FMSManager ()
{
nc=new NetConnection();
nc.addEventListener (NetStatusEvent.NET_STATUS,checkConnect);
rtmpNow=”rtmp://timfuzos.rtmphost.com/one2oneChat/room1″; //change the host name to your host
//rtmpNow=”rtmpe:/one2oneChat/room1″;  // if your FMS is hosted in local use this
nc.connect (rtmpNow,”sumit”);
}
private function checkConnect (event:NetStatusEvent):void
{
connectText=new TextField();
msg=event.info.code;
trace(msg);
connectText.width=250;
connectText.text=msg;
addChild (connectText);
posX=connectText.stage.stageWidth;
connectText.x=(posX/2)-((msg.length/2)*(6));
connectText.y=175;
}
}
}

The screen would look like this

Connection Screen

Connection Screen



Download code from here.

FMSConnect

Popularity: 48% [?]

Custom Branded FLV Player

January 5th, 2009 Posted in ActionScript 2.0 and 3.0, Flash Tags:

Recently we got a project to do a custom branded flv player for a client. Ram and me decided to make one custom Branded FLV Player. Here is what we came out with.

Just give path to a flv file on http and play it :)

http://www.indiauploading.com/demosites/videoplayer/customplayer.html

If you want to see how it looks, Watch a static video on this player below.

http://www.indiauploading.com/demosites/videoplayer/myflvplayer.html

So if you want to get a custom flv player developed for your do connect back to me asap!

Popularity: 4% [?]