A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: this._name ???

  1. #1
    Member
    Join Date
    Mar 2001
    Posts
    77
    I want a MC to execute a set of actions depending on his actual name, this is to check his name and to test the actionscript. but it doesn't work. can you please tell me whats wrong?

    onClipEvent (enterFrame) {

    // if the name is movie...

    if (this._name == movie) {

    // then play
    movie.play();

    // if not...

    } else {
    hello.gotoAndPlay(10);
    }
    }

  2. #2
    Senior Member
    Join Date
    Nov 2001
    Posts
    667
    Is movie a variable? If not change it to:

    onClipEvent (enterFrame) {
    if (this._name == "movie") {
    movie.play();
    } else {
    hello.gotoAndPlay(10);
    }
    }

    Although it should work just fine as:

    onClipEvent (enterFrame) {
    if (_name == "movie") {
    play();
    } else {
    hello.gotoAndPlay(10);
    }
    }

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