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.

Tags: Adobe Animate

Similar Questions

  • Login page that takes back you to where you were

    Hello

    I'm trying to have a log in page where it takes back you to the page wherever you were after the connection. In the window of Log In User under server behaviors, there is a checkbox that says to go to the previous URL (if it exists). I tried to verify that, but it wouldn't let me leave without putting something in the form above it. Anyone know what I put there or how to get around this problem?

    screenshot.jpg

    Go to a site that requires authentication. The authentication script should detect that you are not connected and you redirect to the login page. Now, look at the url and see if the url of the original page into this thing. Or, simply, copy and paste the url into the address bar on the forum so that we can see.

  • How can I save link button to take back you to the original location on the page.

    So I have a very long home page and in the middle of this I have links to portfolio pages.  I need my portfolio page to post a link to the exact place on the previous home page. How do that?

    You can create an anchor element to the exact location on your home page and create a link to that anchor on your portfolio page.

  • How can I get Firefox to take back me to the last folder of bookmarks, I was in like Internet Explorer instead of back to the beginning each time?

    When I find a Web site by using bookmarks in Firefox and then I want to look like another site in that same case, especially in a subfolder, Firefox brings back me at the beginning of the bookmarks menu. With Internet Explorer, it takes back me to the same folder or subfolder in that I was. For example, if I wanted to pick up newspapers, especially if they are in subfolders, I want to stay in the same place. Firefox loses this place, unlike Internet Explorer and brings back me at the beginning every time. Sometimes, I have several layers of subfolders and it takes time to find this place each time.

    One possibility is to open the bookmarks bar.
    Click the list next to the star icon on the Navigation toolbar, and then click "View Bookmarks Sidebar" (Ctrl + B).

  • 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;

  • 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.

  • 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);

  • 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 ();

    }

  • in actionscript 3.0 how do a nested movie clip button go to a section on the main timeline

    I do a site based in flash actionscript 3.0, I have a button nested in its own clip, because I have the button bigger to be able to read what I realized the only way to do it is by creating it as a film clipa nd inside the clip in a button

    I've added an event listener for the button of blog, saying:

    blog.addEventListener (MouseEvent.ROLL_OVER, gotoblog);

    function gotoblog(evtobj:MouseEvent) {}

    gotoAndStop (2)

    }

    This part of the code it goes to 2nd part of the scenario that it is and stop wich is a version of the origanal symbol breath

    I added a second order on structure 2

    blog.addEventListener (MouseEvent.CLICK.gotoblogpage);

    function gotoblogpage(evtobj:MouseEvent) {}

    gotoAndStop ("blogframe")

    trace ("the blog button has been clicked")

    }

    I have named the blog of symbol and use the name from where will the blog page to be "blogframe" this line of code at the bottom is where I run trouble the window output in Flash says "blog button has been clicked" I like it. no errors are accouring why that which is at the playhead does not attend the image "blogframe"? If the button does not work when I click on it the code is correct, I think the problem here is he does not want the read head go to the section I want it. So I gues, my question is, how can we make a button less, a clip interact with the main timeline?

    One way to do this is to target the root timeline...

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

  • 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);
    }

  • Control the main timeline of a movie via a button in a movie on another level.

    Hello!
    I have two film is at two different levels.
    Level 5 is my base film and I load another movie on top of that in level 10.
    Once the user clicks on a button in the movie to level 10, I would like to animation to level 5 to stop (the animation runs on the chronology of the main root of level 5).

    Once the user clicks a different button in the movie to level 10, I would like the animation in the main timeline of the movie in level 5 again from the moment it was already stopped.
    Is this possible?

    It would be great if someone could help me with this.
    Thank you, midi_ie

    You can't delete this loop of onClipEvent (enterFrame) unless you remove the movieclip to which it is attached. However, you can add an else if statement in your code (in addition to checking the variable Boolean "drag") to check if your _level10 button has been activated.

    and you can delete a slider.onEnterFrame loop, but you probably don't want to do.

    p.s. make the loop enterFrame?

  • Use the MC button to perform function on the main timeline

    I was wondering how (or if it is possible) to use a button that I have in a clip to perform a function on the main timeline. Specifically, I want the button in the clip to stop on an image of the main timeline. Any suggestions?

    Hello
    _root is the main scenario.
    So if you have your button (say button1) the code would be

    Button1.onRelease = function() {}
    _root.gotoAndStop (20);
    }

    This would prevent the main timeline to frame 20.
    This is for actionscript 2 (flash 8).

    for cs3 (actionscript 3) this would be it

    Button1.addEventListener (MouseEvent.Click, clickHandler);
    function clickHandler(event:MouseEvent):void {}
    _root.gotoAndStop (20);
    }

    Hope this helps
    Alan

  • I'm retouching of images taken on my iPhone 6 more with Photoshop CS6. I'm doing my color correction and add effects and all that. Before you export the image I review and be sure to what I has no more sharpness and the lines are smooth and it looks good

    I'm retouching of images taken on my iPhone 6 more with Photoshop CS6. I'm doing my color correction and add effects and all that. Before you export the image I review and be sure to what I has no more sharpness and the lines are smooth and it looks good overall. I export it to JPEG, max quality with the establishment of reference standards. I then open the image and it seems fine, as it did in photoshop. My problems begin to occur when I try to download on Twitter as my profile picture. I tried downloading from my office directly on the site via google chrome. When I download the image then begins to have jagged edges and overlooks the tablets. So I thought it was some performance settings, then I tweaked them and restarted a couple of times and still the same result. He would go on my desk but when uploaded to twitter as my profile picture is horrible. So I tried emailing the image of myself and the download through my phone. I opened the image on my iphone and it seemed fine as he did on my desktop but when I downloaded the image it makes then look blurry. I had this problem when downloading photos Twitter via my iphone, so it doesn't surprise me. I have read different forums saying: you must download it from the office, so I thought it would work like this. This could be a problem of twitter than compresses uploaded photos? Other people can do very much the same way, but it does not work for me. Please someone help me before I put my computer in an oven microwave.

    This could be a problem of twitter than compresses uploaded photos?

    Yes. The rest, we can answer. You wrote a lot, but very little discussion. Instead of accurate information you lose yourself in the vague descriptions. Screw color management to the wrong dimensions that trigger resizing server-side it could be any number of things here.

    Mylenium

  • 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 ();

    }

  • Problem with Play Pause AS3 button on the main timeline

    I was wondering if someone can help with this? Have tried to create a play/pause for the main timeline button in my flash movie.

    Created a clip with 1 frame - a chart of the break, and then on the 2nd frame - game graphics, labeled 'pause' and executives 'play' consecutively and put a stop action on the first frame of the movieclip.

    Then put the following code in the layer actions on the main timeline (and gave the name of "ppBtn" instance of movieclip):

    var pp:Boolean = true;


    function ppState(event:MouseEvent) {}

    {if (pp)}

    Stop();

    event.target.gotoAndStop ('pause');

    pp = false;

    } else {}

    Play();

    event.target.gotoAndStop ('play');

    pp = true;

    }

    }

    ppBtn.addEventListener (MouseEvent.CLICK, ppState);

    He works at the stopping and starting of the film but the real movieclip is not switch between the break and the game graphics (a few stays on the framework - 1st of 'pause' State). Any help in this very appreciated!

    Thank you

    What answer was helpful (correct)?  Could mark you?

Maybe you are looking for

  • Looking to block Ports on AirPort Extreme

    I'm looking to block specific ports when you access a particular service online. I the number of ports I need to block already, but I do not know how to block. I use an iMac running OS X El Capitan 10.22.6 and an AirPort Extreme v7.6.7. Any tips?

  • iMac will not start

    I have a 2008 24 "iMac 3.06 GHz Intel Core Duo, 6 MB of L2 cache, 4 GB 800 MHz DDR2, 500 GB SATA runs 10.9.5. Worked very well; All of a sudden won't boot to the top. After the "bong", the Apple logo & spinning wheel are displayed along w / an at the

  • Satellite P Series: Volume knob problem

    The volume on my P200 dial only turns the sound down regardless of the direction in which I turn it on. Someone at - it ideas?

  • Lenovo E540 change Wifi adapter

    My laptop has Intel N7260 wireless card. I want to change it but the bios gives error. Is there a list of wifi adapters compatible with this laptop?

  • Generation of model error

    Hello Am trying to generate a dll from a simulink model. But when I tried to build it generates an error. Please suggest the change -SID