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

AS3 Problem..

Community Beginner ,
May 03, 2015 May 03, 2015

Hi,

I use to work at AS2.. so im New with CC and Flash AS3..

Im a designer.

I have 2 MovieClips, And one Button.

The button is inside one of the 2 MovieClips, and has to control also the other MC.

This is the Actionscript:

The Top AC work well and simple.. button that control the time line inside a MC.

Study_Butt.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_2);

function fl_ClickToGoToAndStopAtFrame_2(event:MouseEvent):void

{

  gotoAndStop(2);

}

The other AC: (In the same Keyframe & AC window - at the bottom).

I dont Understand were do i enter the "Adress" of the other MC..

This "Adress": Object(this.parent.parent).topMenu.Map_m

Study_Butt.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_1);

function fl_ClickToGoToAndStopAtFrame_1(event:MouseEvent):void

{

  gotoAndStop(1);

}

I hope you can answere me soon.... And Hope its anderstood..

My English is not so good.. (:

thanks!!

TOPICS
ActionScript
831
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 ,
May 03, 2015 May 03, 2015

Hi. Can you post an example .fla? Want to tell you the right thing and need to see exactly how it is structured.

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 Beginner ,
May 03, 2015 May 03, 2015

Hi,

How can I Send an example? i cannot find the option to attach fla file..

Thanks

Adi

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 ,
May 03, 2015 May 03, 2015

You'd have to pop it up on DropBox or some other service and post the link.

Definitely have a look at Ned's suggestions though.

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 ,
May 03, 2015 May 03, 2015

What you should probably do to make it easier to manage is to place the code in the main timeline instead of inside the movieclip.  The following code is not going to work because I do not know how you have things arranged, but it should give you some idea.

topMCName.Study_Butt.addEventListener(MouseEvent.CLICK, clickStudyBtn);

function clickStudyBtn(event:MouseEvent):void

{

  topMCName.gotoAndStop(2);

  topMenu.Map_m.gotoAndStop(1);

}

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 Beginner ,
May 03, 2015 May 03, 2015

Thanks! I will try it..

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 Beginner ,
May 03, 2015 May 03, 2015

Thanks!! its was realy helpfull - now its work !!!!!

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 ,
May 03, 2015 May 03, 2015
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
Community Beginner ,
May 03, 2015 May 03, 2015

I cant believe - it worked!!!! Thanks alot!!! U save my life..

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