Got something to write about? Check out our Article Builder.

View \Module1.bas

USING MERLIN IN VB APPLICATION OR IN HELP FILE 1.0

Submitted By: suddha86
Rating: starstarstarstarstar (Rate It)


Attribute VB_Name = "Module1"
OPTION Explicit
Public my_agent AS AgentObjects.Agent
Public my_chragent AS AgentObjects.IAgentCtlCharacter
Public SUB loadagent()
Set my_agent = New AgentObjects.Agent
my_agent.Connected = True
my_agent.Characters.Load CharacterID:="Merlin", loadkey:="Merlin.acs"
Set my_chragent = my_agent.Characters(CharacterID:="Merlin")
my_chragent.Height = 400
my_chragent.WIDTH = 400
my_chragent.Balloon.FontSize = 18
my_chragent.Balloon.FontName = "MICRON56"
'If my_chragent.Speak("BYE") Then
'unloadagent
'End If
END SUB
 Public SUB introagent()
 
 With my_chragent
 .Show
 .MoveTo x:=100, y:=500
 .MoveTo x:=500, y:=100
 .MoveTo x:=100, y:=500
 .PLAY animation:="Greet"
 .PLAY animation:="PLEASED"
 .Speak ("Hello, My Name is Merlin,i am here because i am invited by SUMAN")
 .PLAY animation:="Restpose"
 .PLAY animation:="ANNOUNCE"
 .PLAY animation:="SUGGEST"
 .Speak ("Here is some MAGIC **********")
 .PLAY animation:="DOMAGIC1"
 .PLAY animation:="DOMAGIC2"
 .PLAY animation:="WRITE"
 .PLAY animation:="Read"
 .PLAY animation:="hide"
 .Speak ("U CAN USE ME IN ANY HELP FILE")
 .Speak ("PLEASE RATE MY CREATOR BY RATIMG HIM")
 .Speak ("AFTER SOME DAY I WILL APPEAR WITH A DIFFERENT LOOK")
 .Speak ("UNTILL GOODBYE")
 .Hide
 
 'unloadagent
'If .Speak("BYE") Then
'unloadagent
'End If
 END With
' If my_chragent.Speak("BYE") Then
'unloadagent
'Exit Sub
'End If
 END SUB
Public SUB unloadagent()
my_agent.Characters.Unload "Merlin"
Set my_agent = Nothing
Set my_chragent = Nothing
END SUB
 
corner
© 1996-2008. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Publisher: Lars Hagelin.
bootstrapLabs Logo A bootstrapLabs project.