Play/stop animation movieclip in canvas html (createjs)

Hi all
I have a movieclip with an animation in its own timeline.
I put a "this.stop ()"; in his first image so that it is not his own.
Now, I want to play this movieclip by clicking an external button on the stage.

I know how to do that in as3, can someone please show me how do it in createjs.

Thank you...

Do you almost exactly the same thing. this.myMovieClip.Play (); in the button's event handler.

Of course, you might have a problem of scope with the event handler reference, but there are many threads on here already detailing this issue.

Tags: Adobe Animate

Similar Questions

  • loop animation MovieClip without stop

    Hello:

    I have a problem with a movieclip named "note" is the loop without stopping, I added the script stop(); to do this, but it does not stop.

    It's the Movieclip "note_mc " that trigger the 'notes' movieclip.

    movieclip_note.jpg

    and it's the "notes" Movieclip this loopback stop witout.

    note.jpg

    Is the source code for more information you can download and you can find the source code under the folder :English Version/animations/en_hz000254.fla

    http://www.mediafire.com/download/g913lubogrrqaid/English+version.rar

    and I thank you in advance

    have you added a stop() to movieclip timeline "notes"?

    If so, is the framework that contains notes (that is to say, on the parent timeline notes) play more than once?

  • play an animation and before moving on to a scene.

    Hello everyone, I'm new to Flash and I have a simple question:

    I created a game. Let's say I have a screen instructions and a game intro screen. The instructions screen has a back button that has a mouse more/click/out animation. I can get the mouse and more functionality, but so far all work that I could do when clicking the back button is to jump straight back to the intro of the game, without playing the animation click first. How to play the animation, and THEN go to a scene? Thank you. Here is my code in my "back" button symbol:

    import flash.events.MouseEvent;

    backButton.addEventListener (MouseEvent.MOUSE_OVER, handleMouseOver);

    backButton.addEventListener (MouseEvent.CLICK, handleMouseClick);

    backButton.addEventListener (MouseEvent.MOUSE_OUT, handleMouseOut);

    function handleMouseOver(e:MouseEvent) {}

    gotoAndPlay ("over")

    }

    function handleMouseClick(e:MouseEvent) {}

    gotoAndPlay ("click");

    }

    function handleMouseOut(e:MouseEvent) {}

    gotoAndPlay ("out")

    }

    On the Instructions maintimeline scene, here is my code:

    Stop();

    import flash.events.MouseEvent;

    backButton.addEventListener (MouseEvent.CLICK, handleBackClick)

    playButton.addEventListener (MouseEvent.CLICK, handlePlayClick)

    function handleBackClick(e:MouseEvent):void {}

    gotoAndplay (1, "Gameintro");

    }

    function handlePlayClick(e:MouseEvent):void {}

    gotoAndPlay (1, "Gameplay")

    }

    You need the call to the handleBackClick function to be triggered by the end of the animation of gotoAndPlay ("click"), is not clicking on it.

  • Mute, cd/dvd, play, stop etc buttons do not work on my laptop satellite

    Hope you can help.

    For some reason the buttons that control the mute, play, stop, fast Fwd and rewind, not the light upwards and not not work?
    I can't work out how to get them working again
    Any ideas?

    Thank you

    Hi Saka

    I don't know what model of laptop you have, but please try to reinstall the package of added value.
    Remove the preinstalled version, restart your computer and install latest version offered on Toshiba support and download page under http://eu.computers.toshiba-europe.com

    Please post the result.

  • Satellite A300-1EG - cannot use the command buttons (play, stop) Win XP

    Hello.

    I have a problem with my Toshiba A300-1EG with good software Toshiba Control Center for Win XP, because I do not know how to import a brightened sense Key (PLAY, STOP, FORWARD, BACK).

    Toshiba offers a poor software on own site.
    I can change only 2 buttons (SOUND ON / OFF and ON AUDIO PLAYER).

    Help!
    PS. Sorry for my English

    Hello

    The play, pause, stop buttons and following can not be changed!
    You can use it with Windows Media Player or WinAmp (if you enable the option in Winamp).

    See you soon

  • Re: Satellite U400 - buttons mute/DVD/play/stop etc do not work

    Just checked that I have the same problem - it's none of my touch buttons work (mute/DVD/play/stop, etc.) and they stay on up - even when I turn off my laptop completely.

    As far as I know that I did nothing else except some windows update, that could have done it? I quite often use these buttons, so the question is rather awkward for me.

    If it is a different matter, I'll start a new thread. See you soon

    Hello

    Eventually MS updates confused something in your system.
    The buttons are controlled by the different applications that are part of the VAP.

    I think that you should remove the PPV of the system and should reinstall it again.

  • My Microsoft Sidewinder X 4 volume/play/stop/forward/back keys of the keyboard do not work!

    My Microsoft Sidewinder X 4 volume/play/stop/forward/back keys of the keyboard do not work! I don't know what to do I tried a lot of things I need help!

    Hi Michael,

    1 have you ever done any recent hardware or exchange of software on your computer before the show?

    2. what troubleshooting measures have tried to solve the problem?

    3. you receive an error code or message?

    Please follow the methods and mark the question below:

    Method 1:

    Mouse, touchpad and keyboard with Windows problems:

    http://Windows.Microsoft.com/en-us/Windows/help/Mouse-touchpad-and-keyboard-problems-in-Windows

     

    Method 2:

    Troubleshoot wired keyboards that do not or only the category wrong characters:

    http://support.Microsoft.com/kb/258826

    Warning: Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up the registry, click on the number below to view the article in the Microsoft Knowledge Base:

     

    http://Windows.Microsoft.com/en-us/Windows7/back-up-the-registry

    For more information:

    Contact the Support of Microsoft SideWinder X 4 keyboard from the links below:

    http://www.Microsoft.com/hardware/en-us/p/SideWinder-X4-keyboard/JQD-00001#support

    http://www.Microsoft.com/hardware/en-us/support

     

    I hope this helps.

  • Audio Play/Stop clip with a single button

    I'm having a hard time to understand how to use the advanced actions to enable / disable an audio button. I have read several articles and messages on the forum, but it is still confusing me!

    I want to create a button that can be clicked once to read data audio, click a second time to pause and click a third time to restart the audio (in the same place, she had stopped).

    Can anyone help with a really clear ride of the how to use the advanced actions to create this? There only seems to be pieces of the puzzle in the messages and blogs I've found so far!

    I started with a smart form which has a picture fill to a speaker:

    Screen Shot 2016-04-22 at 10.31.29.png

    I used simple actions for this audio trigger but there is now way to pause, and then start it again as far as I can see without the aid of a tip. My apologies if this has already been answered, but I can't find any post exact a walk has in the process.

    Thank you!

    Ruth

    OMG this is something totally different from the title of your son who literally said "toggle Audio Narration on / off. This title is not good at all for what you're asking here. You want a button for play/stop an audio clip. I'm going to your title in this way (using the power of my present by host)

    If you want an audio file to play when a button is clicked you use the command

    Play the Audio

    If you want to stop it using the command

    Audio triggered stop.

    If you want to use the same button for play/stop a specific audio clip, you must create a similar action, as I explained in th article toggle button, but do not use the variable cpCmndMute of system, but a user variable. It has almost the same meaning as the variable v_visib that I used to show/hide images. Tagged this audio variable v_audio, with a default of 0. The conditional action will then be:

    IF v_audio equals 0

    Play the Audio...           indicate the audio clip
    Toggle v_audio

    ON THE OTHER

    Stop audio Triggered
    Toggle v_audio

    I do not add changes state from here, can be done the same way, as described in the article.

  • PLAY, STOP, REPLAY, FULLSCREEN / PUSHED NORMAL SCREEN AND SEEKER

    can someone tell me please the AS3 code for... PLAY, STOP, REPLAY, FULLSCREEN / PUSHED NORMAL SCREEN AND APPLICANT. I want to do a video player online help pleeeease.

    for an as3 project uses a component flvplayback already has all these controls and no coding is required.

  • CS5: files .gif stop animating after closure

    I use CS5 + Windows 7, and I would like to make GIFs in the clips.mp4/.avi loop. I make sure that I put a loop for "forever", and I have save the file as a gif file.

    However, once I have download a site on chrome (like imageshack and tumblr), the image always stops animating or anime at all. I tried to download the image to Firefox, and it looped for always on the direct link to the image on imageshack. But when I upload the image to tumblr on both browsers, either from my files or the imageshack link, it always stops in a loop. When I go on a mass-Delete messages, a gif tumblr page that has a size smaller than an older gif (this anime no more than all) loop. All other gif on the site I didn't always looping.

    Help would be greatly appreciated! I would really like to have my own connections in my tumblr blog.

    To add to silkrooster, the reason why some websites it is to optimize the image to download faster and prevent abuse of bandwidth. These online services may be trying to give you a hint that 'video' GIF files are abusive.

    Why you do not welcome these bloated images on your own server?

  • CS5.5 Does animation movieclip animate again when it is visible = false?

    CS5.5: Animation movieclip still alive when it is visible = false?

    I'm trying to save as much CPU as possible to reduce delays for an iphone/computer app.

    something which does not currently exist and which are later will consume memory where it exists.  In addition, all that needs to be made will consume cpu cycles while it is rendered.

  • Button 'play-stop' CS4 does not

    OK hope that someone might be able to help - I am trying to get CS4 work on my partners machine which is a VGN Vaio Sony - AR49G - plug here - http://VAIO-online.Sony.com/prod_info/VGN-ar49g/VGN-ar49g.PDF

    A bit of history...

    Recently installed Prime Pro CS4 under vista (running CS3 previously on vista with no problems).

    CS4 running within days began to have conflicts between AVCHD and DV when editing in the same timeline - have been recommended to upgrade to Windows 7.  Upgraded to Win 7 32 bit.  It's the line of conduct:

    -After the upgrade from Vista to Win 7 32 bit, got the Win 7 updates;

    -Update the drivers (Driver Robot to detect the required driver updates);

    -Suite CS4 uninstalled and reinstalled;

    -Downloaded CS4 updates...

    Things seem to work fine now except screens of 'play-stop' button (or space bar) in the 'Source' and 'Order' does not work.   Can scroll by moving along the timeline bar, select points etc and output... OK, but the movie will not play in the screen of the source or program.

    Have you checked the WAV, AVI, AVCHD... none will play.

    Closed the premier Pro and first open items on the same machine and it is working fine - can play the same images...

    I've updated all the drivers who seemed to think necessary for the upgrade EXCEPT Intel ICH8 Family Driver Robot... the upgrade has failed and I was not able to locate more drivers up to date on the web... and found a note on my travels that they do not require the upgrade anyway.

    http://communities.Intel.com/message/72149;JSESSIONID=6169690E70B02BD075E4C1131A7ACC85. NOD e5COMS

    Help please!

    No problem.

  • NetStream.Play.Stop is called too early

    Hello

    I have a video that is streamed on a FMS3. Everything works fine, the only problem it's that NetStream.Play.Stop is triggered when the buffer reaches the end of the timeline. I want to start the event after that video is played until the end.

    Someone at - it solutions for this problem?

    Best Tobi

    Hello

    I have a video that is streamed on a FMS3. Everything works fine, the only problem it's that NetStream.Play.Stop is triggered when the buffer reaches the end of the timeline. I want to start the event after that video is played until the end.

    Someone at - it solutions for this problem?

    Best Tobi

  • I can't stop a movieclip to play in a HTML5 canvas paper

    Hello

    I use Flash Professional CC 2015, and I created a HTML5 canvas Document.

    I'm trying to stop a clip to play.  It is frame 1 in the main timeline.  The code is entered in the HTML Code snippets Web parts.

    I scored, with comments, where the stop() works and does not work.

    Is there anything else I need to do to get my code to use?

    Thank you in advance.

    Ryan

    My Panel code actions

    This.Stop (); works

    this.parentGear_mc.stop (); does not work

    frequency of var = 3;

    stage.enableMouseOver (frequency);

    this.parentGear_mc.addEventListener ('mouseover', fl_MouseOverHandler.bind (this));

    function fl_MouseOverHandler()

    {

    this.parentGear_mc.play (); works

    }

    this.parentGear_mc.addEventListener ("mouseout/mouseouthandler()", fl_MouseOutHandler.bind (this));

    function fl_MouseOutHandler()

    {

    this.parentGear_mc.stop (); works

    }

    I think that at the time the first frame script runs, the movieclip does not yet exist. Move your code in box 2.

  • Play a sound mousing in a canvas html in Flash CC document

    Hello

    I looked for a while to do something that I'm sure is simple, but I can't find the answer. I'm sorry if I missed it, but I appreciate any help anyone can provide.

    I have a simple button in flash that I am converting a document to html canvas so I can put like html in my Web site, with animation and its passage of the mouse. I had the animation works as I want, when I publish to HTML, but using Actionscript 3, I got a noise that played when the user said above the button. I want it continue to play a sound when the mouse user in my HTML file also, canvas top but I did not have success with the conversion of my Actionscript to Javascript and am not an expert by any means of javascript. I also have several formats of audio file linked in the code for all browsers that do not work with mp3 files. I can convert the audio file without problem but do not know how this code... I found some general tutorials on this, but have not been able to get it to work with anything I've tried so far.

    Here is the Actionscript code I had which works very well in my original document when I export a .swf file.

    Stop();

    import flash.media.Sound;

    import flash.net.URLRequest;

    import flash.events.Event;

    sprayGunbtn.addEventListener (MouseEvent.MOUSE_OVER, playSound);

    var myExternalSound:Sound = new Sound();

    var req:URLRequest = new URLRequest ("ShortSpray.mp3");

    myExternalSound.load (req);

    function playSound(event:Event) {}

    myExternalSound.play ();

    }

    If someone could help me to convert it into Javascript so that it does not work when I publish my .fla to HTML file, I would be very happy. Thank you very much in advance for your time...

    You can follow the steps below to easily play a sound when running - as on mouseover.

    1 make sure that your audio is imported into the library and has a specified binding name.

    2. open the Windows Menu-> Panel Code fragments, code and develop HTML5 Canvas-> managers section of events.

    3. Select your button on stage and apply the Code snippets MouseOver event.

    4. in the function MouseOverHandler add the line below and the test film:

    playSound ('audio_linkage_name');

    If you are still having problems let me know.

    In addition, you can go through the documentation for SoundJS for control with HTML5 Audio.

Maybe you are looking for