A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Animated button problem

  1. #1
    Junior Member
    Join Date
    Aug 2003
    Location
    caerphilly
    Posts
    10

    Animated button problem

    Hi could you please help me on my buttons.

    Ive got my menu of animated buttons but if you roll over them all in a row (this might take a couple of times) they stick on the first animated state. Could someone have a look for me and see what I need to do.

    Thanks
    Attached Files Attached Files

  2. #2
    Denied ACCESSORIES
    Join Date
    Dec 2000
    Location
    Rio de Janeiro
    Posts
    208

    Re: Animated button problem

    Originally posted by n_s_brown
    Hi could you please help me on my buttons.

    Ive got my menu of animated buttons but if you roll over them all in a row (this might take a couple of times) they stick on the first animated state. Could someone have a look for me and see what I need to do.

    Thanks
    your main problem is that all your buttons except the first one Bio are inside another MC which has a never ending frame loop you need to fix that first other than that here are a few pointers to clean it up:


    get rid of all the buttons and their actions(like on release) in each of the buttons get rid of all frame actions too.



    now on root give each of the MC's an instance name like m1,m2,m3,m4

    then in the frame write the following function:
    code:
    function onover(num){
    _root[num].gotoAndPlay(2);
    }
    function onout(num){
    _root[num].gotoAndPlay(15);
    }
    m1.onRollOver = function(){
    onover(this._name);
    }

    m1.onRollOut = function(){
    onout(this._name);
    }
    m2.onRollOver = function(){
    onover(this._name);
    }

    m2.onRollOut = function(){
    onout(this._name);
    }



    repeat for the rest of the buttons m3,m4

    then in each of your buttons totally delete the first layer which has your current invisible button, now you will need to make sure you have stop(); on frames 1, 14
    and on frame 24 or so you will need to put in this.gotoAndStop(1);

    this should make it a lot easier to work with since all your code will be in one place.
    ..,,;:'""':;,,..ASTRO

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center