A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: problem in duplicatingMovieClip in action script2

  1. #1
    Registered User
    Join Date
    Apr 2011
    Posts
    10

    Arrow problem in duplicatingMovieClip in action script2

    I am creating a flash project for my exam. Actually I am new in flash and am using action script2.

    I am having a movieclip having instance name "a_mc" which is a rotating rectangle around 360degree. The action I have given for this "a_mc" is
    n=1
    while(n<5)
    {
    duplicateMovieClip("a_mc","a_mc"+n,2);
    setProperty("a_mc"+n,_rotation,random(360));
    setProperty("a_mc"+n,_alpha,(70));
    n++;
    }

    This is working.
    But I want to make another movieclip named as "b_mc" where there shall be duplicates of "a_mc" multiplied by 5 times but I am failing to do it.
    Can anyone please help me to sort out it.

    Thanks to all of you.
    Regards.

  2. #2
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    I guess I dont fully get what your asking..??

    but wouldnt the same code work?

    actionscript Code:
    e=1;
    while(e<5){
         duplicateMovieClip("a_mc","b_mc"+e,2);
         setProperty("b_mc"+e,_rotation,random(360));
         setProperty("b_mc"+e,_alpha,(70));
         e++;
    }

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