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

target movieclip for goto

Participant ,
Jun 03, 2013 Jun 03, 2013

hi , first i must say i google and search for my question and use many script and no success , so forgive me if i open a topic

i have a button in nested movie clips >    Root > Main > Menu > button

both movieclips have instance name , Main called main_mc and Menu Called menu_mc

i have another Nested movieclips in Main Timeline like this (  :

products > software >

and both of them have instance name

now what i want is :

just when click it on button timeline goes to Frame 1 of software !!

in other mean i want after click button timeline exit from 2 nested movieclips ( menu, button) go to root and enter products movieclip and then first frame of software

i try these and many other codes but no success


MovieClip(root).products_mc.software_mc.gotoAndStop(1);

MovieClip(parent.parent).products_mc.software_mc.gotoAndStop(1);

and some error like this showed up after click on button :

Error #1010: A term is undefined and has no properties.

Error #1009: Cannot access a property or method of a null object reference.

i really need this , is this possible to jump from some parent nested movieclips to other parent movieclips ?  or they must be in same parent movieclip !?

please help me , thanks

TOPICS
ActionScript
462
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

Community Expert , Jun 03, 2013 Jun 03, 2013

if this fails:

MovieClip(root).products_mc.software_mc.gotoAndStop(1);

you don't have a movieclip named products_mc on your root timeline and/or you don't have a movieclip named sofware_mc on products_mc timeline, when your code executes.

Translate
Community Expert ,
Jun 03, 2013 Jun 03, 2013

if this fails:

MovieClip(root).products_mc.software_mc.gotoAndStop(1);

you don't have a movieclip named products_mc on your root timeline and/or you don't have a movieclip named sofware_mc on products_mc timeline, when your code executes.

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
Participant ,
Jun 03, 2013 Jun 03, 2013

thanks so much kglad ...

i have my menu in frame 4 and the product moveclips is on frame 5

so i try to put this script first :

MovieClip(root).gotoAndStop (5);


and then put this :

MovieClip(root).products_mc.gotoAndStop(2);

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
Community Expert ,
Jun 03, 2013 Jun 03, 2013
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