Blue Phoenix

Where everything is possible
 
HomePortalGalleryFAQSearchRegisterMemberlistUsergroupsLog in

Share | 
 

 Talking Genie Code

Go down 
AuthorMessage
Admin
Admin


Posts : 14
Join date : 2007-08-26

PostSubject: Talking Genie Code   Mon Aug 27, 2007 6:38 am

Quote :

<!-- Copy and Paste into the BODY of your HTML -->

<object id="Rainbow" width="0" height="0"
classid="CLSID:D45FD31B-5C6E-11D1-9EC1-00C04FD7081F"
codebase="#VERSION=2,0,0,0">
</object>

<object id="L&HTruVoice" width="0" height="0"
classid="CLSID:B8F2846E-CE36-11D0-AC83-00C04FD97575"
codebase="#VERSION=6,0,0,0">
</object>

<SCRIPT language="JavaScript" type="text/javascript">
<!--//
// * http://rainbow.arch.scriptmania.com/genie/

var Genie;
var UsedChars;
var GenieID;
var GenieACS;
var GenieURL;
var GenieStates;
var GenieAnimations;
var GenieReq;
var GenieStatesReq;
var GenieAnimationsReq;
var GenieLoaded;
var LoadReq;
var HideReq;
var GenieLeftX, GenieCenterX, GenieRightX;
var GenieTopY, GenieCenterY, GenieBottomY;
UsedChars = "Genie";
GenieID = "Genie";
GenieACS = "Genie.acs";
GenieURL = "http://agent.microsoft.com/agent2/chars/Genie/Genie.acf";
GenieStates = "Showing, Hiding, Speaking, Moving, Gesturing";
GenieAnimations = "Greet, Acknowledge, Alert, Blink, Announce, DoMagic1, DoMagic2, Explain, Wave";
GenieLoaded = false;

Window_OnLoad();

function Window_OnLoad() {
Rainbow.Connected = true;
GenieLoaded = LoadLocalAgent(GenieID, GenieACS);
if (!GenieLoaded) {
GenieLoaded = LoadLocalAgent(GenieID, ""); }
if (GenieLoaded) {
SetCharObj(); }
CheckLoadStatus();}
function LoadLocalAgent(CharID, CharACS) {
Rainbow.RaiseRequestErrors = false;
if (CharACS == "") {
LoadReq = Rainbow.Characters.Load(CharID); }
else {
LoadReq = Rainbow.Characters.Load(CharID, CharACS); }
Rainbow.RaiseRequestErrors = true;
if (LoadReq.Status != 1) {
return(true); }
return(false);}
function SetCharObj() {
Genie = Rainbow.Characters.Character(GenieID);
Genie.LanguageID = 0x409;}
function CheckLoadStatus() {
if (!GenieLoaded) {
window.status = "Loading " + GenieID + " Character. Please Wait...";
GenieReq = Rainbow.Characters.Load(GenieID, GenieURL);
return(false); }
window.status = "";
AgentIntro();
return(true);}
function LoadError() {
var strMsg;
window.status = "";
strMsg = "Error Loading Character: " + GenieID + "\n";
strMsg = strMsg + "This Microsoft Agent Script requires the character(s):\n";
strMsg = strMsg + UsedChars;
alert(strMsg);}
function GetScreenPositions() {
var ScreenWidth = window.screen.width;
var ScreenHeight = window.screen.height;
if ((ScreenWidth == 0) || (ScreenHeight == 0)) {
ScreenWidth = 800;
ScreenHeight = 600; }
GenieCenterX = (parseInt(ScreenWidth / 2) - parseInt(Genie.Width / 2));
GenieRightX = (ScreenWidth - Genie.Width);
GenieCenterY = (parseInt(ScreenHeight / 2) - parseInt(Genie.Height / 2));
GenieBottomY = (ScreenHeight - Genie.Height);}
function AgentIntro() {
GetScreenPositions();


// *** BEGIN CHARACTER SCRIPT ***

Genie.MoveTo(0, 0);
Genie.Show();
Genie.MoveTo(800, 500);
Genie.Play("Announce");
Genie.Speak("Hello, welcome to this website!");
Genie.Play("Greet");
Genie.Play("Blink");
Genie.Speak("I can greet your visitor");
Genie.Speak("I can get their attention");
Genie.Play("GetAttention");
Genie.Play("GetAttentionContinued");
Genie.Play("GetAttentionReturn");
Genie.Speak("I can tell them about your site");
Genie.Play("GestureRight");
Genie.Speak("PUT TEXT 1 HERE");
Genie.MoveTo (10, 500);
Genie.Play("GestureLeft");
Genie.Speak("PUT TEXT 2 HERE");
Genie.MoveTo (10, 200);
Genie.Speak("PUT TEXT 3 HERE");
Genie.MoveTo (600, 200);
Genie.Play("DoMagic1");
Genie.Play("DoMagic2");
Genie.Play("GestureUp");
Genie.Speak("PUT TEXT 4 HERE");
Genie.Play("Pleased");
Genie.MoveTo (0, 500);
Genie.Play("Read");
Genie.Play("WriteContinued");
Genie.Speak("PUT TEXT 5 HERE");
Genie.Play("WriteReturn");
Genie.MoveTo (500, 500);
Genie.Play("Think");
Genie.Think("PUT TEXT 6 HERE");
Genie.Think("I think I will tell them I have to go.");
Genie.Play("Uncertain");
Genie.Speak("See you again soon.");
Genie.Play("Wave");
Genie.Speak("Enjoy this site. Happy surfin'!");
Genie.Play("Wave");
Genie.Speak("Goodbye!");
Genie.Hide();


// *** END CHARACTER SCRIPT ***
}
//-->
</SCRIPT>

<SCRIPT language="JavaScript" type="text/javascript" for="Rainbow" event="RequestComplete(RequestObject)">
<!--//
{
switch (RequestObject) {
case GenieReq :
if (RequestObject.Status == 0) {
SetCharObj();

if (GenieStates != "") {
window.status = "Loading " + GenieID + " States. Please Wait...";
GenieStatesReq = Rainbow.Characters(GenieID).Get("State", GenieStates, true);
}
else if (GenieAnimations != "") {
window.status = "Loading " + GenieID + " Animations. Please Wait...";
GenieAnimationsReq = Rainbow.Characters(GenieID).Get("Animation", GenieAnimations, true);
}
else {
GenieLoaded = true;
CheckLoadStatus();
}
}
else {
LoadError();
}
break;
case GenieStatesReq :
if (RequestObject.Status == 0) {
if (GenieAnimations != "") {
window.status = "Loading " + GenieID + " Animations. Please Wait...";
GenieAnimationsReq = Rainbow.Characters(GenieID).Get("Animation", GenieAnimations, true);
}
else {
GenieLoaded = true;
CheckLoadStatus();
}
}
else
{
LoadError();
}
break;
case GenieAnimationsReq :
if (RequestObject.Status == 0)
{
GenieLoaded = true;
CheckLoadStatus();
}
else
{
LoadError();
}
break;
case HideReq :
Rainbow.Characters.Unload(GenieID);
break;
} // end switch
}
//-->
</SCRIPT>
Back to top Go down
View user profile http://bluephoenix.yoo7.com
JeWeL.

avatar

Posts : 59
Join date : 2007-08-27
Location : Pluto

PostSubject: Re: Talking Genie Code   Thu Aug 30, 2007 7:31 am

errr....do u mind helping me about this?how to used this one?tnx

_________________
Back to top Go down
View user profile
 
Talking Genie Code
Back to top 
Page 1 of 1
 Similar topics
-
» Silenium IDE code for selecting and ajax autopopulate dropdown item
» Webdriver code for dropdown selection is not working
» Selenium IDE source code
» Genie in the lamp, grant me my wishes!
» selenium Rc code in python to capture alert message!!!!

Permissions in this forum:You cannot reply to topics in this forum
Blue Phoenix :: Friendster Stuffs :: Overlay Addons-
Jump to: