A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: duplication level

Threaded View

  1. #1
    Sinner
    Join Date
    Jan 2001
    Location
    Preston
    Posts
    89

    duplication level

    Hi everyone,
    ok im having some trouble with a movie that im making.Ok i have a global variable called"N" set to 70.
    i have a movie clip on the main stage called "Ninja" and on this ninja movie clip i have the following code:
    code:
     onClipEvent (enterFrame) {
    if(this.hitTest(_root["mc"+90])){
    this.gotoAndStop(75);
    _root["mc"+90].gotoAndStop(21);
    if (N>=70 && N<=89) {
    duplicateMovieClip(_root.Ninja, "NMC"+N, N);
    N++;
    }else {N = 70;}
    }
    }


    so i want every time the movie clip is hit to duplicate its self between the levels 70 - 89 so there will never be more than 19 instances on screen. i know the hit part works because it is sending the ninja movie to frame 75 as stated. However it is duplicating the movie always to layer 70 and not incrementing thus deleting the original movie on layer 70 so there is only one instance appearing at a time.

    also when debugging i get the following results:
    Movie Clip: Frame=10 Target="_level0.NMC70.instance33"
    Movie Clip: Frame=10 Target="_level0.NMC70.instance34"
    so its copying the instance but not assigning a new level

    any help would be absolutly great as i havent got much hair left on my poor balding head.

    P.S. using MX
    Last edited by Overfiend; 06-10-2004 at 06:58 PM.
    Ž„‚É‚Í‚¨Žð‚ðˆù‚ވȊO‚ÉŠy‚µ‚Ý‚Å‚·B(My only pleasure in life is drinking)

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