A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Need help duplicating movie clip...

  1. #1
    Junior Member
    Join Date
    May 2000
    Posts
    7

    Question Need help duplicating movie clip...

    I have a movie clip that will move around the stage. it will consist of 10 frames. on the 10th frame it will duplicate a dot (instance name) movie and slowly create a path around the stage.

    Here is the code I have on the 10th frame of my moving movieclip (a bee)

    Code:
    i++;
    dot.duplicateMovieClip("dot"+i,i);
    eval("dot"+i)._y = theBee._y;
    eval("dot"+i)._x = theBee._x;
    Any ideas?

    Thanks

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    i suggest putting a limit to the duplication, or remove after a certain number of dups. It'll prevent the player from crashing at some point in the process.
    more info on duplicateMovieClip

    gparis

  3. #3
    Junior Member
    Join Date
    May 2000
    Posts
    7
    The dots have a clip event that fades them and then remove the mc once the alpha =1. so the path will disappear. and that should help with the player resources.

    my problem is this isn't even working at all...

  4. #4
    Junior Member
    Join Date
    May 2000
    Posts
    7
    ok i have the bee leaving a trail of dots but for some reason when i remove them the code leaves every eighth one.

    Code:
    onClipEvent (enterFrame) {
    	_root.gone=_root.i-20
    	_root.i++;
    	trace(_root.gone)
    	_root.dot.duplicateMovieClip("dot"+_root.i,_root.i);
    	_root["dot"+_root.i]._x = _root.theBee._x;
    	_root["dot"+_root.i]._y = _root.theBee._y;
    	removeMovieClip(_root["dot"+_root.gone]);
    }

Tags for this Thread

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