Forum Moderators: open

Message Too Old, No Replies

Rollover Flash Links

Mouseover activates flash and lets you click it as a link

         

rahmuss

11:43 pm on Oct 2, 2003 (gmt 0)

10+ Year Member



The Meta tells it all. I've searched the site; but haven't found an article on this. I have seen many pages that activate flash animation on mouseover, and then they can click the image to go to a link. I've tried a few different ways; but still no go. Any thoughts?

garann

8:23 pm on Oct 6, 2003 (gmt 0)

10+ Year Member



Assuming I understand what you want, this is what I'd do. These instructions should produce one static frame that when moused over plays an animation that allows you to click and be taken to another page.

1. Create your initial static Flash in Frame 1, and the animation that will happen when the user mouses over it in Frames 2 - whatever.
2. In the Action panel for the first and last frames, add stop();
3. Create a new layer. Draw a box the same size as the movie.
4. Right-click the box and choose Convert to Symbol. Select Button for the type.
5. In the Properties panel, change Color to Alpha and choose 0% from the other drop-down.
6. In your new layer, create a keyframe at Frame 2.
7. In the Action panel for your button in Frame 1, insert your rollover action:

on (rollOver) {
gotoAndPlay(2);
}

8. In the Action panel for your button in Frame 2, insert something like this:
on (release) {
getURL("example.html");
}

HTH,
g.

rahmuss

4:37 pm on Oct 9, 2003 (gmt 0)

10+ Year Member



Thanks for the help. It looks like it's working a little; but the actions I assign the the first keyframe for the transparent layer only show up in the Movie Explorer. And the little "a" above the keyframe isn't there. I can get the "a" to be there for the second keyframe and the last keyframe; but not the first. And in the Movie Explorer it doesn't show the actions for the second and last frame. And it won't let me choose "on()" in the second or last keyframes. So when I export it and test it in Dreamweaver out nothing shows up, it just tries to load the page forever. Another funny thing is that when I play it in Windows Media Player it just sits there at the first frame until I move the mouse over it and then it opens a page immediately (since I temporarily put a getURL on the last keyframe).

It's just a short clip that I want to play on mouseover and then let them click the the flash as a link. I just can't seem to figure it out. Who thought it would have been so hard. Oh well.

garann

5:07 pm on Oct 9, 2003 (gmt 0)

10+ Year Member



Sorry, I'm not very good at saying things clearly. :(

You're not going to be able to apply the on(...) events to a keyframe. That's why you have the transparent button the size of the movie - to mimic the behavior of a keyframe receiving a mouse event. Also, I don't think you'll see small a's in the frames where you apply the mouse events, since the Actions are for the button and not the keyframe itself.

So, to summarize (more clearly, we hope..):
You need to apply the stop() Actions to the first and last keyframes. That should give you small a's on each. You need to apply your mouse events, on(...) {...}, to a transparent button.

rahmuss

4:24 pm on Oct 10, 2003 (gmt 0)

10+ Year Member



Ok... here we go again...

1. Create your initial static Flash in Frame 1, and the animation that will happen when the user mouses over it in Frames 2 - whatever.
-----[ This one seems easy enough ]-----
2. In the Action panel for the first and last frames, add stop();
-----[ I applied the stop(); to first and last frames of the animation layer ]-----
3. Create a new layer. Draw a box the same size as the movie.
-----[ I called the new layer "Button" and made it as big as the movie ]-----
4. Right-click the box and choose Convert to Symbol. Select Button for the type.
-----[ When I right-click it doesn't give that option; but I convert it to symbol using the menu above and choose "button" as the type ]-----
5. In the Properties panel, change Color to Alpha and choose 0% from the other drop-down.
-----[ I changed the alpha for the button to 0% ]-----
6. In your new layer, create a keyframe at Frame 2.
-----[ "new layer" meaning the button layer? I thought you didn't want keyframes because in the next post you said that I was "not going to be able to apply the on(...) events to a keyframe." ]-----
7. In the Action panel for your button in Frame 1, insert your rollover action:
on (rollOver) {
gotoAndPlay(2);
}
-----[ I can accomplish this... sometimes ]-----

8. In the Action panel for your button in Frame 2, insert something like this:
on (release) {
getURL("example.html");
}
-----[ I can never get this to work, I can never even select frame 2 unless I put a keyframe there. ]-----

I've pretty much just given up for now; but if you have any feedback let me know. Thanks.

garann

5:27 pm on Oct 13, 2003 (gmt 0)

10+ Year Member




6. In your new layer, create a keyframe at Frame 2.
-----[ "new layer" meaning the button layer? I thought you didn't want keyframes because in the next post you said that I was "not going to be able to apply the on(...) events to a keyframe." ]-----
...
8. In the Action panel for your button in Frame 2, insert something like this:
on (release) {
getURL("example.html");
}
-----[ I can never get this to work, I can never even select frame 2 unless I put a keyframe there. ]-----

Yep, "new layer" means the button layer. You do want to create a keyframe, otherwise the Action you applied to your button layer in Frame 1 will apply to all the frames of your animation. Putting a keyframe on the button layer at Frame 2 allows you to have a different Action (going to a URL, versus starting the animation) once the animation has started. You won't apply the on(...) event to this new keyframe - you'll apply it to the button in the keyframe.

Sorry for all the confusion..