BTN in Movieclip custom back to the main timeline

Hi all

I have a btn in a Movieclip at some keyframe, the user is prompted to if they want to

go back to make another selection of a category of choice (in the maintimeline)

Like now, the code I have for the btn who jump you back to the main timeline is:

on {(press)
gotoAndStop (_root.stop (24));
}

_Root.stop (24) should be in quotes?

That is to say. "_root.stop (24).

Thanks in advance,

Graeme

Your code is not likely to work.  Try to use...

on {(press)
_root.gotoAndStop (24);
}

Tags: Adobe Animate

Similar Questions

  • How to target button in movieclip on the main timeline

    Hello!

    I have a few buttons of submenu in a movieclip in the mainline. My first level of navigation in the main timeline. The submenus are grouped into movieclips on the main timeline. I basically used the same code on the main navigation for the navigation sub except the code for the submenus is located in this movie clip. My instruction trace bed button is clicked (which was a quantum leap for me) but I know that I need some kind of code _parent in there so that he knows to go to the label back on the main timeline. Can anyone help? I feel like I'm so close.

    Also is this a correct way to set-up? I couldn't figure out how do it in an image. Any help would be so appreciated. I didn't know that this basic framework would be so difficult.

    Here is the link:

    http://www.sandraschmitt.com/Coclico/index2.html

    Thank you!!
    Sandra

    Here is my code which is on the movieclip submenu:

    Code:
    stop();

    fall.addEventListener(MouseEvent.CLICK, clickSection);
    spring.addEventListener(MouseEvent.CLICK, clickSection);

    function clickSection(evtObj:MouseEvent){
         //trace shows what's happening... in the output window
         trace ("The "+evtObj.target.name+" button was clicked!")
         //go to the section clicked on...
         gotoAndStop(evtObj.target.name);
    }

    One of the reasons that I never won any price for my vision of the design are because I am often... If it works, use it.  There are many ways to approach a design and yours is very good if you understand.  If she was going to smash something, it would have happened now.  Some people don't go to the extreme of having absolutely no code in a file, some even no content library, he wrote everything in files and class not by necessity, but to simply believe that it is the best way, or a challenge to prove their skills...  They have the it.  He participates a practicality with design that allows to make Judgment calls and if you feel that your approach to design is convenient for what you understand or which meets the needs of the project, then you have the right to follow your own path.

    That said... in the case where a person must inherit from your work somewhere down the road, that's when your approach can be victim of judgment... If someone can not follow, either found it difficult to put all the pieces together, or find them, then you become the contact person for the moans fall that follows.  But you're not likely to have to hear about it.  Yet, one day, if you are in a position where you inherit a person guestroom... and start whining about how they did it, you will come to appreciate the reasons to consider how approach you your designs.

  • Targeting of evil to a button on the main timeline for a VideoEventComplete at work

    I have a .fla file that has buttons on the main timeline that target frames in a mc named 'pages' in a table.  The 'pages' are implemented in the form of frames each five images or as a slide show where the buttons advance or return to the previous page.  I want to make invisible buttons until frame 30 video is complete (page 4).  When I insert the code below in the main timeline, the button becomes invisible, but there is no event that will finish to come back only to show the button so it sits right there with no way to advance as the buton is invisible,

    Then... How to target the button to only be invisible when it has an event video complete but not not start before 30 (page 4) image of the mc and then do it again in the 35 framework etc.

    I tried to put it in the main timeline and on the frame of the first video.  If I'm on it within the pages don't need to point the code on the main timeline to get code know where are the buttons? Something like main_timeline.nextbtn etc... ?

    The code in the settings:

    Stop()

    Import fl.video.VideoEvent;

    THIS BUTTON IS LOCATED IN THE MAINTIMELINE\\
    nextBtn.visible = false;
    addEventListener (VideoEvent.COMPLETE, doNextFrame);

    function doNextFrame(e:VideoEvent):void {}
    nextBtn.visible = true;

    pages.nextFrame)
    }

    All the code is:

    THE CODE of the MAIN SCENARIO is:

    Listeners of button

    import of flash.media.SoundMixer;// it comes to the


    nextBtn.addEventListener (MouseEvent.CLICK, nextSection);
    prevBtn.addEventListener (MouseEvent.CLICK, prevSection);

    ///////////////////////////////////////////////////////////////////////////

    function nextSection(event:MouseEvent):void {}

    var thisLabel:String = pages.currentLabel; Gets the current image under chain tag
    var thisLabelNum:String = thisLabel.replace ("sct", ""); cut the main letters off the number
    var curNumber:Number = Number (thisLabelNum); Converts this string to a real number number
    If (curNumber < 18)

    {

    var nextNum:Number = curNumber + 1;
    pages.gotoAndStop ("sct" + nextNum);

    }

    SoundMixer.stopAll (); Place it inside your functions

    }
    ///////////////////////////////////////////////////////////////////////////
    function prevSection(event:MouseEvent):void {}

    var thisLabel:String = pages.currentLabel; Gets the current image under chain tag
    var thisLabelNum:String = thisLabel.replace ("sct", ""); cut the main letters off the number
    var curNumber:Number = Number (thisLabelNum); Converts this string to a real number number
    var prevNum:Number = curNumber - 1; subtract 1 from the number, so we can go to the next image tag
    pages.gotoAndStop ("sct" + prevNum); This allows us to go to the previous image tag

    SoundMixer.stopAll (); Place it inside your functions


    }

    Please Note: it started in a previous discussion, but I think that I was confused that the question so go fresh here, thank you so much for the time on this

    I can't say I'm immune to be confused by the story you tell, but I'll take a stab to offer what could be a solution.  If the buttons are in the main scenario and the code that you want to make visible with in a movieclip which lives on the main timeline, then you can target the buttons from inside and using movie...

    MovieClip (parent).nextBtn.visible = true;

    MovieClip (parent).prevBtn.visible = true;

  • Communicate with the symbols of the main timeline

    Hi, I created a movieclip and exported to Actionscript. I have a few cases of the new symbol (class) on the main time line and I have a few

    The timeline class code. Im trying to communicate with an instance of movieclip that is in the main timeline, but for some reason im getting

    a mistake. the name of the movieclip instance is mcGalleryWin. im sure that the keyword root has worked for me before in a similar situation

    but for some reason, this is not not workin now...

    I tried to trace (root) of the class and I don't get the main timeline.

    Code:

    imageLdr.load (imageReq);
    imageLdr.contentLoaderInfo.addEventListener (Event.COMPLETE, firstImageLoaded);
    function firstImageLoaded(event:Event) {}
    root.mcGalleryWin.addChild (imageLdr);
    }

    error:

    1119: access of property may be undefined mcGalleryWin through a reference with static type flash.display:DisplayObject.

    Try:

    MovieClip (root).mcGalleryWin.addChild (imageLdr);

  • Control the main timeline and chronology of built-in movie clip

    Good afternoon folks,

    I am trying to solve this problem.  I have a main scenario with an animation. (animation is not a clip).  I also have a clip film embedded in the main timeline. I want to control the actions of the main timeline AND the embedded animation at the same time.

    For example, when a user clicks on a button "pause", I want to stop the animation of the main timeline as well as the integrated clip. I figured out how to stop the main timeline using the stop(); command.  I also understood how to stop the film incorporated using the command _root.embeddedclipinstancename.stop ();  Problem is that I don't know the commands to stop the two things at the same time.

    I tried to find that an instance name for the main timeline, but there is no (I think). I know I could do the animation in the timeline in a clip, but I don't want to go that route.  Any ideas on how to control two things?
    Also, if possible, I would prefer not to use the _root command since I know that this can cause a conflict in Captivate.

    Thank you.

    Include the two commands that worked in your pause button code.  If your [ause button is on the main timeline, you don't need to use a reference of _root.  It is only really useful if you target some of child level object distance back to the main timeline.  You can _parent (and string them if necessary) instead of using _root.  As you will get in trouble unless you're on the _root timeline when using it.

  • Close button in an interpolation that takes back you to the main timeline

    I have a HTML5 canvas document that has 5 separate click to open the motion tweens.  Within each tween, I have a "close" button that I want to return at the beginning of the main timeline.  Right now he's just at the beginning of the timeline to tween movement in an infinite loop.  How can I get to go back to the main scenario for each of the interpolations of?  (For reference, I am a beginner with Animate and JS code and have not been able to find this answer in my many searches on the web).

    you want that code in the main timeline to lead the scenario primary back to its first image and stop, or you want to code on the timeline of a movieclip lead the main timeline at its first image and stop or something else?

    If you want the code on the timeline of a movieclip to lead the main timeline, use:

    this.parent.gotoAndStop (0);  assuming that the parent of the movieclip is the main timeline.

  • Button on the main timeline control movieclip

    Hello

    I have a stop in my main script. At the stop, I have a play of movieclip. In the movieclip, I'll have a video playback. After playing the video, I have a button for the user to continue playing until the end of the movieclip. Once the movieclip is done, I want back the return to a specific image in my main script.

    I can't figure out how to make this work. Anyone have any ideas?

    Thanks in advance,

    Paul

    How much of what you just described in currently working properly?

    If it's just the last step to have the game finished main scenario the movieclip, then you might have an event listener assigned to this movieclip in the main timeline.  When the movieclip ends it can send an event of this listener that can trigger an event handler function in the main timeline to tell the main scenario for continued as planned.

    Another less glamorous but more compact approach might be to have a drive inside / at the end of the movieclip to order the main scenario of an act using something like...

    MovieClip (parent) .gotoAndPlay (whatever);

  • In the Pages, do GQue I move a note to end back in the main text? Simply by clicking on the footnote number is no longer seems to do anything...

    How can I move a note to end back in the main text? Simply by clicking on the footnote number is no longer seems to do anything...

    Pages ' 09 v4.3 support hypertext links have been implicitly set with notes at end of document, which led to a return to the original location of the page by double-clicking on the index value of EndNote. This feature is not enabled in any version of Pages v5, and return to the original page is a purely manual exercise.

  • IE8 and it just started with a lot of error reports and custom back to the home page

    Well for a reason my first thread is not here so Im start again, I have IE8 and it just started with a lot of error reports and custom back to the homepage it just on the same page of the article, I was reading and said that this tab was recovered, I end up having to close on restarting the program n also since I reloaded my xp cd my sound got rough n jumps, it was well before I did this if Im not sure what to do. Im not exactly smart pc and am afraid of doing something wrong then Im left to do very limited things, any help would be appreciated

    Hello mikegrimesWQ,

    Because it looks like you have reinstalled Windows XP, what happens when you turn on your computer?  Windows loads correctly and allow you to connect with success?  Have you completed all the updates of Windows since the relocation?  Do you get errors at any time?

    What version of Windows XP you are using and which service pack is currently installed?  I would say confirming all your drivers are recognized and updated.

    How to download updates that include drivers and hotfixes from the Windows Update Catalog

    Please let us know status.

    Thank you

    James

  • Windows reduced on dual #2 keep going back to the main screen when the system is locked

    I have two monitors and just got a new system with Windows 8 is installed.  I have a monitor set up as Monitor 2 (just as I did before windows 8) so that nobody walks by can see it... I have confidential information open on that screen quite often - otherwise, it is reduced.  My main screen is set up for the bulk of the work that I do.

    However, whenever my system is locked or falls asleep, the apps/information, I put up on the screen 2, flies back to the main screen when I unlock the system.  I never had this problem before.  I tried to maximize the apps/info to fill the screen, but it does not work: it continues to move... it means that whenever I have unlock my system, confidential information appears on the screen which can be seen by anyone who was travelling.

    How can I stop this from happening?

    Hi Kelleybennett,

    Thanks for posting the request in Microsoft Community Forums.

    It seems that even if the computer is configured in the standby mode, the second monitor stops and windows are going to another. This could be a problem with the video card drivers or pilots of the monitor. Video drivers could be arrested to answer when the computer is set to sleep.

    You can try to uninstall and reinstall the drivers for the monitor and video card drivers and check.

    a. press the Windows key + R

    b. type devmgmt.msc and press ENTER to launch the Device Manager

    c. in the search for Device Manager for the device, click with the right button on the monitor drivers and select the Uninstalloption.

    d. also uninstall video card drivers

    e. restart the computer and check.

    See also:

    Download and install the drivers
    http://Windows.Microsoft.com/en-us/Windows-8/all-drivers

    Hope this information helps. Response with status so that we can help you.

  • How to call a function within a movieclip on the main timeline in CC animate canvas?

    Hello world...

    In AS3: Function (fnc name: myFunction) inside a Movieclip (mc1). I'll call you timeline mc1.myFunction ();

    But how to call AnimateCC canvas?

    If you have an instance of MovieClip named "mc" with the following code in to:

    This.Fun = function() {}

    Alert ("Hey!");

    }

    You can call this function (increased to 'this' within the MC) using the oon following the main timeline:

    var root = this;

    this.mc.addEventListener ("click", function() {}

    Console.log (root.mc.fun ());

    });

  • Access a MovieClip in the main timeline of an external class

    Hello


    I've been struggling with the same question for a few days now, and I don't know it can be easily solved - I have just found a way that works for my case


    Basically I have a series of clips on the main timeline, the name "S1B1' to 'S5B8' as a result. I would like to add to a table in a separate category called "BeatArray".


    For the moment, I found no referencing the MovieClips from the separate class file that works, and I tried many different methods (including adding MovieClip (root). before each one and various other things).

    It's probably worth noting that the external class has already extends MovieClip.


    Any help is greatly appreciated!


    See you soon

    When you instantiate the outer class passes a reference to the main timeline and assign it within the class and use it in your targeting.

  • Goto frame within a movieclip on the main timeline button

    So what I have is a button (then named) on the main timeline. I have a clip on this framework (on the main timeline) and the clip has 3 images I want to be able to scroll using the "Next" button located on the main timeline. How can I do this?

    Thank you

    assign the movieclip an instance name (in the properties panel - for example, mc) and use:

    Next.addEventListener (MouseEvent.CLICK, f);

    function f(e:MouseEvent):void {}

    mc.nextFrame ();

    }

  • video gets sent back to the main menu after the first chapter

    Last night, I burned this DVD and it was perfect - no error message to check the project.  It burned on a disc very well.  Then I went to bed happy.  I woke up and popped the DVD in a DVD player.  When I hit the play movie button, it plays a chapter only before returning to the main menu.

    So I went to the scene selection, and when I choose the 1st chapter to look at, it's going to do the same.  After the first chapter, it goes back to the main menu.

    If I choose the 2nd chapter, he continued to play through the video normally.

    It makes me carzy, so I thought that I was watching the movie in the preview.   Sound disappears and the video freezes for the first chapter.

    Here are some screenshots of my project and the flowchart:

    full_project.jpg

    flowcart1.jpg

    flowcart2.jpg

    Any help is very appreciated.  Thank you!

    Edited to add: after preview freezes, and I close out of it, he says: "unspecified error of drawing."  I just made another preview, just to play the movie and the sound was there, but it froze after a little in the chapter.

    The complete project JPEG is too pixelated to really say much about it and the linked version has a header error and does not open. Can you redo this JPEG and maybe use a PS JPEG about 9 frame? It would also be useful to have a close-up view of the timeline with chapter markers.

    Now, what are the Actions of end for each of these chapters?

    For the Play of All, have you looked in a chapter Playlist? If you create one, with the chapters in any order you want, and then set end of Playlist Action chapter to return to your main Menu, "replacing" the end of chapter Actions. NOTE: I use the term 'override' as a verb and the noun "ignore."

    Regarding replacements, this sounds like there might be still a TAPI on. They can be applied in many places, and it's a bit of work to check all the buttons, chapters, timelines, etc.. They can be literally anywhere and should not be used.

    Forward the new screenshots. Might be something obvious here.

    Last question: how long is your first chapter?

    Good luck

    Hunt

    PS - most of us ignore an "answered", or similar icon and read almost all the wires without worrying.

  • Go to a function on the main timeline of the timeline of the object

    Hello

    I have an object on the stage, MovieClip, with an animation inside.

    The animation is called from a class file.

    I would like to call for a function, addBubbles, when the animation of the MovieClip is completed.

    The function, addBubbles, is described in the main timeline, in the first picture.

    But I would like to call from inside this MovieClip, and write the code in the last image.

    How should I reference, so it would work?

    Both ways would be to use just...

    MovieClip (root) .addBubbles ();   OR MovieClip (parent) .addBubbles ();

    Another way would be to have the MovieClip to dispatch a custom event for which you have a listener assigned in the main timeline.  This listener in the main storyline would have an event handler function that calls the addBubbles function.

Maybe you are looking for