1 // Probably don't need to change these
\r
3 params.quality = "high";
\r
4 params.bgcolor = "#ffffff";
\r
5 params.allowscriptaccess = "sameDomain";
\r
6 params.allowfullscreen = "true";
\r
8 // Probably don't need to change these
\r
10 attributes.id = "fTelnet";
\r
11 attributes.name = "fTelnet";
\r
12 attributes.align = "middle";
\r
13 attributes.swliveconnect = "true";
\r
15 // This embeds the SWF on the webpage when it loads
\r
17 "fTelnet.swf", "divfTelnet",
\r
19 "10.0.0", "playerProductInstall.swf",
\r
20 flashvars, params, attributes);
\r
22 function fTelnetConnect(AHost, APort)
\r
24 var flash=getFlashObject("fTelnet");
\r
25 flash.Connect(AHost, APort);
\r
28 function fTelnetConnected()
\r
30 var flash=getFlashObject("fTelnet");
\r
31 return flash.Connected();
\r
34 function fTelnetDisconnect()
\r
36 var flash=getFlashObject("fTelnet");
\r
40 // Dynamically change the border style of the current flash object
\r
41 function fTelnetSetBorderStyle(AStyle)
\r
43 var flash=getFlashObject("fTelnet");
\r
44 flashvars.BorderStyle = AStyle;
\r
45 flash.SetBorderStyle(flashvars.BorderStyle);
\r
48 // Dynamically change the font size of the current flash object
\r
49 function fTelnetSetFont(ACodePage, AWidth, AHeight)
\r
51 var flash=getFlashObject("fTelnet");
\r
52 flashvars.CodePage = ACodePage;
\r
53 flashvars.FontHeight = AHeight;
\r
54 flashvars.FontWidth = AWidth;
\r
55 flash.SetFont(flashvars.CodePage, flashvars.FontWidth, flashvars.FontHeight);
\r
58 // Dynamically change the screen size of the current flash object
\r
59 function fTelnetSetScreenSize(AColumns, ARows)
\r
61 var flash=getFlashObject("fTelnet");
\r
62 flashvars.ScreenColumns = AColumns;
\r
63 flashvars.ScreenRows = ARows;
\r
64 flash.SetScreenSize(flashvars.ScreenColumns, flashvars.ScreenRows);
\r
67 // Helper function to update the size of the flash object
\r
68 function fTelnetResize(AWidth, AHeight)
\r
70 var flash = getFlashObject("fTelnet");
\r
71 flash.setAttribute("width", AWidth);
\r
72 flash.setAttribute("height", AHeight);
\r
75 // Helper function to get the flash object (cross browser)
\r
76 function getFlashObject(AID)
\r
78 if (window.document[AID])
\r
80 return window.document[AID];
\r
82 if (navigator.appName.indexOf("Microsoft Internet")==-1)
\r
84 if (document.embeds && document.embeds[AID])
\r
86 return document.embeds[AID];
\r
89 else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
\r
91 return document.getElementById(AID);
\r