A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: [F8] someone tell me the problem here?!

  1. #1
    Junior Member
    Join Date
    Jul 2007
    Posts
    27

    [F8] someone tell me the problem here?!

    christt this is annoying.
    what's wrong with this:
    Code:
    onClipEvent (enterFrame) {
    	this._y -= 5;
    	this._x = Stage.width/2;
    	if (this.hitTest(_root.topwall._x, _root.topwall, true) == false) {
    		_root.player._alpha -= 4;
    	}
    }
    i want the instance player (movie clip) to lower by 4 if it hits the topwall movie clip.
    but all that happens is, the "player" fades away as it rises.
    :S:SS:S:

  2. #2
    Junior Member
    Join Date
    Apr 2007
    Posts
    23
    Well if you want to have the player's y position to move down, you don't need alpha
    Code:
    onClipEvent (enterFrame) {
         this._y -=5;
         this._x = Stage.width/2;
         if (this.hitTest(_root.topwall._x)) {
              this._y += 9;     //if this instance is the _root.player
         }
    }

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