Can't get the timer to work

Hello

I'm new to AS 3. However, I find it disconcerting overall. Whenever I try to go further with her I find that I can't get what seems like simple tasks to function.

This time, I'm trying to work with the timer class. I have two layers: view and actions. In the display layer (which is below the layer actions), I have only one instance of the dynamic text. I gave it an instance name of dtDisplay.

In the layer actions, I have a keyframe and copy the following code:

import flash.utils.Timer;

function runMany(event:TimerEvent):void {}
trace ("runMany (called") + getTimer() + 'ms');
}

var myTimer:Timer = new Timer (25000,1);
myTimer.addEventListener (TimerEvent.Timer, runMany);
myTimer.start ();


dtDisplay.text = "haha."


What I want to achieve with this code, is 25 seconds, then the dynamic text applied to the control.

However, when I run the flash file, I get an error on the line with myTimer.addEventListener:

"1119: access of possibly undefined property Timer through a reference with static type class."

Now, I think that this could be related to my class path. I set the class path to have two values:

c:\Program files\Adobe\Adobe Flash CS3\en\Configuration\ActionScript 3.0\Classes
C:\Program Files\Adobe\Adobe Flash CS3\en\First Run\Classes\mx\utils

The second path has at least the part "utils" of the declaration of import at the top of my body. However, when I look at the utils.as, I don't see any reference to a timer class.

I searched timer on my hard drive in the form of files that contains the class, but can't.

Someone at - it ideas? Thank you.

Hey!
instead of myTimer.addEventListener (TimerEvent.Timer, runMany);

myTimer.addEventListener ("timer", runMany);

This error dialog box said you, was that it has no property of timer, TimerEvent.
(TimerEvent.TIMER there, I don't know what he does (I'm new too) AS3 is very particular about things like that)

If your parameter of function (event: TimerEvent) disagrees, try (event: Event) or (e: Event)

Tags: Adobe Animate

Similar Questions

  • My new system see the the old system in the network, but I can't get the passwords to work and I tried all the. Now what?

    ESTABLISHING A NETWORK.

    My new system see the the old system in the network, but I can't get the passwords to work and I tried all the. Now what?

    Hello

    1. don't you make changes on the computer before the show?
    2. what version of operating system you are using on the computer?
    3. which network you're talking about (home wireless network or group)?
    4. which steps have tried?


    If you use a group home on the computer, see the link for more information.
    Home Sweet homegroup
    http://Windows.Microsoft.com/en-us/Windows7/help/home-sweet-HomeGroup-networking-the-easy-way

    You can also check out the link.
    Microsoft's strategy concerning lost or forgotten passwords
    http://support.Microsoft.com/kb/189126

     
    Provide us more information for you to help.
  • MG6320 on Mac - can't get the installer to work

    I can't get the installer to work, fails to connect to the printer without wireless or wired. However, the Apple system preferences printer box can find the printer, allowed me to install the Apple driver, and I can print. I can also scan but only by using the Apple software. What should I do to get the additional applications provided with the printer to work, and why the all-in-one installer driver does not work?

    I am running Mac OS X 10.7.5, no firewall problems.

    Thank you!

    Hello.

    Please try to download the latest drivers for Mac OSX and software on our Web site.  These items can be downloaded from the following link:

    http://www.USA.Canon.com/Cusa/support/consumer/printers_multifunction/pixma_mg_series/pixma_mg6320#D...

    If additional information is required, please call us at 1-800-OKCANON.

  • Acer Aspire TimelineX 1830 68U118-t with a new hard drive. How can I get the bluetooth to work?

    I have an Acer Aspire TimelineX 1830 t-68U118.  The original hard drive died, so I replaced it with a new hard drive.  I loaded Windows 7 x 64 and loaded the chipset drivers and the network drivers.  The laptop is always my bluetooth equipment (even if I loaded the drivers Atheros).  Does anyone else have this problem?  How can I get the bluetooth to work?

    It would probably depend on the status of the warranty of the system.

    You must contact the service for options.

  • I have reinstalled 7home premium windows on my computer laptop samsung R540 laptop came preinstalled w/a webcam. How can I get the web cam work?

    I have reinstalled 7home premium windows on my computer laptop samsung R540 laptop came preinstalled w/a webcam. Once windows 7 has been installed, the web cam never came. I ran the update of windows the cam came, but only 2 of the 3 components have been installed. How can I get the web cam work?

    By visiting the support Samsung to get the drivers win7 and app photo, specific to your model.

    But assuming you used all the recovery of the samsung cd driver & the camera application should be installed in any recovery process.

    http://www.Samsung.com/us/support/owners/product/NP-R540-JA02US

    Do not use windows update for drivers, especially drivers for laptop

  • Bought Lightroom CC for 2 devices.  One installed fine but can not get the LIBRARY to work on the 2nd unit.  2nd camera, it is the menu bar, but nothing other than a gray screen, 1 device has all the tools.  If anyone can help.

    Bought Lightroom CC for 2 devices.  One installed fine but can not get the LIBRARY to work on the 2nd unit.  2nd camera, it is the menu bar, but nothing other than a gray screen, 1 device has all the tools.  If anyone can help.

    Thanks Tanuj,

    After reloading the software it seems to work now.

  • How can I get the time and date appears on a sony cyber-shot camera

    How can I get the time and date appears on a sony cyber-shot camera

    Hi terpmarty,

    What is the model number of the Sony Cybershot camera?
    Instructions for superimposing the date and time are model specific. Some models do not have the ability to superimpose the date and time too. In such a case, you can use the supplied software Picture Motion Browser (PMB) or PlayMemories home (WPH) (Compatible with the Windows operating system) to print the date and time on pictures.

  • Can't get the Time Capsule network to see Airport Extreme?

    I have a network set up through my Time Capsule and I want to express with my Airport Extreme, the problem is that I can't get the network to see Airport Extreme - or rather, we'll see, but when I try to connect to it, it starts to connect, and then I get an unexpected error. I tried to restore both their factory settings and did a restore forced several times to the Airport Extreme, but nothing helped. I made sure to affect my IPv6 link-local only, I've even re-created my network several times (always with the Capsule of time as the main base station, but nothing seems working.

    Any ideas would be very useful.

    The Airport Extreme and time Capsule have been purchased during the last month, and I'm under OS10.11.1

    First of all, try to update your software El Capitan to the current version of operation... 10.11.4... which was supposed to solve some of the bugs that cause the message "unexpected error".

    If still no help, try using an iPhone or an iPad for the configuration.  After the back if you don't know how to proceed.

  • How can I get the time to a server in JavaScript? Thank you

    Hello I have implemented a JavaScript from Adobe that expire after a certain date. However, the script asks both on the computer that can be changed. I thought that maybe I could get the time from a server NTP, NIST, which cannot be changed. However, I can't understand how to call and get the time server using JavaScript. I heard that JavaScript is client-side, but there is also a side server as well. Is it possible to code in Adobe Acrobat DC? I heard also that time of the OS is different maybe through Microsoft server. Could I get the OS somehow time?

    I've tried ActiveXObject which doesn't seem to work and in a desperate trial of windows.open ("Internet address"). Other thoughts on attempts? Thank you very much!!!

    Other strategies are also welcome having the exact time of the real.

    -Christmas

    The main problem with anything that is based on JavaScript is that it can be turned off easily, in order to place you in the document code will not work. Or a PDF Viewer that can't stand not JavaScript can be used. A form can submit to a server that can return a response that could include the current time.

  • Satellite C660 - 18 c - can't get the microphone to work

    So, I couldn't get the microphone to work so I bought a new one. I also can not get this to work. I tried everyway I can think of and he will simply record is not all sounds and yes the microphone is on and the volume is full.

    Can someone please help me solve this? Its driving me crazy!

    Hi belthazora,

    Just to make sure that we are talking about an external microphone that you have connected to the microphone jack and not internal? I ask this question because the laptop doesn't have the internal mic.

    Anyway, if you use an external microphone ensure that it s listed in sound devices under the recording tab. You see it there?

    I also recommend an update of audio driver if it doesn t work. You can download all the updates on the official page of Toshiba:
    http://EU.computers.Toshiba-Europe.com > support & downloads > download drivers

  • HP 2000 369WM reinstalled windows 7 and can't get the wireless to work

    My laptop is the 369WM of 2000 hp and I had problems, so I reinstalled windows 7. Come to find out that I can't get the drivers from the hp support site to work. My network controller IDS are

    PCI\VEN_1814 & DEV_5390 & SUBSYS_1636103C & REV_00
    PCI\VEN_1814 & DEV_5390 & SUBSYS_1636103C
    PCI\VEN_1814 & DEV_5390 & CC_028000
    PCI\VEN_1814 & DEV_5390 & CC_0280

    So I was wondering if somebody could helpme out. I can not turn on button F-12 (wifi) or still does not reach my home wifi without using my wireless desktop usb thing (which is temporary), I saw a few posts of the forum on the ID and having a card or something, but I didn't know what to do.

    Thanks in advance, Austin

    Hi, Austin:

    Here is the link to the latest version of the driver for the card your laptop Wireless:

    http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en&cc=us&prodTypeId=321957&prodSeriesId=5229455&prodNameId=5229457&swEnvOID=4059&swLang=13&mode=2&taskId=135&swItem=ob-116957-1

  • Can not get the camers to work

    original title: ca ot get the camers to work

    Cannot get the camera memory card to work

    Please explain exactly what you have already tried.

    The info might be worth a visit:

    Apparently, you have an external or internal USB media player?

    Insert the memory card into the correct location on the media player...
    If open windows... Close them.

    When the card is inserted... If you go to... Start / computer... is
    player card on one or several removable disks?

    Removable (e :)) drive
    Removable disk (e :))
    Removable drive (g)

    If_Yes_you can download photos from there. Left click
    the drive letter that corresponds to the SD card slot should
    display the directory of the card and you can copy and paste or
    Drag and drop the photos of your choice in a folder on your hard drive
    drive.

    Just a select group of photos do a right-click and choose... Copy...
    then navigate to the folder that you want, and then right-click the
    folder and choose Paste.

  • HP ENVY Phoenix 810-160: I can't get the sound to work

    I just got the

    HP ENVY Phoenix 810-160 and I can not for the life of me get the sound to work.  I use it with a HP Envy 23 inch monitor which also has audio Beats and a HDMI cable connection.  I went through all the steps on the support page of the monitor and desktop support page.  Any help out there?  Thanks in advance.

    Hello

    No, it's going to work, you can not connect computer Office AiO 23 and get a sound of the AiO 23.

    Kind regards.

  • Windows 7 Desktop w/printer, my desktop XP in network computer, cannot print bc I wonder for the current print driver, I got a current version, but it does not recognize it? How can I get the printer to work?

    I have a desktop computer Windows 7 connected to an HP laserjet 4050N printer, when I try to print from a computer to Office XP, via the network, I wonder for an updated printer driver.  I downloaded the latest print driver, but it does not recognize the file inf and again requests a current print driver.  How can I get the XP desktop to print on the printer connected to the Windows 7 Desktop?

    Hello

    I suggest you to follow the steps mentioned below and check if it helps.

    Method 1:

    Printer in Windows problems:

    http://Windows.Microsoft.com/en-us/Windows/help/printer-problems-in-Windows

    http://h20000.www2.HP.com/bizsupport/TechSupport/DriverDownload.jsp?prodNameId=18322&lang=en&cc=us&TaskID=135&prodTypeId=18972&prodSeriesId=25475

    For your reference: How to use Windows XP to share a printer with other people on your network: http://technet.microsoft.com/en-us/library/bb457001.aspx

    http://TechNet.Microsoft.com/en-us/library/bb456988.aspx

    To connect to a printer on a network: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/print_connect_net_printerw.mspx?mfr=true

    Hope this information is useful.

  • I recently reinstalled windows xp on my dads pc, and I can't get the sound to work

    IM hard to get the sound to work on my dads pc. I reinstalled windows xp after a virus wiped out, and when I go to the Device Manager, all audio drivers are listed. They all work correctly according to the Manager of devices, but under "other devices", there are several things that are listed with icons of yellow question mark next to them. IM wondering if maybe the problem with these "other devices", rather than the sound itself.

    try to update the drivers on the yellow icons, double-click on the "peripheral" and discover the status of driver.

Maybe you are looking for