PDA

View Full Version : random keyframe onMOuseover [FMX]



DDD
May 11th, 2003, 11:07 PM
Hello All

Before I ask let me explain the swf....Basically I have a logo (mc) on the first keyframe. Then I have like four more keyframes each containing a different movieclip with that some logo with different animations.

Now what I want to accomplish is...onMouseover I want to randomly jump to any of the keyframes containing the animations. To give the effect of a random animations on the mouseOver event.

Is there anyone out there who can help me?? I have been pondering this for quite sometime. Any help appreciated.

senocular
May 11th, 2003, 11:10 PM
- make a new layer above the logos
- make a new shape the size of those logos in that layer
- convert that shape into a button
- drag the shape within that button to be only within the HIT frame so you get an invisible button
- then assign a rollover function for that button that says something like



myInvisButton = function(){
gotoAndStop(random(5)+1)
}

where 5 would be the number of animations you have and 1 is the starting frame (if the first one is on frame 1, then 1 is ok).

DDD
May 12th, 2003, 01:01 AM
hey thanks sen....but I could not get it to work...Although I understand the concept (i think) you think you could post a .fla??

DDD
May 12th, 2003, 09:51 AM
:( bump

DDD
May 13th, 2003, 10:31 AM
bump again....poor me