6. Incident Response
Like all OOPs, MSAgent also has corresponding event responses. Take a look at the following example. Try clicking the mouse (single/double-click) on the icon of the role or taskbar. You can also move the role to see how it reacts:
[Ctrl+A Select all Note:Introducing external Js requires refreshing the page before execution]
Do you feel that it is much more interactive? Let's take a look at the declaration method of event processing:
<Script Language="JavaScript" For="MSAgent_Object" Event="Event_Name()">
//code...
</Script>
Be familiar with JS programming, you should be familiar with this declaration method, that is, the declaration method of separate processing of an object and an event, but if it is an event processing declaration that should be MSAgent_Object.Event_Name = function() {//code...} is not allowed! (the only way to do this)
If it is a network call, what if the user is notified of the corresponding call progress?
[Ctrl+A Select all Note:Introducing external Js requires refreshing the page before execution]
Have you noticed the display of the status bar at the bottom of the window? Although the specific download progress cannot be obtained, at least the viewer can know why the character's actions will pause (this pause only occurs when a certain animation is called for the first time, and the animation will be cached after the call).
For more event descriptions, please refer to /library/en-us/msagent/paface_2xet.asp. However, not all events called by the browser support.