New to here, still amazed, but confused as well

Hi Folks!

I’ve spotted this great site only some days ago, learned a lot and started a new project from scratch. But: now i got a problem and i don’t know, what to do anymore.

I stumbled upon the tween class by Robert Penner and thereby can let my buttons jump with ease. And on FFiles I found a nice KDE Wipe effect that I want to use to fade my content in and out.

But as you might see, it does not work. It should fade two different text boxes in when clicking on the first two buttons. But apparently it does not - the fade starts in the upper left corner and nothing happens. The Wipe function i ised is this:

function wipe(sender, movietoplaywhendone) 
{
    trace(typeof(sender));
    trace(typeof(movietoplaywhendone));
    created=0;
    done=0;
    // Vars may be added here
    startdepth = 1;

  // speed of the wipe (1-8)
    speed = 6;
    

    // speed of the sizing
    scalespeed = 1000;

    // wipe direction
    mode = random(8)+1;

    // circle steps Square = 4 Pentagon = 5 Circle = about 15
    steps = 15;

    // circle radius
    radius = 30;

    // movieclips removed when this radius is reached
    removeradius = 3;

    // animation/transition delay (frames)
    tansdelay = 6;

    //******************************************
    _root.createEmptyMovieClip("wipeContainer", startdepth);
    _root.wipeContainer.createEmptyMovieClip("circle", startdepth+1);
    //******************************************
    //Draw the Circle
    //******************************************
    lx = Math.cos(0)*12;
    ly = Math.sin(0)*12;
    sender.setMask(_root.wipeContainer);
    _root.wipeContainer.circle.lineStyle(1, 0xFFFFFF, 100);
    _root.wipeContainer.circle.moveTo(lx, ly);
    _root.wipeContainer.circle.beginFill(0xFFFFFF, 100);
    for (s=1; s<steps+2; s++) 
  {
        lx = Math.cos((s/steps)*360*Math.PI/180)*radius;
        ly = Math.sin((s/steps)*360*Math.PI/180)*radius;
        _root.wipeContainer.circle.lineTo(lx, ly);
    }
    _root.wipeContainer.circle.endFill(0x000000, 100);
    _root.wipeContainer.circle._visible = false;
    _root.wipeContainer.circle._x = -1000;
    _root.wipeContainer.circle._y = -1000;
    //******************************************
    // Grid Creation
    //******************************************
    i = startdepth+2;

    //this is assuming the registration point is centered vert. and horiz.
    for (y=sender._y-sender._height/2; y<=(sender._y+sender._height/2)+radius; y += radius) {
        for (x=sender._x-sender._width/2; x<=(sender._x+sender._width/2)+radius; x += radius) {
            i++;
            wipeContainer.circle.duplicateMovieClip("o"+i, i);
            created++;
            o = wipeContainer["o"+i];
            o._x = x;
            o._y = y;
            //o._width = radius*2;
            //o._height = radius*2;
            o._visible = true;
            switch(mode){
                case 1: o.wait = x*y/2.5; break;
                case 2: o.wait = y*sender._height/2; break;
                case 3: o.wait = (-y+sender._height+24)*200; break;
                case 4: o.wait = (-x+sender._width+24)*150; break;
                case 5: o.wait = x*sender._height/2; break;
                case 6: o.wait = (-x+sender._width+24)*y/2; break;
                case 7: o.wait = (-y+sender._height+24)*x/2; break;
                case 8: o.wait = (-y+sender._height+24)*(-x+sender._width)/2; break;
                }
            //if
        }
        //end x for
    }
    //end y for
    enddepth = startdepth+2+i;
    //******************************************
    // Animation
    //******************************************
    f = 0;
    _root.onEnterFrame = function() {
            if (done<created) {
                for (i=startdepth+2; i<=enddepth; i++) {
                    obj = _root.wipeContainer["o"+i];
                    if (obj != undefined) {
                        if (f>obj.wait/(scalespeed*speed)) {
                            obj._width -= speed;
                            obj._height -= speed;
                        }
                        if (obj._height<=2 || obj._width<=2) {
                            obj.removeMovieClip();
                            done++;
                        }
                    }
                }
            } else {
                movietoplaywhendone.gotoAndPlay(1);
                sender.unloadMovie()
                _root.onEnterFrame = null;
            }
            f++;
    };
}

And I call it this way:

wipe(context_txt, context_txt2);

I thought that maybe you cannot use it on textboxes, so i created two movieclips context_txt(2) and put inside a colored background (grey and yellow) and ontop the textboxes.

Huh? What’s wrong with this?

Thanks a hell of a lot in advance :slight_smile:

arglbm! i found the error - i misspelled my movieclips; that was the problem. Now it’s working and therefore this thread closed. Anyway - thank’s for your sympathy ;)[U][/U]

Thanks for the kind words and welcome to the forums!