A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: HELP: My cranky swapDepths and rollOvers???

  1. #1
    Junior Member
    Join Date
    Jun 2008
    Posts
    6

    HELP: My cranky swapDepths and rollOvers???

    Dear Helpful

    Been banging away at this code, reading blogs n forums for the last 24h but to no avail... I'm extremely new and rusty to action script, and i guess, looking at most code solutions, that i'm simply missing a little fundamental knowledge in this department... Anyway... here's my problem:

    I'm running FLMXpro 2004. I've an interactive menu displaying 40 small photo thumbs tightly packed, which tween zoom and enlarge as you rollOver. I picked up a bit of code which did the job a treat and has exactly the feel i need... However when i edited the order of the thumbs, some zoom states are now obscured by thumbs on higher depths... I've now learnt that i can use swapDepths to always bring the rolledOver way to the front, which is great, but i'm having real trouble integrating swapDepths into my existing code or scene...

    Here's my rollOver / zoom code which is attached to each mc within its own actions timeline:

    stop();
    this.onEnterFrame = function(){
    if(rewind == true){
    prevFrame();
    }
    }
    this.onRollOver = function(){
    rewind = false;
    play();
    }
    this.onRollOut = function(){
    rewind = true;
    }
    this.onRelease = function(){
    getURL("/KP/index.html","_top");
    }

    /////////////////////////////////////////////////////////////////////////////////
    Here's my simple swapDepths code which works great by itself on test circles etc but not with the above code around:
    /////////////////////////////////////////////////////////////////////////////////

    on(rollOver)
    {
    this.swapDepths(1000);
    }

    So where am i going wrong... The common result i've been getting is that all my little thumbs start playing/zooming in and out etc like mad thumbs????

    Many thanks in advance.... Rubio

  2. #2
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    Moved to actionscript forum
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

  3. #3
    Junior Member
    Join Date
    Jun 2008
    Posts
    6
    Ooooops... sorry for putting in the wrong bit }:0)

    anyhow... its been fixed now and here's the fixed code for anyone interest:

    stop();
    this.onEnterFrame = function() {
    if (rewind == true) {
    prevFrame();
    }
    };
    this.onRollOver = function() {
    this.swapDepths(1000);
    rewind = false;
    play();
    };
    this.onRollOut = function() {
    rewind = true;
    };
    this.onRelease = function() {
    getURL("/KP/index.html", "_top");
    };

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