A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: controling multiple MC intances

  1. #1
    Member
    Join Date
    Dec 2000
    Posts
    55

    controling multiple MC intances

    Hi all....

    I have a movie clip with "ball1" and "ball2" by name, now I want to stop both with one button and script on button goes like this
    on(press){
    for(i=1; i<4; i++)
    _root(["ball" + "i"])
    gotoAndStop(_currentframe)
    }

    but it is not working, any suggestions

    thanks for reply.

  2. #2
    Senior Member
    Join Date
    Aug 2001
    Location
    Karachi - Pakistan
    Posts
    421
    the eaiest way., on button.,

    on (release) {
    setProperty("ball1", _visible, "0");
    setProperty("ball2", _visible, "0");
    }

  3. #3
    Member
    Join Date
    Dec 2000
    Posts
    55
    I need both clips visible and stop at that perticular position.

  4. #4
    Senior Member
    Join Date
    Aug 2001
    Location
    Karachi - Pakistan
    Posts
    421
    download this fla.,

  5. #5
    Member
    Join Date
    Dec 2000
    Posts
    55
    Thanks for your replay, but that is not what Iam looking for, iam sending .FLA please suggest the code.

    thanks
    Nau
    Attached Files Attached Files

  6. #6
    FK Supermodel laxmi19885's Avatar
    Join Date
    Jul 2001
    Location
    Mumbai
    Posts
    474
    on(press){
    for(i=1; i<4; i++)
    _root["ball" + i].gotoAndStop(_root["ball" + i]._currentframe);
    //or
    _root["ball" + i].stop();

    }
    Last edited by laxmi19885; 08-04-2003 at 05:43 AM.

  7. #7
    Member
    Join Date
    Dec 2000
    Posts
    55
    Thanks lakshmi...

    But it is stoping root of MC in one perticular frame, not according to the instance frame.Any idea.

    thanks
    Nau

  8. #8
    FK Supermodel laxmi19885's Avatar
    Join Date
    Jul 2001
    Location
    Mumbai
    Posts
    474
    what means root of mc

    _root["ball" +i]....means path of mc not root of mc..

    u can use _root or path of that mc..

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