dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [F8] DuplicateMovieClip while createEmptyMovieClip?

Threaded View

  1. #1
    Junior Member
    Join Date
    Jul 2007
    Posts
    7

    [F8] DuplicateMovieClip while createEmptyMovieClip?

    HELP!?

    i am creating an empty MC with the following code..

    this.createEmptyMovieClip("main_mc",getNextHighest Depth());
    main_mc.createEmptyMovieClip("layout_mc",getNextHi ghestDepth());
    main_mc.layout_mc.loadMovie("beam.swf");
    main_mc.layout_mc._x = 200;
    main_mc.layout_mc._y = 200;

    Then i would like to duplicate the beam.swf file with a duplicatiemovie script..

    wich is this one..

    onClipEvent (enterFrame) {
    // initialize variable at 0
    i = 0;
    do {
    // make copies of the movie clip
    duplicateMovieClip (_root.main_mc.layout_mc, "layout_mc" + i, i);

    // rotate the copies i degrees
    setProperty (eval("_root.main_mc.layout_mc" + i), _rotation, i);
    // increment the counter by 15
    i = i+15;
    // check the condition
    } while (i<1439);
    // make the original movie clip invisible
    main_mc.layout_mc._visible = 0;
    }


    The both scripts work seperate.
    But mixing them doesn't seem to work.
    Does anyone know how to combine these two scripts?

    Or does duplicateMovieClip just duplicate the empty clip, without its contents?
    Last edited by raoul petrus; 07-30-2007 at 07:26 PM. Reason: forgot my version

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