A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: AS3 help: Moving a component into a movie clip [renamed]

  1. #1
    Member
    Join Date
    Jul 2008
    Posts
    40

    AS3 help: Moving a component into a movie clip [renamed]

    Hello All,

    I am using Flash CS4, AS3.

    I have a movieclip "MC1" and a Component "B1" from the 'Component Library' on my main stage. From code inside of MC1, I would like to create an empty movieclip "MC2". Then, still from code inside of MC1, move(cut and paste-like) B1 into MC2. I have failed in my attempts thus far... Any help would be great! If this is impossible, please let me know.

    Thanks in advance!
    -Jake

  2. #2
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    PHP Code:
    var MC2:MovieClip = new MovieClip();
    MC2.name "MC2";

    parent.addChild(MC2);
    MC2.addChild(B1); 
    Please use [php] or [code] tags, and mark your threads resolved 8)

  3. #3
    Member
    Join Date
    Jul 2008
    Posts
    40
    Thanks for the response,

    I am now unable to call MC2 from within MC1.
    I get an error:
    TypeError: Error #1010: A term is undefined and has no properties.
    at CustomLibrary2_fla::ZoomComponent_3/getStills()[CustomLibrary2_fla.ZoomComponent_3::frame1:229]

    I can't seem to find what I doing wrong?

    Thanks,
    Jake

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