|
-
Jan 27th, 2006, 07:08 PM
#1
Thread Starter
Lively Member
complete novice puzzled
hi I have just bought an animation to insert into an advert on ebay which turns out to be a bit of java script. the thing i am puzzled about is that ithas various commands that get an animation of merlin the wizard to do various things like wave blink etc but I cannot identify the guts of the program ie how it creates the animation etc. I presume it accesses some code elsewhere but this is puzzling as it was sent to me in an email and when i tried it out it seemed to work without accessing the net can anyone explain how it work As you can guess I have absolutly no knowllege on java sript at all
here is a extract form ther begining
<object id="wolfi" height="32" width="32"
classid="CLSID 45FD31B-5C6E-11D1-9EC1-00C04FD7081F">
></object>
<script language="JavaScript" type="text/javascript">
function LoadLocalAgent(CharID, CharACS) {
LoadReq = wolfi.Characters.Load(CharID, CharACS);
return(true);
}
function MoveMerlin(x,y)
{
var ScreenWidth = window.screen.width;
var ScreenHeight = window.screen.height;
if ((ScreenWidth == 0) || (ScreenHeight == 0)) {
ScreenWidth = 800;
ScreenHeight = 600;
}
var xpos = (parseInt(ScreenWidth / 100 * x) - parseInt(Merlin.Width / 2));;
var ypos = (parseInt(ScreenHeight / 100 * y) - parseInt(Merlin.Height / 2));
Merlin.MoveTo(xpos,ypos);
}
var MerlinID;
var MerlinACS;
wolfi.Connected = true;
MerlinLoaded = LoadLocalAgent(MerlinID, MerlinACS);
Merlin = wolfi.Characters.Character(MerlinID);
MoveMerlin (7,24)
Merlin.Show();
Merlin.Play("Surprised");
Merlin.Play("GetAttention");
Merlin.Play("GetAttentionContinued");
Merlin.Play("GetAttentionContinued");
Merlin.Play("GetAttentionReturn");
Merlin.Play("Blink");
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|