dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: controling functions and movieclips outside of the document class

  1. #1
    Member
    Join Date
    Nov 2005
    Posts
    75

    how do u do this....

    i have some problems:
    first i have a movieclip on the stage (with no export for AS3) with the name of "cir" and it has 2 frames, i can only cobtrol these frames from the document class but not any other class that i have made which is in the document class. how do i resove this?

    also in the document class i have apublic function which i need to recall from a class which is imported into the document class, how do i do this?
    Last edited by jazz090; 07-03-2008 at 08:47 PM.

  2. #2
    Will moderate for beer
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    6,801
    For the first problem, you need a reference to the instance you want to control in the class/instance you want to control it from. All this means is that you need a variable which has the "cir" movieClip as its value.

    The second problem is much the same. If the class you want to call the function from is a display child of the document class, you can do something like this in the code for that class:
    Code:
    MovieClip(parent).somePublicFunction();
    If it's not a display child, then it's the exact same problem as the first case.

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