A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Call function from another movieclip

  1. #1
    Junior Member
    Join Date
    Oct 2005
    Posts
    19

    Call function from another movieclip

    Structure:

    Scene 1 -> movieclip1
    -> movieclip2

    I have a function in movieclip1 that I want to call from movieclip2...

    _parent, this!!!! I dunno.

  2. #2
    Iron Chef In-Training OpethRockr55's Avatar
    Join Date
    Sep 2005
    Location
    Kitchen Stadium
    Posts
    313
    Is movieclip2 inside movieclip1?

  3. #3
    Junior Member
    Join Date
    Oct 2005
    Posts
    19
    No they are seperate off scene1

  4. #4
    Iron Chef In-Training OpethRockr55's Avatar
    Join Date
    Sep 2005
    Location
    Kitchen Stadium
    Posts
    313
    Then it should be either:
    code:
    movieclip2.functionname();
    //or
    _parent.movieclip2.functionname();
    //or
    _root.movieclip2.functionname();



    Depends on where you call the function from.

  5. #5
    Junior Member
    Join Date
    Oct 2005
    Posts
    19
    _root.movieclip2.functionname(); was the one, Thanks.

    p.s. as a metalhead you may be interested in my friends little project:

    http://www.hmxtreme.com

  6. #6
    Iron Chef In-Training OpethRockr55's Avatar
    Join Date
    Sep 2005
    Location
    Kitchen Stadium
    Posts
    313
    YAY! Thanks for the link! Glad I could help, too.

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