Click to See Complete Forum and Search --> : Flash RollOver problems


dtm32236
04-16-2009, 11:10 AM
Hey guys,

Let me start by saying that I'm fairly new with flash, and don't know much about ActionScript... this should be fairly simple though.

I'm trying to put this banner together, and the idea is that when the user rolls over the banner, these 'bubbles' will pop up and they will act as links.

www (dot) foremostgroups (dot) com/dev/2007corporate/test.html

The issue that I'm having is when you hover over and then off of the bubbles, the fade-in transition restarts. I understand why this is, but can't figure out a good way to fix this... everything I've tried has failed for one reason or another.

I like to figure things out on my own, but I can't logically figure out how to make this work properly. I don't want anyone to do this for me, but I'd appreciate ideas on how to make this work.

My flash file is available here if you'd like to look at it:
www (dot) foremostgroups (dot) com/dev/2007corporate/homeBanner.fla

Thanks a lot for any help!
-Dan

Eye for Video
04-16-2009, 04:27 PM
Not sure how you have the bubbles controlled but it looks like some type of an onRollOver event on the banner triggers the bubbles? and your problem is that when the user rolls over the bubbles and then off the bubbles and back onto the banner, it’s being treated as a new onRollOver event, correct?
So how about something like this…
Label a section of frames something like this…
Up (one frame, frame 1)
Over (9 frames, frames 2-10)
Stopped (1 frame, frame 11)
Out (9 frames, frames 12-21)

Action in “Up”
stop();
banner_mc.onRollOver = function() {
gotoAndPlay("Over");
}Nothing happens until user rolls over banner_mc, then Flash jumps to frame labeled labeled “Over”

Action in “Over” contains the bubble links and displays bubbles fading in, this fade in continues on to frame 11 (but "Over" ends at frame 10) then hits stop action in frame labeled “Stopped”.
pp_btn.onRelease = function(){
getURL("devel_kirkland.html");
}
Or whatever links you have.. then
Put a new keyframe next to the last frame of “Over” (frame 11)
Name that frame “Stopped” with this action
stop();
banner_btn.onRollOut = function() {
gotoAndPlay("Out");
}
So by now the display has faded in the bubbles, and progressed to a new keyframe with a stop action with only one other function, the banner roll out function. There is no function in this frame to restart and fade in the bubbles again.
This goes in “Out”
no actions till last frame, then a new key frame (frame 21, no label) and put stop action there.
stop();
This section will fade out the bubbles then stop.
This is AS2 so you may have to adapt for AS3, but you get the idea of using a “Stopped” frame to freeze the action and only make the roll out function available.
Best wishes,
Eye for Video
www.cidigitalmedia.com

dtm32236
04-16-2009, 04:44 PM
Eye for Video - I knew you'd get to this. You've helped me out a bunch before, so thank you again. It's always appreciated.

it looks like some type of an onRollOver event on the banner triggers the bubbles? and your problem is that when the user rolls over the bubbles and then off the bubbles and back onto the banner, it’s being treated as a new onRollOver event, correct?
Exactly! I wish I couldn've explained it that simply.

Anyway, I don't have time now, but I'll try this out tomorrow and let you know how it worked out.

PS - I'm a LOT more comfortable with AS2, so I'm fine with this - no need to adapt to AS3.

Thanks again,
-Dan

dtm32236
04-16-2009, 05:00 PM
One quick question...

You have this in "Over":
stop();
banner_mc.onRollOver = function() {
gotoAndPlay("Over");
}

and this in "Stopped":
stop();
banner_btn.onRollOut = function() {
gotoAndPlay("Out");
}

Is this supposed to be two separate instances of the banner (a movie clip and one as a button)? Or was that just an error?
Again, I'm kind of a noob with Flash, so that may be a dumb question...

Thanks!

Eye for Video
04-16-2009, 06:05 PM
Well I was thinking it would work with one instance of the same mc. However, since I just did a quick adaptation from some old code I had, I didn't actually test it... more of getting the idea across. My code is somewhat different and uses an invisible button placed over the links with the "Out" action attached to that. Looks like I forgot to change the _btn to _mc... sorry 'bout that!
EfV

dtm32236
04-20-2009, 01:53 PM
Wow - this took me sooo long to figure out, but I finally got it to work after using your invisible button idea.

Thanks again for the help!