Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple button animation problem

Status
Not open for further replies.

SurvivorTiger

Programmer
Jul 9, 2002
265
US
Hi everyone,

I'm new to Flash and I'm having lots of difficulties right now...I have a map of Florida which i converted to a button. Then I added a keyframe on the "Over" frame of the button and then converted the button into a movie. Then i motion tweened the movie so that the map enlarges from its small size to the image's actual size within 20 frames. I also added the stop command at the 20th frame so that after the map is enlarged it stays that way.

Now my problem is that I want the user to be able to move the mouse cursor around the enlarged map, but when i try to do this as soon as the mouse is not within the actual size of the button, the map shrinks back to its original size. How do I fix this problem?

My next question is: how do I specify unique locations within the button (Florida counties) to have different URL's?

Thanks

AIM: Survivertiger
 
well once you move outside the button you are into an onRollOut event....so map goes

better by far to have the map as an image or another swf and load that into an empty clip on RollOver

myButton.onRollOver = function(){
emptyClip.loadMovie("counties.swf");
)

if you make the map consist on a number of movieclips (one for each county) then you can add onRelease event for these clips (goto URL)

you could keep everything inside the button by increasing the hit area of the button but this will trigger the rollover event at probably inconvenient times
 
Alright, so now i have the small Florida map and the animated one as two separate movies. I also added this code to the small florida map which is converted into a button instance:
on (rollOver) {
florida_button.onRollOver = function() {
emtpyClip.loadMovie("test.swf");
};
}
But this code doesn't do anything. What's "emptyClip"? do i have to rename something to emptyClicp, please be more specific...sorry i'm a noob!!

Thanks

AIM: Survivertiger
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top