Techno m’lounge – Where technology meets human senses.

Technology, if not handled with care becomes disruptive, Iam a live example…
Home » Flash » Archive by category 'ActionScript 2.0 and 3.0'

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: 18% [?]

Poker Progamming – Step One

Ok so you want so create a Multiplayer poker game, thats why you are here. Writing a rock solid poker game application has been my keen interest over past 2 years. After seeing so much demand of online multi-player poker rooms, I really wished Globussoft should enter the online gaming market one day.

The first step to develop an Online Massive Multiplayer game is to choose a right technology stack. Iam aware of numerous projects which get doomed the day they get started due to choosing of wrong technology stack. Citing an example, in my previous company my bosses chose VC++ to code a complete client server game , the lacunae being that no body in the entire team knew abc of VC++. Our team got a time span of 45 days to learn a language like VC++, master it and roll out a game like Texas Holdem in a matter of 45 days.

I guess you already by now know what the end result was, the project got scraped by the client, the team was not even able to make a single demo to him.

Iam not bragging on our skill-sets here, but simply stating that if you want to roll out something usable and good , set achievable targets and use a technology stack which you feel will take you to the final end product.

Read the successive articles in this series to know how I researched and then finally decided on which framework we should build this game to make it world’s most successful poker application.

Next…

Popularity: 5% [?]