dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: quick Q

  1. #1
    Senior Member
    Join Date
    Oct 2003
    Posts
    901

    quick Q

    OK, im experimenting with [this._xscale+...etc] to move and resize my MC.

    Now how do i make MC disappear/fade out at certain scale or position, then make another MC appear?



    basically i have this on my 1st MC

    onClipEvent (enterFrame) {
    this._y = _y += 0.2;
    this._x = _x += 0.2;
    this._yscale += 0.2;
    this._xscale += 0.2;
    }

    thanks a lot

    im on F5 by the way

  2. #2
    Senior Member xaero182's Avatar
    Join Date
    Sep 2002
    Posts
    159
    hey,

    u can use this script:

    onClipEvent (enterFrame) {
    this._y += (0.2-this._y)/5;
    this._x += (0.2-this._x)/5;
    this._yscale += (0.2-this._yscale)/5;
    this._xscale += (0.2-this._xscale)/5;
    this._alpha += (0-this.alpha)/5
    }

    "this." isn't necessary
    now your mc wil dynamically resize and move to a position
    the _alpha will also be set to 0 after a while

    i hope this is what you mean

    when does the other movieclip has to do this? and what does it have to do?

    Hope I helped you...


    greetz,

    Xaero



  3. #3
    Senior Member
    Join Date
    Oct 2003
    Posts
    901
    thanks but just not quite (your code makes it shrinks down to zero).

    what i meant was, for example, when MC shrinks to 50% of its size (or move to certain position on the screen) it starts to fade out and ultimately, at 30% of its alpha, removes itself from screen.

    Ive tried something like :


    onClipEvent (enterFrame) {

    if (this._xscale=100, this._yscale=100, this._alpha=30) {

    this.removeMovieClip();
    }
    }
    //obviously didn't work..ha ha. but you get the idea.


    OK, that was the first problem, the 2nd problem is when this MC removes itself. I want another MC to activate and start its action (move, resize,..whatever).


    So if any one have the right codes for my MCs...thanks so much!!

    (hope i didn't ask too much!)
    Last edited by Jujumon; 12-27-2003 at 03:13 AM.

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