answersLogoWhite

0

An event handler contains lingo or javascript code which is executed when a particular event fires. An event handler always begins with "on" followed by the event name, and terminates with a sigle "end" (optionnaly followed by the event name).

Here's an example : Intercept a mouse click on a Sprite, and display a message box :

on mouseUp
alert("Hello world")
end

Animations or parents scripts can contain handlers subjected to be called from anywhere in a projection.
Behaviors scripts contain only handlers concerning events fired to a particular sprite (in the example above, the handler should be located in a behavior script attached to the clicked sprite.

User Avatar

Wiki User

15y ago

What else can I help you with?

Continue Learning about Engineering

What is function in javascript?

A Function in JavaScript is a note to the program to group all of the actions performed in the Function clause to be referenced as the functions name, so that one does not need to copy out the function every time they want to run the group of actions.


What is the meaning of anonymous classes for events in java?

Anonymous classes, basically, have no name. It combines the class declaration and the creation of an instance of the class in one step. If an event handler is not shared by multiple components there is no need to declare a class to handle the event. The handler can be implemented with the use of an anonymous inner class. i.e. : button1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { JOptionPane.showMessageDialog(null, "You clicked button1."); } });


Code for javascript illustrate event driven programming?

Event-driven programming in JavaScript can be illustrated using an event listener for a button click. Here's a simple example: // Select the button element const button = document.getElementById('myButton'); // Define the event handler function function handleClick() { alert('Button was clicked!'); } // Attach the event listener to the button button.addEventListener('click', handleClick); In this code, when the button with the ID myButton is clicked, the handleClick function is triggered, demonstrating how events drive the flow of the program.


Can you use a Javascript event to hide an element but not if the mouse is moved over that element?

Yes. Set the element's display property to "none" (style="display:none;").Now add the event handler onmouseover and make it enable the display:onmouseover="this.style.display='block'"To hide the element when the mouse moves away, addonmouseout="this.style.display='none'".


In order to execute code before a form is displayed place the code in the form and?

In order to execute code before a form is displayed, place the code in the form's Load event handler. This event is triggered before the form is shown to the user, allowing you to initialize variables, set properties, or perform any necessary setup tasks. You can also use the Shown event if you need to execute code after the form is first rendered but before it becomes interactive.

Related Questions

When did John Henry Thompson invent Lingo?

Lingo is a programming language that is part of Macromedia Director. The first release of Macromedia Director was in 1993.


What is the new name of Macromedia Director?

The new name of Macromedia Director is now currently Adobe Director. It is a multimedia software that mainly creates animated sequences and it has an extra feature called Lingo, which is designed for scripting language and creating CD-ROM.


What is a shockwave animation?

Adobe Shockwave animation, made in Adobe Director. Originally Macromedia Shockwave and later Shockwave Flash (Flash was acquired by Macromedia from FutureWave Software).


What has the author Lee Swearingen written?

Lee Swearingen has written: 'Macromedia director design guide' -- subject(s): Director (Computer file), Multimedia systems


What are the advantages and disadvantages event handler to event properties?

what are the advantages and dis advantages of event handling in java


What person is assigned to an event to help manage an event during the investigation process?

Handler.


When did Macromedia end?

Macromedia ended in 2005.


When was Macromedia created?

Macromedia was created in 1992.


What has the author Tara Gray written?

Tara Gray has written: 'Essentials for design, Macromedia Director MX 2004 / Tara Gray' -- subject(s): Director (Computer file), Multimedia systems 'Exploring Corrections'


What has the author Andre Persidsky written?

Andre Persidsky has written: 'Director 5 for Macintosh' -- subject(s): Director (Computer file), Macintosh (Computer), Multimedia systems 'Director 7 for Macintosh and Windows' -- subject(s): Director (Computer file), Interactive multimedia, Multimedia systems, Multimedia, Macromedia director (computerprogramma) 'Director 5 for Windows'


An agent handler installation includes only which of the following?

Tomcat and Event Parser


Where can you get macromedia for free?

Adobe.com, download shockwave, it has macromedia in it.