Welcome to Our Community

Wanting to join the rest of our members? Feel free to sign up today.

Sign Up

Flash problem

Discussion in 'Web Design Forum' started by Ian Oliver, Apr 19, 2008.

  1. Ian Oliver

    Ian Oliver New Member

    Hi

    I want to create glowing buttons as a rollover effect in Flash. So, I have created a button and embedded a movie clip which handles the glow effect.

    I have added actionscript to the button keyframe like this:

    button.onPress = function() {
    getURL("links.html");

    }

    This didn't work.

    So I've tried adding this code to the movie clip:

    movie.onPress = function() {
    getURL("links.html");

    }

    This didn't work either.

    So I tried surrounding the div that holds the button in an a href anchor. Works fine in Firefox. Doesn't work in IE. I've set the a style to display:block, which only works on the outside edge of the button (in IE), but not on the inside.

    It's seems like the Flash movie is getting in the way.

    Can anyone offer any advice?

    Many thanks
    Ian
     
  2. administrator

    administrator Administrator Staff Member

    Been a while since I touched Flash, used to mess with it on version 2 and last had a fiddle with MX so I could be completely wrong!

    Firstly, when you say "rollover" do you mean you have an image up state and only show the flash on mouse rollover? Can you confirm that the whole button is flash though? If not then really you need to do the whole button (or if it is a horizontal or vertical list of buttons) then maybe the whole nav as one item?

    For buttons you need to make a layer above all of the image elements of the animation and make a shape the same size as the button and make it a button. This handles the URL for you. Using ActionScript for it seems a bit OTT but maybe things have changed a lot in the last version or two?

    My explanation not very good so have a look at this tutorial:
    Flash Tutorial - Button

    Good luck!
     
  3. Ian Oliver

    Ian Oliver New Member

    Flash buttons

    Hi

    No the images were created separately then imported to Flash. However, thanks for the advice, I hadn't considered using the paint tools in Flash for the button. I'll give that a try.

    Best
    Ian
     
  4. mblon

    mblon New Member

    Yep - the rollover effect in flash buttons is created simply by adding your rollover graphic to the 'over' frame in the button symbol.

    If you want a longer animated effect (such as a pulsing glow, for example) create a movie clip and simply 'nest' it inside the button's 'over' frame.

    That should work.

    You don't need to use action script to create rollover effects - just doubleclick your button symbol to get inside it and see its four frames (oh yes - and you'll need at least a solid colour graphic in the 'Hit' frame - the final one. Without this your button simply won't work at all.

    good luck!
     

Share This Page