HTML5 Canvas move one image after a period of time

I'm new to JavaScript and html5 Canvas and you want to move one image after a period of time, for example, after an audio clip is finished playing.

I tried: setTimeout (function () {this.getStage () .getChildAt (0) .gotoAndPlay (2);}, 36000);

This code does not work.

The equivalent AS3 is: function wait() {stop (); var myInterval = setInterval (function () {play (); clearInterval (myInterval);}, 36000) ;} / / end of the function wait();}

Thank you.

Is to understand "extended", who looks much more like the ActionScript 2.0. The word 'this' as you have it does not refer to what you think it does. Because it is inside a function (anonymous function for setInterval you did), it comes to this scope.

Two ways to resolve this problem, assign the current scope and use inside the anonymous function or use the shortcut of exportRoot.

affect the scope

This.Stop ();

var _scope =;

{setTimeout (function ()}

_scope.getStage () .getChildAt (0) .gotoAndPlay (2); using the reference _scope retained by the top

(}, 36000);

Or this shortcut in the root scope:

{setTimeout (function ()}

exportRoot.gotoAndPlay (2);

(}, 36000);

Tags: Adobe Animate

Similar Questions

  • After a period of time, my computer hangs

    I am running Vista Home Premium service pack 1. I have 4 GB of ram. After a period of time, whether it's idle or am working on it, it freezes. all I have to do is open Task Manager and then close and everything works again. y at - it a setting I need to change?

    Hello

    Yes, you must install SP2 as soon as possible.

    How to troubleshoot Windows Vista and Windows Server 2008 service pack
    installation issues.
    http://support.Microsoft.com/kb/947366

    Service Pack Center
    http://Windows.Microsoft.com/en-us/Windows/downloads/service-packs

    I hope this helps.

  • password change after a period of time.

    As an administrator, I want to set up user accounts to ensure that the password would be changed after a period of time. How, or what is possible.

    Hello

    You can only do this with Vista Business & Ultimate Versions.

    As administrator, please do the following.

    Orb - click with the right button on computer - manage - local Users and Groups - users - open the user name

    -Uncheck the boxes for the user cannot change password and password never expires.

    In search bar type gpedit.msc hit enter key.

    Computer Configuration - settings - security settings - account policies - password policy

    Now you can change the settings according to your needs.

    Please keep in mind that my answer is based on the information in your message. More the better I can answer, Slan go foill, Paul

  • Screen: For several days my laptop screen not turn off after a period of time, of no use. I have to put it in mode 'sleep' me or there is 'on '.

    For several days my laptop screen turn off after a period of time, of no use.  I have to put it in mode 'sleep' me or there is 'on '.  What happened to cause this?

    http://www.Vistax64.com/tutorials/198047-power-plan-restore-default-settings.html

    Try to reset the default power Plan settings. information is at the link above.

    http://www.Vistax64.com/tutorials/63567-power-options-sleep-mode-problems.HTML?filter [11] = power % 20Management

    And how to solve problems in Standby Mode is at the link above.

    And read the information of 'Related links', too.

    See you soon.

    Mick Murphy - Microsoft partner

  • desktop PC: after certain period of time reduced the brightness of the screen - cannot turn off

    Win 7 64 bit

    AMD hd 6870 connected via HDMI pn59d500 samsung plasma tv

    What is going on:

    If I am reading an article or by typing in a comment like this box, the screen turns off after a certain period of time.

    -mouse mobile, typing, scrolling window or motion/movement of the window (like firefox) on the desktop does not work for normal brightness screen.

    -resizing of the window will be brighten screen (also by clicking on the Start button or start another application or similar activities).

    What I've done and additional info:

    -My hdtv eco settings and and autobrightness are all off. I don't have the problem with other components related to this view. This is not the problem of the screen

    -my desktop pc power settings are not set to reduce brightness at any time. I even disabled the «turn off the display after...» "option. Anyway, same problem. I have the computer put to sleep after 20 minutes.

    -a ran the troubleshooting of windows power - I know how to click and read. There is nothing outside of the obvious and already known.

    As-i crossed all the parameters of the CCC (the suite software amd vid card). the only color/quality setting I use is deinterlacing with drop-down auto-detection. pixel format is set to RGB 4:4:4 limited. I have active treatment of ITC (will try not disabled, no idea what it affects). I use manual detection of displays... no setting under "desktop management", "my digital flat screens", and "video" seems to do anythign with dimming screen.

    I read through the first 5 pages of the "Sun Office" search results here... no related response.

    just thought to google the registry entries related to power... but always options this issue. I'll look into registry changes after.

    Hello

    Please update us on the issue. Office is different from the laptop, and because the screen is dimming as it does in a laptop, it is related to the power settings or the driver itself. These are the only two things that are responsible for the same in a laptop as well.

    Therefore, I recommend you try to create a new power plan or change the existing one to check. You can also refer to:

    http://Windows.Microsoft.com/en-us/Windows7/change-create-or-delete-a-power-plan-scheme

    Let us know the results when you try these methods.

    Thank you

  • Automatically remove virtual machines for VDI pool after the period of time

    Use us Vmware View 5.0 but soon move to 5.2 and have need features to automatically remove all the virtual machines in the pool selected after a certain period of time. We are at disposal VDI for a project that will end for 3 months and after this time, we want to remove this VMs automatically. Is this possible?

    It depends a bit exactly what you want to do, but you can plan everything a powercli-script to remove the virtual desktop at a certain time.

    Another option that I usually prefer is to manage the rights with the ad groups.

    So when you want to revoke a users access to a desktop computer, simply remove the user from the group, which should be easy to do with a script.

    Linjo

  • My computer started to disconnect automatically after a period of time.

    My computer just start automatically disconnect after no activity during a short period of time.  How can I prevent the it disconnects.   I am running Windows 7.

    Hello

    Open windows control panel, open personalization, click on the link on the bottom right and in the next window, screen saver set time "Wait" to a more acceptable figure and Remove the tick in the box next to "in curriculum vitae, the logon screen.  Click on apply, then Ok to save the setting.

    Kind regards

    DP - K

  • Sound stops working after a period of time on my Satellite L755D - 14 M

    Hey there, I have a problem that I can't solve any how I try. Sometimes, when I play, I have sound, but all the all of a sudden it stops working, but I see no error. When I try to open a sound track through Windows Media Player, it says "year error occurred while trying to open this file through Media Player", or simillar.

    When I go on youtube, there is no sound, and there is no sound in games I play. And when I connect to Teamspeak to talk to my friends, I get an error saying that it is not able to connect to the audio device.

    I tried to update the sound card on the latest driver from Toshiba Web site through, but that did not resolve the error. The only solution I have now is to restart the computer to wait for the next time it will happen. Which I find really annoying.

    Is there than anything the people of this forum can help me with?

    Hello

    > When I try to open a sound track through Windows Media Player, it says "year error occurred while trying to open this file through Media Player", or simillar.

    I found an interesting article from the Microsoft Knowledge base where this error message is shown:
    http://support.Microsoft.com/kb/831430

    try to change the registry perhaps that helps

    If this does not work, I recommend using HARD drive recovery to reset the system.
    Since I m thinking its system damaged, HARD drive recovery should solve this problem.

  • Cable network keeps disconnecting after a period of time

    Hello

    I just bought a new Lenovo Z510 and I have serious problems with the network Ethernet cable. When I turn on the laptop and plug in the cable, it works for about 5 minutes. Then it suddenly disconnects (with software) while physically he is still connected. When I restart the computer, it works again for 5 minutes that follow. It's really annoying.

    1. I have not installed new software to date.
    2. it is not the problem of the cable (works fine on other laptops).
    3. Windows 8.1 diagnosis only says that the cable is diaconnected.
    4. I tried to reinstall the driver so I have the latest version of the web page from lenovo.
    5. There is not BIOS problem because it works fine first - then disconnects.

    I have really no idea of what it can cause. Does anyone have a similar experience? I suspect that maybe some Powermanagement kills service or something? But have no idea how to solve. Thanks for any advice.

    Ondrej

    Hi thanks for the reply. I tried everything above. Without success.

    Then I googled many repairs possible and, finally, the problem ceased when I
    uninstalled McAfee security. I have no idea what caused the problem but now
    It works perfectly.

    If the solution of the problem of Ethernet connection: uninstall McAfee!

    I have no idea why Lenovo should deliver so many third-party with software
    their products. And even if it causes problems. I have no idea if its only
    me, but I really suggest it first uninstall all the ballast that comes with
    the laptop. Its only 30 same day trial. Not good in it. Money for
    Lenovo ads. And a lot of nerves to its customers!

    Best regards and I hope this helps someone.

  • I have 6 Lightroom now but if I update to creative cloud and after a period of time you want to return to Lightroom 6 I'll be able to use the develop module in my Lightroom 6?

    Is the develop module of Lightroom 6 still available to me if I return from CC to the product I own?

    Yes but it can be a little tricky.

    LR 6 so the CC 2015 version are exactly the same. The difference is how you connect.

    Sign In with an Adobe ID a is or has been associated with the subscription and it becomes the CC 2015 version.

    Sign In with an Adobe ID that has never been associated with the subscription type and it becomes version 6. So since you have already used an e-mail address to activate the stand alone version 6 you must use a different email address, another ID Adobe buying the CC version. So if you ever want to revert to the version 6 You Sign Out with the Adobe ID email address, which IS associated with the subscription and back panel with the e-mail her IS NOT associated with the subscription.

  • VimClient.FindViewEntities returns null after a period of time

    Hi all

    I'm hosting a c# webservice in IIS that makes calls against our instance of vsphere to carry out certain functions.  A basic call is to get a list of all virtual machines.  Every so often, the webservice will get in a State in which the call returns a null value (we always have lots of virtual machines to the top):

    List<EntityViewBase> views = c.FindEntityViews(typeof(VirtualMachine), null, null, null);
    if (views== null) throw new Exception("List of VMs from VimClient.FindEntityViews is null!");
    

    At this point, I believe that this occurs if the Web service has not been restarted or recycled in some time.  Most likely, I'm storing the VimClient incorrectly.

    I'm caching of connection of VimClient in the following way.  My reason for doing this is so save time on calls (it takes about 20 seconds to call VimClient.Connect () to each webservice call, if I don't do this).

    (1) for Web service starts, I give the floor

    private static VimClient _vsphereClientConnection = null;
    _vsphereClientConnection = new VimClient();
    ServiceContent sc = _vsphereClientConnection.Connect(vsphereServerURL);
    UserSession us = _vsphereClientConnection.Login(vsphereUsername, vspherePassword);
    

    (2) I can enter this instance of the VimClient every time I need to perform a function at the instance of vSphere

    public static VimClient VSphereClientConnection
    {
     get 
    {
     Initialize.waitForInitialization(0);
     return _vsphereClientConnection; 
    }
    }
    

    where Initialize.waitForInitialization () checks if VimClient has completed the connection to vSphere.

    I cache this connection wrong?  Is there a better way to do this / a how to do it at all?  Or maybe I make a wrong assumption about why FindEntityViews returns null.

    I thought I could detect in the VSphereClientConnection property if the connection has expired in any way and re - connect, but it's not ideal because then the user must wait until the initialization again.  I'm also not sure how to check if the service is in bad shape without making a call that I know does not work in these States 'bad '.

    Thank you

    Jason

    You can call SessionManager.sessionIsActive () to validate a session.  You could also do some other data requests.  Firewall between you and vCenter can sometimes drop idle connections (vCenter has a vpxd.httpClientIdleTimeout configuration value to increase or decrease and it should be higher that your firewall connection inactive drops).

    You can also simply cache the session ID (which is essentially in the cookie).  I don't know if the c# Toolbox has hooks to do this easily, however.  Perl, and it works very well in web servers.  The logic is get sessionID, attempting to load the existing session, in case of failure, try the new name of connection with the stored credentials.

  • Interactive Html5/canvas freezes mobile phones

    Hello

    I was once a Flash Designer, and since Apple _ Google has announced that Flash would be is no longer supported on mobile devices. I've been without a good Interactive platform / Animation that would be supported on mobile phones / tablets without having to do it in the AIR or develop a native app.

    Along came animate dashboard... Well... who have worked at least on mobile phones... I thought it would be a good replacement for the awesome tool that Flash was.

    NOPE... Adobe he pulls away and gives us a CC to animate.

    I thought well... at least its in the Middle, I know...

    in any case... I did this Interactive Html5/canvas with "Button" to go to each image. That's all that.

    Work a lot on my desktop PC... but when I view it on my Android phone, this is WICKED SLOW (my entire Web page of scrolling is slow)

    Click on one of the buttons (which has a hover) takes several seconds to go to the desired image.

    After about 3 times switching pages... the canvas completely freezes the phone and I have to do a HARD REST of the PHONE.

    See the page the Html5/canvas content here, I did...

    Image file formats. Articles | TechniPixel Solutions

    I expect animate CC way to better answer to the phone than that.

    If this is true, CC animate (aka Html5/canvas) is NOT READY for prime time yet on mobile phones...

    So I have nothing to use to develop interactive content that allows to display on a mobile phone without creating a native application or with air.

    Flash is an A + in my books

    Animate CC is a D - F... I'm not impressed

    Anyone can do the light on interactivity and mobile phones with animate CC (aka Html5/canvas)

    Oh, I wish for the days of Flash back!

    Thanks in advance

    Well... Since nobody does not address this... I changed the links so my JS/Image version is now live on my site.

    JS/Image Version that replaces the CC version animate Html5 Canvas (link below)

    Image file formats. Articles | TechniPixel Solutions

    Animate CC Html5 Canvas Version

    Image file formats. Articles | TechniPixel Solutions

    The final conclusion is that CC animate is optimal for the creations of office... but because of the lack of CPU power on mobile phones (which is the number of phone manufacturer to catch up)... It is better not to use Html5 Canvas on mobile phones... AT THE MOMENT!

    We have to wait for the phone power to get faster and better, computer

    It's NOT for the lack of CC animate... but lacks the phone to be able to make enough office powered creations.

  • Desktop Windows 7 goes black after a period of inactivity and the user accesses their machine again

    Hello

    Wonder if anyone can offer help for an unusual problem?

    Users have Windows 7 machines that all have a background theme to display... Blue with a company Logo.

    User's for lunch and leave their posts after a period of time and/or powersaver screensaver comes in... all normal at this stage.

    After an hour, they return to their machine and they move the mouse/tap a key and bring the machine back (excuse my terminology :)) and the office went from the default theme for a black desktop computer... Icons/Applications behave very well.

    The temporary workaround is:

    1. open a session and on windows to restore the office back to normal.

    or...

    2. I do a restart of the "Desktop window Manager Session Manager" service that puts the office back to normal as well.

    Has anyone seen cela and worked a way how to make a permanent fix... have struggled on Google because the answers I find are around the screen savers that ISN'T the problem.

    See you soon,.

    Steve

    Hi Steve,.

    Thank you for the update. However, since these computers are connected to the domain, your question is beyond the scope of what is generally answered in this forum of consumer and would be better suited for the IT Pro TechNet public.

    Please post your question in the TechNet Forums.

  • HTML5 canvas - export of the problem images.

    When I create Flash CC html5 canvas banner, after the publication (without the "convert pictures to spreadsheets" checked) Flash kind of renders new images for each image used. Is it possible that it moves just as the used original images in his case without making (to much larger sizes in KB)? Im not using 'export all bitmaps to the worksheets' because the result is ultra heavy. I thought that its only because logic software used for the creation of ad After unchecking this option Flash will take the prepared files and use them with their sizes and formats (or jpg, png8 gifs - according to what is best in the particular case).

    That's all just ridiculous prepare the images with the lowest possible sizes to meet the specifications and limits of size of the whole creation, and then after the publication, they are replaced by heavy substitutes... WTF? You really want to send all non-programmers, non-webmasters, non-codeurs of packaging and to change trades? I have no skills of the programmer. IM used to prepare graphics and act as a query designer. With this awkward behavior of FLash CC when it comes to html5 sound simply ridiculous.

    And while I can do a workaround solution by replacing the file oversized (in KBs) with original file when they are two .png files, changing the png in compressed jpg of origin with the optimal size will get delicate - what I need to change the published scripts and html file? Seriously? Html5 cant use jpg? I don't think it's a problem... Then why the hell noone thinks about when any company ads is moving to html5? Portals custom suddenly double their size limits for ads. How do I now just huge ad campaigns? Vous attendez que quelqu'un va attendre des semaines pour que, bien que nous éditons chaque fichier html et script pour remplacer le freaking png en jpg compressé original et traiter avec des tons d’autres problèmes ?

    Edit: did not use the jpg in this case tho so maybe I am mistaken and it won't get replaced with png huge fat, but again, the files small replaced png8 with double its file size is ridiculous

    In the settings of publication under Export Options, you can uncheck that box [] images. Then, once you've optimized your images, you won't have to worry about flash crush them with larger files.

  • Move the image to one folder to another - E10

    I would like to move an image from one folder to another folder and I can't figure out how to do this.  Is this possible?  Does anyone know how?

    Thank you

    Vince

    It is not as intuitive Vince but you must drag up to navigation in folders, then release.

    I hope explains it to the captain.

    I have only one level of folders deep, but if you have folders in the folders, pretty sure that you can drag it above the folder that you want it to be, i.e. moving the image up a level.

Maybe you are looking for

  • Issue of Apple's music

    Hello What is the difference between iTunes and Apple music? It's a bit confusing... What happens to my iTunes purchases (more than a decade of a value) if I subscribe to the Apple's music? What are the benefits, if any? Thanks in advance! Carolyn iM

  • Receive error code 0 x 80070424 cannot activate Windows Firewall

    Original title: network discovery network sharing share incoming Networking incoming Remote Assistance Remote Desktop RDP TS Remote Desktop How and where can I find the error codes for the firewall the code I have is 0 x 80070424 I can't change the s

  • Clipboard problem

    When I try to copy the text or graphics on a web page I get this error "item not added: Format not supported by the Office Clipboard. This error does not every time, but when it starts, it continues every time that I try to copy, either by control/c

  • How do I restart the service manually DCRServer in LMS 4.2.3

    The DCRServer service is waiting to initialize. I stoped Daemon Manager and rebooted with no success! Even restart the server did not help! How can I restart manually? It is a virtual appliance...

  • System locked

    I have a HP pavilion dm1 given me a locked system message and the key 66619610, help