A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: poor man's tsunami effect

  1. #1
    file not found Captain_404's Avatar
    Join Date
    Apr 2006
    Posts
    457

    poor man's tsunami effect

    ok, not poor, man's...

    lazy person's maybe...

    Anyway, the other day I was piddling around in Flash trying to make tsunami effect w/o following lenthgy suggested tutorials, and I found a way that's is a bit glitchy, but still works.

    I was messing around with stuff for my home site just out of boredom, anyway, here it is

    BTW: mx 2004
    Attached Files Attached Files

  2. #2
    file not found Captain_404's Avatar
    Join Date
    Apr 2006
    Posts
    457
    code:

    on the mc whose size you want to change:

    onClipEvent (enterFrame) {
    xdist = this._parent._xmouse - this._x
    xdist2 = this._parent._xmouse - this._x
    if (this.hitTest (_root.moosboy)) {
    if (this._parent._xmouse < this._x) {
    this._yscale = 100 + xdist/2;
    this._xscale = 100 + xdist/2;
    } else if (this._parent._xmouse >= this._x) {
    this._yscale = 100 - xdist2/2;
    this._xscale = 100 - xdist2/2;
    }
    }
    }

    moosboy is an mc that follows the mouse which cover all the screen for the first second or so, then stop and decrease it's size to about W:164.8 H:doesn't matter as long as it can touch the mc's you want to change size.

    put this code on moosboy:

    onClipEvent (enterFrame) {
    this._x = this._parent._xmouse;
    }

    just make sure all of these mc's are on the same layer and it should work out.

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