Skip to main content
Participant
August 5, 2008
Question

Scripting Multiple Rollovers

  • August 5, 2008
  • 2 replies
  • 509 views
First off, I'm very new to ActionScript, so if you respond, please write slow and use small words.

I'm working on an interactive map showing insect habitat regions. The working version is here. As you will see, the actions are not very quick, and there is some clunkiness to the rolls (some miss if you move too fast, others freeze in place, etc.). I'm in the process of making the hotspots smaller on the theory that there is some overlap that is causing some of the issues, and I am redrawing three of the insects to avoid dead spots when the mouse rolls over them. But my main question in this thread has to do with the ActionScript coding.

I've set it up so that Frame 1 is like "home base" where the rollover event listeners reside. When a rollover is detected, a function sends the movie to a specific frame and then stops and listens for the mouse to exit the hotspot, which sends the movie back to Frame 1. The net result of this is that on all the frames, there is simply one event listener, but on Frame 1, there are 20 event listeners and 20 functions. I'm wondering if there is a way to combine event listeners and functions in a way that would speed up the movie.

Any thoughts?

Here is the code for Frame 1:


This topic has been closed for replies.

2 replies

kglad
Community Expert
Community Expert
August 5, 2008
you're welcome.
kglad
Community Expert
Community Expert
August 5, 2008
you could write that more succinctly but that won't improve performance.
sigmadogAuthor
Participant
August 5, 2008
Thank you.

That answers my question. I'll pursue the adjustment of hotspots and insect artwork and see if that helps eliminate the problems.