Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Calling a movieclip outside a movieClip.

Explorer ,
Dec 29, 2012 Dec 29, 2012

I have this movieClip in the main timeline that I want to control while I am inside a certain movieClip. Is this possible?

TOPICS
ActionScript
674
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Dec 30, 2012 Dec 30, 2012

Yes.  There are a couple of ways it can be done.  The least challenging would probably be to target the main timeline object using:  MovieClip(root).objectName

If that is not clear and you can provide some idea of the kind of control you wish to impose, it might be easier to provide an example using this approach.

An alternative approach is to have the main timeline have an event listener assigned to the secondary object and to just have that secondary object dispatch an event for that listener. 

...
Translate
LEGEND ,
Dec 30, 2012 Dec 30, 2012

Yes.  There are a couple of ways it can be done.  The least challenging would probably be to target the main timeline object using:  MovieClip(root).objectName

If that is not clear and you can provide some idea of the kind of control you wish to impose, it might be easier to provide an example using this approach.

An alternative approach is to have the main timeline have an event listener assigned to the secondary object and to just have that secondary object dispatch an event for that listener.  The event handler function for that listener would also be in the main timeline, so targeting the main timeline object would just require using its instance name.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 30, 2012 Dec 30, 2012

MovieClip(root).objectName works for me. Thank you very much!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 30, 2012 Dec 30, 2012
LATEST

You're welcome

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines