A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: real dumb one here

  1. #1
    Member
    Join Date
    Jan 2003
    Location
    Illinois
    Posts
    36

    real dumb one here

    I use to use the var i=i+1 in flash 5 but now in MX it returns a NAN value. what am I doing wrong, im using this var to duplicate MC. "i" is the new name and depth. Ive been searching the MX board and cant find a solution.

    thanks
    dave

  2. #2
    Junior Member
    Join Date
    May 2004
    Location
    da burgh
    Posts
    6
    I'd be glad to help. Could you paste the code here?

    In this situation, I always use i+=1; without a problem.

    I learn as I go, so maybe I missed something, but what is "MC" and what do you mean that "i" is the new name AND depth? Isn't that variable just holding one value?

  3. #3
    Member
    Join Date
    Jan 2003
    Location
    Illinois
    Posts
    36
    Sorry for the vagness, I have a button that when pressed duplicates a movieclip (cir)
    code:

    on (press) {
    i = i+1;
    duplicateMovieClip ("cir", "cir"+i, i);
    _root["cir"+i]._x += 100;
    _root["cir"+i]._y += 0;
    }

  4. #4
    Member
    Join Date
    Jan 2003
    Location
    Illinois
    Posts
    36
    one more thing,
    each time the button is pressed a new instance of the MC "cir" is produced ie: cir1, cir2, cir3

    MC = movieclip

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