A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Taking movieclip from library and giving it an instance name through code?

  1. #1
    Junior Member
    Join Date
    Oct 2011
    Posts
    20

    Taking movieclip from library and giving it an instance name through code?

    I am making a game where I reference "Player_mc" quite a lot. I have a bunch of full characters (movieclips) in the library that work as the player when put on the stage and referenced as "Player_mc". I need a code that can reference those characters (movieclips) in the library, and move them onto the stage and name them "Player_mc". Also I need a way of removing an existing "Player_mc" so that another character can be referenced and brought onto the stage as "Player_mc".

    Here is what I have:

    if (this.P1Character==(Whatever that character's number is)){

    Do what???

    }

  2. #2
    Senior Member x-death's Avatar
    Join Date
    Aug 2009
    Posts
    175
    theres an article which would benefit you greatly from reading.

    link: Click Here

  3. #3
    Junior Member
    Join Date
    Oct 2011
    Posts
    20
    And it did! Genius. Worked like a charm. Thanks

  4. #4
    Senior Member x-death's Avatar
    Join Date
    Aug 2009
    Posts
    175
    i'm glad i was able to help

    theres some really good and helpful articles there.

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