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?

Tags: Adobe Animate

Similar Questions

  • Toolbox for CreateJS: how to control the main timeline from outside the canvas.

    Hey everybody,

    I'm currently doing something simple, but my animation film breaks whenever I try to change my code. I created a basic animation in Flash where an object moves from the left side of the canvas, to the right and then loops of the last frame of the first image. Nothing else. The animation is simply placed on the main timeline. I exported the animation with the Toolbox for CreateJS through the extension of the Flash and animation series as it should. I'm trying to start and stop (reboot of the first image) the animation with the mouse on and off mouse events. I want that the events to fire when wriggling over/stop a div outside the animation canvas tag. Is this possible with CreateJS? I'm trying to find a way to control the main timeline without being inside the canvas tag.

    HTML example:

    http://www.thephotoncore.com/testing/example_test.html

    Example Code:

    < id article 'container' = >

    < canvas id = "canvas" width = "550" height = "400" style = "background-color: #cccccc" > < / canvas >

    < section id = "animation_control" >

    < p > hover over to start and stop animation. < /p >

    < / section >

    < / section >

    Thanks again for the help!

    -DJ

    Hi DjPhantasy5,

    All the clips on the scene are children of the scene,

    So now the "mouseover" all clips on the stage could be stopped with stop and on the "mouseout/mouseouthandler()" all the children could be restarted with gotoAndPlay like this:

    function Stop()

    {

    If (stage & stage.children)

    {

    var t = stage.children.length;

    for (i = 0; i< l;="">

    {

    child var = stage.children [i];

    If ('stop' in child)

    Child.Stop ();

    }

    }

    }

    function Restart()

    {

    If (stage & stage.children)

    {

    var t = stage.children.length;

    for (i = 0; i< l;="">

    {

    child var = stage.children [i];

    If ("gotoAndPlay" children)

    child.gotoAndPlay (0);

    }

    }

    }

    See http://www.liauw.nl/forums/adobe/djfantasy5/index.html

    But it is also possible to expose "ball1", for example, by adding it to the document.

    This can be done by adding the code for "ball1" as follows:

    / * js

    document.ball1 = this;

    */

    Then stop the animation would look like:

    function Stop()

    {

    If ('ball1' in the document)

    document.ball1.stop ();

    }

    etc.

    Have fun!

    Ronald

  • Using CS4 Flach and action script 2.0 how to move a specific frame in the main timeline when a movie clip instance come at the end of his chronology?

    Using CS4 Flach and action script 2.0 how to move a specific frame in the main timeline when a movie clip instance come at the end of his chronology?

    code on the last frame of your movieclip instance:

    _root.gotoAndStop ('whatever_frame');  will work unless this swf is loaded into another swf.  in this case, you must use a relative path to the main timeline (for example, _parent or _parent._parent etc.).

  • slider to control the main timeline

    What code should I take the slider and do control the main timeline? I created a presentation with audio integrated and images coming and to tell the person. I need a way to scrub back to the bottom of the timeline.

    Try the following, where sl is the instance of cursor...

    function moveAlong(evt:Event):void {}
    gotoAndStop (sl.value);
    }

    SL.minimum = 1;
    SL.maximum = this.totalFrames;
    sl.liveDragging = true;
    sl.addEventListener (Event.CHANGE, moveAlong);

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

  • How can I access a variable on the main timeline of a movie nested in HTML5 Canvas

    Hello

    This should be pretty simple, but for some reason, it does not work if I have the wrong syntax.

    But I have a movie clip with a bit of code in it.

    It is a timer.

    I want to be able to program the wait time: since the main scenario and that the timer read this variable on the main timeline.

    I implemented the delay var = 1000 on the main timeline, but then I do not seem able or knows how to get this variable in my code in the nested MC. It is quite difficult to find the reference of the paradigm flash timelines on H5 support pages, so I really appreciate the help.

    tl2 var = this;

    TL2. Stop();

    var delay = delayMain;

    var startTime is createjs. Ticker.getTime ();

    createjs. Ticker.addEventListener ("tick", f);

    {function equation

    If (createjs. Ticker.getTime () - startTime > delay) {}

    TL2. Play();

    createjs. Ticker.removeEventListener ("tick", f);

    }

    }

    If you want to get to a variable defined by a feature any at any depth, you can use the window. As:

    Window.Delay = value;

    in a deeply buried movieclip, can be read in any other level of the project.

  • 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 control the main timeline of buttons in a movieclip - jobs in peril!

    I'm doing something simple in theory. In my main script, I have a series of images with labels for each image. In a movieclip (with its own labels and script) under the images, I have two panels of butttons flop back and forth (to save space). The idea is to have the script simply main plays the frame specified by the corresponding button in the movieclip. I tried the parent.child thing, but im hurt, or is not the solution. If anyone can help me I will be saved from certain death. If you think that any other part of my project can be blamed, ill be happy to provide you with anything that can help. Thanks in advance.

    Here is my script:

    ActionScript code:
    function on1click(evt:MouseEvent):void {     gotoAndPlay("pic1"); } thumbPanel.pic1_btn.addEventListener(MouseEvent.CLICK, on1click);

    This is the error:

    TypeError: Error #1009: cannot access a property or method of a null object reference.
    at gallery_fla::MainTimeline/frame1()

    1009 error indicates that one of the objects targeted by your code are out of reach.  This may mean that the object...

    n ' is not in the display list
    n ' is not have an instance name (or the name of the instance is misspelled)
    n ' is not in the frame where this code tries to talk to her
    -is animated in place, but is not assigned the name of the instances of each keyframe for her
    -is one of the two or more consecutive keyframes of the same objects without a name assigned in the image previous (s).
     
    If you go to your section to publish the Flash settings and select permit debugging option, your error message should have a suite of line number the number of the frame that will help you to isolate the object that is involved.

  • Control the main storyline of the film loaded

    I loaded an external film on the main movie in a movie clip called "mainholder" - in the main storyline on the main sequence there is a command to 'stop' on frame 1. The film loaded, I want to control the main timeline and tell him to go to frame 2. Can someone tell me the actionscripting to do this, I have tried several commands and frustrated. ;-)

    Thank you

    OK... _ is necessary to _parent and _root... all other instance names are called by their name on the timeline then... in the case of this file, try this

    {We (Release)}
    unloadMovie (this._parent.loadsgPhotosMain);
    }

  • Movie Clip on the main timeline to control

    I have a button in a mc and I want that he plays on the main timeline, it does, however, when it gets to the last specified image I want to go to another frame.
    Here's my actionscript I was that day.
    on (release) {}
    _root.gotoAndPlay (75);
    }
    Basically I want all my buttons to play 75 weft, however after each button corresponds to a different image that I need to go to play. 75 frame is essentially a transition to other pages. Each page has the same transition. Any ideas on how to achieve this?

    Well, I have a layer called actionscript, which is for my codes. Where you found other ActionScript where I don't know. But thanks for all your help. Whatever it is, problem solved.

  • Control loaded swf on the main timeline

    Hello

    I'm working on loading external swf files for ios. I am able to load swf files and assembled visible or invisible in different settings. I have trouble controlling the swf files loaded on the main timeline. Specifically, I would like to have a button on the main timeline, that when you click on will move a swf loaded to frame 1.

    Here is a code that loads a swf file:

    var myLoader1:Loader;

    var loaderContext1:LoaderContext = new LoaderContext (false null, ApplicationDomain.currentDomain),

    if(myLoader1 == null)

    {

    myLoader1 = new Loader();

    addChild (myLoader1);

    }

    myLoader1.load (new URLRequest("folder/file1.swf"), loaderContext1);

    myLoader1.visible = true;

    backbutton.addEventListener (MouseEvent.MOUSE_DOWN, backbutton1);

    function backbutton1(myEvent:MouseEvent):void {? myLoader1.gotoAndStop (1) ;}}  (this line does not work)

    (Once I load file1.swf, in the file1.swf I click a next button to move on to different periods.) My question is: hHow do I code the "backbutton" on the main timeline so that it causes the file1.swf to go to frame 1?)

    Thank you for your help.

    After loading is complete (and assuming that you load an as3 swf), you can use:

    MovieClip (myLoader1.content) .gotoAndStop (1);

  • Say a Movie Clip to play/stop on the main timeline?

    I have a main timeline that has a movieclip called "clock". At some point in the main timeline, I want the movieclip to play and at another time, I want him to stop. I can't get the script to control the movieclip.

    Any tips?

    I thank very you much for your time.

    Large. Thank you.

    I set the stop on the first frame of the main timeline for all the movie clips and then when I want to play, they play. Wonderful.

    Thanks a lot for your time for such a basic question.

    Scot

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

  • return to the main timeline of the movie clip

    well on my main script, I have an intro, and then a main menu. in this menu, it goes to a clip, I want to create a "back to main menu" button inside the movieclip that will return a certain group in the main timeline.

    can someone help me in this encoding to use?

    see you soon

    What about the fact that you have a problem with?  Do you know how to code a button? If Yes, you can program the button in the main timeline so that all you have to do a gotoAndStop() command is used...  In the main scenario where there is the mc...

    yourMC.theMCButton.addEventListener (MouseEvent.CLICK, gotoMenu);

    function gotoMenu(evt:MouseEvent):void {}

    gotoAndStop (menuframe);

    }

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

Maybe you are looking for

  • in the new iso standard 10 analog world clock update?

    How can we change the analog world clock in the new update iso 10? You could do it before, and now I don't see how to change it.

  • Add custom alert/text tones?

    iPhone 6 sec more (Verizon) 128GB iOS 9.3.1 I tried this as ringtones but these short alert tones will not sync over iTunes. Here's the old BlackBerry alert sounds, imported into iTunes as .mp3 files. I've created versions of AAC in iTunes, delete th

  • Replacing the battery on Tecra A8

    HelloI would like to replace the battery in my Tecra A8 (s/n 66878261G). Can I buy this Toshiba and what is the correct reference? Thank you very muchMario

  • OfficeJet 6000: Officejet 6000 'stuck' in the wireless status

    After using the printer on a minitour HP with a USB connection for a while, I installed the software on a Thinkpad with a link wireless to a Linksys router. The combination didn't work reliably, so I removed the printer and the laptop software. Howev

  • Toshiba Media Controller Installl failure... (WIN 8)

    Hi all Seems to be the Toshiba Media controller released [here: http://www.toshiba.co.uk/innovation/download_drivers_bios.jsp?service=UK] Is detined to fail by design... It's 'metro', the problem is that Windows 8 will not allow you to install files