dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: removeChild(mc1) but using mc[another Number variable]

  1. #1
    Senior Member
    Join Date
    Jul 2002
    Location
    Argentina
    Posts
    130

    removeChild(mc1) but using mc[another Number variable]

    Let's say i want to removeChild a movie clip instanced name: mcLife3

    But instead of doing the correct:

    Code:
    removeChild(mcLife3);
    I need to use another Number variable called bonusLife which in this case = 3

    Code:
    removeChild(mcLife[bonusLife]);
    Doesnt work...can anyone please let me know the correct syntax,

    Thanx in advance!!
    Cheers!

  2. #2
    Senior Member
    Join Date
    Jul 2002
    Location
    Argentina
    Posts
    130
    Isnt there an easy way to do it just like it was on AS 2...
    referencing a mc with a Number variable inside:
    Code:
    _root["mcLife"+bonusLife]

  3. #3
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    In answer to your question:

    PHP Code:
    var 3;
    removeChildgetChildByName('mcLife' i) ); 
    Now go read how to set it up the right way: http://www.calypso88.com/?p=302

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