Flash Help.

  • Started
  • Last post
  • 1 Response
  • erokcom

    I have something going on in the first frame of a movie. When it hits frame 2, I want everything going on in the first frame to go away or be false. Here is the script on the first frame:

    ........

    // set global constants
    centerx = 400;
    // screen center x
    centery = 300;
    // screen center y
    pval = 300;
    // strength of perspective
    c = 0;
    // counter to keep track of depths, etc
    //
    // create empty movieclip to control stuff
    this.createEmptyMovieClip("mc", 1);
    // make one instance to start with.
    newInst();
    // onEnterFrame code for controller that randomly creates bubbles
    mc.onEnterFrame = function() {
    // chance of 1 in 120 that new instance is created.
    if (Math.floor(15*Math.random()) == 0) {
    newInst();
    }
    // increase counter
    c++;
    };
    // function to create new instance and attach event scripts
    function newInst() {
    this.attachMovie("bubble", "b"+c, c+10);
    this["b"+c].onLoad = function() {
    // hide the bubble for now
    this._visible = false;
    // set initial values
    this.bx = 300*Math.random()-150;
    // base x coord for sine
    this.y = 400;
    // initial y coord
    this.bz = 300*Math.random()-150;
    // base z coord for sine
    this.cnt = 5000*(2*Math.PI)*Math.random();
    // randomize counter for sine
    this.wl = 8;
    // wavelength for sine calculations
    this.amp = 120;
    // amplitude for sine wave
    this.ysp = -3;
    // speed y direction (minus for upward motion)
    };
    // start the onLoad script manually
    this["b"+c].onLoad();
    // the onEnterFrame code moves the bubble
    this["b"+c].onEnterFrame = function() {
    // change the x,y,z coords
    this.x = this.bx+(this.amp*Math.sin(this...
    this.y += this.ysp;
    this.z = this.bz+((this.amp/2)*Math.sin(t...
    // increase counter on which sin and cosine are based
    this.cnt += 0.05;
    // call the function that applies 3d effects to this bubble
    m3d(this, this.x, this.y, this.z);
    // check whether this instance is off screen, if so delete it
    if (this._y

  • erokcom0

    Also. I have tried making that clip false on frame 2. It does not seem to work.