A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: [Stupid] Attaching or Duplicating MovieClips

  1. #1
    Member
    Join Date
    Dec 2003
    Posts
    36

    [Stupid] Attaching or Duplicating MovieClips

    I'm lost on this subject. If I wanted to create a movieclip that by pressing a button it's removed, which would be the best way of doing that? Would I attach or duplicate it to a certain area? And how can I specify exactly where on the screen I wanted it to be(i.e. x=120 y=115 etc.) Thanks for all your help.

  2. #2
    Registered User Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,488
    Use attachMovie to bring it on stage. To position it, open the mc and in the first lines, first frame of the actions layer, add this:

    this._x = 120;
    this._y = 115;

    When it loads, it positions at those coords on the main stage.

    To remove it, use button or frame code:

    mov1.removeMovieClip();

    mov1 being the instance name you give it in attachMovie.

  3. #3
    Member
    Join Date
    Dec 2003
    Posts
    36
    OK thanks alot, I'll go try it now.

  4. #4
    Member
    Join Date
    Dec 2003
    Posts
    36
    I put this in the my actions layer.
    attachMovie("Gates1");
    I think I set it up wrong though because the movieclip won't show up. Everything else works, except for that.

  5. #5
    Registered User Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,488
    Here, this explains it better and you can get the fla.

    http://www.flashbax.com/attachmovie.htm

  6. #6
    Member
    Join Date
    Dec 2003
    Posts
    36
    Alright thanks for your help.

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