Trying to create a button inside a clip that will return to scene 1

I am trying to create a button inside a clip that will go back to scene 1.

Here is my code

Stop();

sback1_btn.addEventListener (MouseEvent.Click, Film1);

function film1(event:MouseEvent):void {}

gotoAndStop ("shorts");

}

I get access of undefined property error.

Can anyone help?

Thank you.

Try

sback1_btn.addEventListener (MouseEvent.Click, Film1);

function film1(event:MouseEvent):void {}

MovieClip (root) .gotoAndStop ("shorts");

}

or

MovieClip (root). VideoMask.sback1_btn.addEventListener (MouseEvent.CLICK, film1);

function film1(event:MouseEvent):void {}

MovieClip (root) .gotoAndStop ("shorts");

}

The problem is the path

Tags: Adobe Animate

Similar Questions

  • Button in a movie clip that will command the scene?

    Salvation;

    Type of document html5 Canvas.

    What could be the code for a button (bt1_btn as instance name) which is in a clip (anim_mc as instance name), when the event on the button's "click" and that the statement is: take the play (a scene that already stopped)?

    Cause when I got the script code in the level of the scene that it works fine:

    This.Stop ();

    This.anim_mc.bt1_btn.addEventListener ("click", letsGo.bind (this));

    function letsGo() {}

    This.Play ();

    }

    But what I want is to write the code in the anim_mc clip:

    This.bt1_btn.addEventListener ("click", letsGo.bind (this));

    function letsGo() {}

    //what is the correct script here? > > > Stage.Play ();

    }

    THX

    You don't play the scene. The scene is just a container for the whole object. What you want is to play the root (or hand) timeline.

    To play the root timeline (or any scenario really) anywhere, without having to worry about the use of references, parent.parent.parent etc, store a global reference to the timeilne. On the first image of the timeline root, put something like:

    thisIsTheRootTimeline = this;

    Then in the event handler, follow these steps:

    thisIsTheRootTimeline.play ();

  • Is there a way to create a button for the toolbar that will display a page in "No Style"? ".

    I guess what I'm asking, it's... Is there a way to make a custom button to the toolbar which will allow me to change the view of a Web page 'No. Style' in the view menu. If so, how can I do this?

  • I am trying to create a button print in my form, but the Action tab does not appear

    I am trying to create a button print in my form, but the Action tab does not appear

    I thought about it. When I tried to create a new form, I chose the "this form needs the signatures '. This option does not allow to add action buttons. If I create the form without checking the signature box, it works.

  • I am trying to create a button that opens a pop-up window with a video player, sensible size. Also, I would like for the page Web of the background go darker when that happens. Is there a way top make in Muse?

    I am trying to create a button that opens a pop-up window with a video player, sensible size. Also, I would like for the page Web of the background go darker when that happens. Is there a way top make in Muse?

    Hello

    I created a video for you in Muse. Here is the link:- lightboxvideo.mp4 - Google Drive

    I hope that it would give you an idea on how to do just.

    Kind regards

    Rohit Nair

  • Trying to cancel my subscription but can continue to will return to bike and returns through the cancellation process - tells me I need to call customer service but no phone number is available.

    Trying to cancel my subscription but can continue to will return to bike and returns through the cancellation process - tells me I need to call customer service but no phone number is available.

    Hello Marilyn,.

    Please sign in to your Adobe account and then go to the link below:

    Contact the customer service

    Reference: cancel your creative cloud membership

    Kind regards

    Sheena

  • buttons inside video clips

    I created a button and placed within a clip.  I added the script (as2) the button below however when I test the movie, the button does not work.

    on (release) {}
    tellTarget (_root) {}
    Stop ("226");
    }
    }

    The button is located in clip "page1".

    Page 1 is on frame 120

    I don't know that I have not included.

    Tracey

    You may be having a problem because tellTArget is supposed to get a string argument, and maybe because you are citing the frame number which must be given not (unless it's an image tag).  Since you are using AS2, try using...

    on (release) {}
    _root.gotoAndStop (226);
    }

  • How do reactivate you a button inside a Clip (which was disabled)?

    I am tempted to call a clip and when that film is called the other buttons on the frame are disabled. I got the correct part.

    However, the problem starts when I close the clip. the buttons I disabled are not enabled (see the reActivateButtonsfunction). I didn't do something correctly. There is code in two places, on the chassis and on the frame in the clip which is called. Please see the code.

    CODE ON THE TIMELINE OF THE HAND

    Stop();


    pop up screens

    CreditPop.stop ();

    Active keys from the popup screens when the movieclip is closed. ;

    stage.addEventListener ("ReActivateMainButtons", reActivateButtons);

    function reActivateButtons(e:Event):void

    {

    Credits_bnt.mouseEnabled = true;

    goLongA_bnt.mouseEnabled = true;

    goLongE_bnt.mouseEnabled = true;

    goLongI_bnt.mouseEnabled = true;

    goLongO_bnt.mouseEnabled = true;

    goLongU_bnt.mouseEnabled = true;

    }

    Name the clip and disables the buttons.

    stage.addEventListener (MouseEvent.MOUSE_DOWN, touchGo);

    function touchGo(event:MouseEvent):void

    {

    If (event.target is Credits_bnt)

    {

    SoundMixer.stopAll ();

    CreditPop.play ();

    Credits_bnt.mouseEnabled = false;

    goLongA_bnt.mouseEnabled = false;

    goLongE_bnt.mouseEnabled = false;

    goLongI_bnt.mouseEnabled = false;

    goLongO_bnt.mouseEnabled = false;

    goLongU_bnt.mouseEnabled = false;

    Event.stopImmediatePropagation;

    }

    CODE INSIDE THE MOVIE CLIP: Code in the video which is called. I created a dispatch to activate ReActivateMainButtons.

    Stop();

    closeCredit.addEventListener (MouseEvent.MOUSE_DOWN, closeCreditPopupScreen);

    function closeCreditPopupScreen (event: MouseEvent): void

    {

    gotoAndPlay ("closeCredit");

    this.dispatchEvent (new event ("ReActivateMainButtons"));

    }

    Question: How can reactivate these buttons that have been disabled?

    Try ading the listener for the object that dispatches the event instead of the scene

  • Button inside a clip controlling the main timeline

    Hello-

    I have a clip on the main stage - inside that movie clip is a button - I want that button to contol a function on the main timeline.

    example: the Script button

    closeAll_btn.addEventListener (MouseEvent.MOUSE_DOWN, goCloseAll);

    function goCloseAll(e:MouseEvent):void {}


    * do not know what to put here to activate "closeAllOpenMovieClips" on the main stage *


    }

    example: main stadium Timeline Script

    function closeAllOpenMovieClips (): void {}
    trek_mc.gotoAndStop (1);
    lost_arts_mc.gotoAndStop (1);
    rain_mc.gotoAndStop (1);
    vintage_mc.gotoAndStop (1);
    }


    do not know if I need a script more on chronology of main stadium that comes "from function."

    Thank you - Ben L

    If the button is in part 2, then the event listener so that it must be well on frame 2... or you could make the button visible/invisible betrween frames 1 and 2).

    But if you want to head back to your original approach...

    closeAll_btn.addEventListener (MouseEvent.MOUSE_DOWN, goCloseAll);

    function goCloseAll(e:MouseEvent):void {}

    MovieClip (root) .closeAllOpenMovieClips ();

    }

  • How to access a button inside a MovieClip that is the source of a scrollpane?

    Hello world

    I created a crollpane in my flash file and the source of the pane scrolling is a movieclip that contains a button.

    Now, I want to add a function to stop this button to link to an image in the main timeline.

    Could someone tell me what is the right as3 code to access this button?

    Thank you!

    To target the movieclip which is the source of the pane scrolling you can use:

    MovieClip (sp.content) / / where sp is the name of the instance of scrollpane

    So, to target the button with this movieclip...

    MovieClip (sp.content).btn.addEventListener (... etc.

  • You can have a button inside a symbol that has an event click on him?

    http://blogs.Adobe.com/edge/2012/07/18/tutorial-leveraging-independent-symbol-timelines/

    I followed the tutorial above, but I'm also keen to make "magazine covers" clickable buttons - how can I accomplish this?

    Basically I have navigation buttons that animate each 'page' on the stage (each page is inside each nav button symbol), but on the stage, I want to be able to have buttons, videos, etc., who sat inside of symbols if I followed the above method... I don't know how to click stuff if it's within a clickable symbol...

    Thank you all!

    AZA

    Use this code if you want to add to an object within a symbol to play the label on the timeline

    sym.getComposition () .getStage () .play ("spinBlock");

    Use this code if you want to add it to oppose within a symbol to control another symbol on the stage.

    sym.getComposition () .getStage ().getSymbol("star").play ();

    Use this code if you want to add to an object within a symbol to control a symbol within a symbol

    sym.getComposition () .getStage ().getSymbol("starB").getSymbol ("starCent er") .play ();

  • I am trying to create a package for 8 Captivate that includes NeoSpeech voices

    I'm packing 8 Captivate using CC package.  I need to add the NeoSpeech voices to the package.  I run package manager to build the package with the msi using our license of the company that gives me applications and patches.  There is nothing for NeoSpeech well and I include NeoSpeech with the msi.

    Hello

    In order to create a Neo Speech voices to Captivate 8 msi package, you must use Adobe Application Manager Enterprise Edition 3.1 (AAMEE 3.1).

    You can download AAMEE 3.1 by visiting the link:- http://www.adobe.com/devnet/creativesuite/enterprisedeployment.html

    Kind regards
    Ajit

  • Create a button in a Folio that records article via bookmarking native?

    Is this possible?

    No, the DPS apps don't have the built-in native bookmark

  • How to make a button on a form that will not appear when printing?

    Hello again!

    I have a strange request that I received recently from my employeer for a form that we are working currently on:

    We have a form with a button Acrobat created on this subject that links to an attachment.  She doesn't want the button to appear when the document is printed.

    Is it still possible?

    Thanks in advance!

    Best regards

    Ashley

    You can set the form field to be "Visible but does not print ' rather than 'Visible '. It is much easier than the script.

  • How can I create a link or an installer that will open the bookmarks somebody bar and add some bookmarks?

    The goal is to embed a link in a word which, when clicked, opens the bookmarks bar and adds some bookmarks in the document. Another option would be that the link create icons from desktop to Web sites. The main deal breaker is we do not want to change the registry for this. All creative solutions are welcome.

    Thank you

    If it's for users as a whole and not in a given organization, forget the idea of profile, that would be much too intrusive.

    As noted by cor - el, an extension would have privileges to perform these changes. Some resources on developing extensions, since it is beyond the scope of this forum:

Maybe you are looking for