1046: do not type a compilation constant: TimerEvent.

I have a simple spaceship in a fla
have this .as file
but still get the error
associated with the line "public function moveClip(event:TimerEvent):void {}".

import flash.events.TimerEvent. *;

must be:

import flash.utils.Timer;
import flash.events.TimerEvent;

Tags: Adobe Animate

Similar Questions

  • Help! «1046: type was not found or was not a compilation constant: TimerEvent.»

    I get the followiing error in my main document class:

    «1046: type was not found or was not a compilation constant: TimerEvent.»

    It shows online 47 and 54 (in red below). Any help would be appreciated. BTW, this is my first time creating a class of main document since its release to class files! :

    package

    {

    STATEMENTS IMPORT *.

    import flash.display.MovieClip;

    import com.greensock.TweenLite;

    import flash.utils.Timer;

    SerializableAttribute public class Main extends MovieClip

    {

    //***************** Variables ***************************

    / * private var appStoreURL:URLRequest = new URLRequest ("http://itunes.apple.com/us/artist/quackenworth/id518210161");

    private var facebookURL:URLRequest = new URLRequest ("http://www.facebook.com/quackenworth");

    private var twitterURL:URLRequest = new URLRequest ("http://www.twitter.com/quackenworth") ;*/

    private var MainScene:Main = new Main();

    private var PopUp_MoreApps:MoreApps_mc = new MoreApps_mc();

    private var PopUp_About:About_mc = new About_mc();

    SPLASH SCREEN *.

    private var mc_timerSplash:Timer;

    private var splashScreen:mcSplashScreen;

    //*****************CONSTRUCTOR CODE ***********************************************************************************

    public void Main()

    {

    mc_timerSplash = new Timer (3000,1);

    mc_timerSplash.addEventListener (TimerEvent.TIMER, StartTimer);

    When the timer is finished, stop the timer;

    mc_timerSplash.addEventListener (TimerEvent.TIMER_COMPLETE, timerCompleted);

    splashScreen = new mcSplashScreen();

    addChild (splashScreen);

    splashScreen.x = stage.stageWidth / 2;

    splashScreen.y = stage.stageHeight / 2;

    mc_timerSplash.start ();

    }

    //*********** FUNCTIONS *********************************

    private void timerCompleted(e:TimerEvent):void

    {

    mc_timerSplash.stop ();

    mc_timerSplash = null;

    }

    private void StartTimer(e:TimerEvent):void

    {

    TweenLite.to (splashScreen, 1, {alpha: 0, onComplete: SplashScreen});

    }

    private void SplashScreen (): void

    {

    removeChild (splashScreen);

    addMainScene();

    }

    private function addMainScene (): void

    {

    addChild (MainScene);

    MainScene.x = 489;

    MainScene.y = 350;

    TweenLite.from (MainScene.wbbIntro_mc,.5, {alpha: 0});

    TweenLite.from (MainScene, 1, {alpha: 0});

    TweenLite.to (MainScene.girls_mc, 1, {y: 395, delay: 3.});

    TweenLite.to (MainScene.boys_mc,.5, {y: 396, delay:. 6});

    TweenLite.to (MainScene.Joe_mc,.5, {y: 339, delay: 1});

    TweenLite.to (MainScene.Paul_mc,.5, {y: 322, delay: 1.2});

    }

    private function removeMainScene (): void

    {

    removeChild (MainScene);

    TweenLite.to (MainScene.girls_mc,.1, {y:690});})

    TweenLite.to (MainScene.boys_mc,.1, {y:693});})

    TweenLite.to (MainScene.Joe_mc,.1, {y:636});})

    TweenLite.to (MainScene.Paul_mc,.1, {y:619});})

    }

    }

    }

    Add a line to import the TimerEvent class:

    import flash.events.TimerEvent;

  • 1046: not a compilation constant: TimerEvent.

    I know it's simple, but I can't see what I'm doing wrong
    This is in reference to "public function moveClip(event:TimerEvent):void {}".
    any help is appreciated.
    my code is attached

    Thank you

    What is import flash. TimerEvent.Event?

    Try:

    import flash.events.TimerEvent. *;

    p.s. This should be in the as3 forum

  • Error: Type was not found or was not a compilation constant: AlertDialog.

    I tried to compile one of my PlayBook AIR applications using the SDK of AIR BB10 tonight and got:

    Error: Type was not found or was not a compilation constant: AlertDialog.

    The command I used to compile was:

    Set JAVA_HOME = e: files (x 86) \Java\jre7
    set PATH = % PATH %; E:\Program Research In Motion\blackberry-tablet-sdk-3.0.0\bin

    CD E:\Users\Daniel\Dropbox\Apps\iTunesSync\Version0.3
    mxmlc + configname = air - library-path +=. iTunesSync.as o iTunesSync.swf - swf-version = 10

    This works if I use the SDK 2.0.0, but doesn't if I'm using 3.0.0.

    Strange.

    I confirmed that AlertDialog is always present:

    https://developer.BlackBerry.com/Air/beta/APIs/QNX/dialog/AlertDialog.html#includeExamplesSummary

    In BB10, device skins (and others) require the ANE must be loaded with the installation.

  • Vector. error 1046. Type was not found or is not a type of compilation...

    Type was not found or was not a constant to the type of compilation at compile time.

    BUT I imported import flash.display.MovieClip; AMD my declaring vector variables is correct.

    private var myVect:Vector. < MovieClip > = new Vector. < MovieClip > (5, true);

    I even copy and paste from a tutorial so it is very strange.

    There is another class of as3circle used by some fla that you use to test.

    If the code you have shown was recorded at as3circle.as, try to use a new directory to save your fla and your class.  If you have not saved your code shown in this file, save it and retest.

  • Type was not found or was not a compilation constant: ImportExportConfiguration

    Hello

    I use a text layout framework and get an error type was not found or was not a compilation constant: ImportExportConfiguration. I use Flex Builder 3, Flex SDK version flex_sdk_4.0.0.10485 and flash player 10.0.12, surprisingly this not found error in my project workspace.

    In my code I am using

    Import flashx.textLayout.container.DisplayObjectContainerController;

    Help

    Thank you

    Kumar Gaurav Pandey

    You are using an older version of our code. I suggest upgrade you to the latest code, see: http://opensource.adobe.com/wiki/display/flexsdk/Flex+SDK.

    You don't need to use the Flex Framework, but it comes with the latest textLayout libraries and source code.

    Hope this helps,

    -robin

  • Error: Type was not found or was not a compilation constant: PieChart.

    Hi all

    I get an obtuse error message from the compiler again. I get

    Error: Type was not found or was not a compilation constant: PieChart.

    For the following code

    < mx:VBox >
    < mx:PieChart id = dataProvider = "{parentApplication.services.webservice.getDealData.lastResult.SeriesVO"dealsPieChart"}" showDataTips = "true" > "
    < mx:series >
    < mx:PieSeries labelPosition = "legend" field = "count" field name = "name" / >
    < / mx:series >
    < / mx:PieChart >
    < mx:Legend dataProvider = "{dealsPieChart}" / >
    < / mx:VBox >

    I don't know what I am getting this error. According to the examples that I read on the site of flex on the charts all seem fine. Any pointers welcom.

    OK - I think that I n "t have the component graph charting. It looks like a separate download. The is not going to be open comes? If this isn't the case - first bad sign for me of the authenticity of the open source moves.

  • 1046 - compilation constant: vector

    I was tring to use wavy but I get 1046 - compilation constant: vector. Any ideas?

    Could you please try this and let me know if it works?

    GoTo your project properties, select compiler Flex-> Adobe Flash player Options, the value of player version 10.1.0

    Thank you

    Ravi

  • Is there a control of the type of compilation for .as files?

    It seems that there is no support of compilation for .as files. I have made a typo, typo HttpService, instead of HTTPService, in one of my .as files, but surprisingly, Flash Builder does not report it at all. I enabled 'Build' automatically, so I guess that if there are errors, Flash Builder has the flag. I also tried to clean up the project and force to build the project manually, but still it doesn't show any compilation error problems.  See screenshot below:

    FlashBuilderAsNoCompileTypeCheck.jpg

    On the other hand, if I made the mistake in the .mxml file, Flash Builder it correctly mark as error.

    Please see the screenshot below:

    FlashBuilderMxmlCompileTypeCheck.jpg

    I want to have the type of compilation to check what work on .as files too. Is there a way I can activate that?

    Thank you.

    Your results are correct. The compiler is limited to the display of compiler errors in the context of a compilation unit (application, module, etc.).

    Jason San Jose

    Software engineer, Flash Builder

  • Firefox 4 for Mac after upgrade I can not type in the comments of several web sites area

    I've upgraded to Firefox 4 (beta very well executed) and now I can't type in the text boxes on a number of websites and surveys etc. For example on the Gigaom site I can not type comments (the name is fine, but the comments box does not work). But this is just one example. I ran across it on three other sites. Any ideas appreciated. (OSX 10.6.7, works fine on safari)

    I had a problem like this, and it is thanks to fonts that were corrupted in Snow Leopard 10.6.7. Apple has a fix on its support page.

    http://support.Apple.com/kb/DL1377

  • Satellite A200 - 1 M 4 - can not type letter h

    PC laptop Toshiba Satellite A200 - 1 M 4

    When I type on my laptop all the letters are ok but the letter h does not appear. When I restart it it will be his forte, he won't until I press the FN key, then it stops.

    Also on my space password, there will be a lot of letter h, he won't stop not type self until I press the FN key again and then it will be ok except the letter h won't work at all, and also the FN functions will not work.

    I'll be very thnkfull if you solve my problem.

    I can't tell what's exactly wrong, but I can give you some suggestions
    I think there could be something wrong with the keyboard.

    Either there is a problem with the keyboard <->the motherboard connection or the malfunctioning of the keyboard.
    I would recommend checking the laptop in ASP.

    As you know the guarantee must cover all the problems of material, so it s worth it to contact the technician of the laptop.

    Good luck

  • Tecra A9 - sometimes I can not type - click using the touch pad

    There are times that I can not type - click using the touch pad or other keys (all of a sudden without any reason)

    I can move the cursor in this case but not tap - click here to be able to click once again, I have to restart (this happens on both windows and linux)

    On windows, I press alt + ctrl + del and when the Task Manager window I can tap it and after I do I can tap - Select something else and so on.
    Click on the Task Manager click on anything else until I reboot and the problem goes away just to appear suddenly unexpectadly at the same time.

    I have the newest bios and driver accupoint

    Any tips?

    This happens only with touchpad, or when you use an external USB mouse?
    For me it looks more like the Windows operating system freezes for a short period. Is this good?

  • Shortcut - right click - Properties-'Target' - I can not type in "target".

    I just bought a dell with Windows 7 netbook. I want to install a game called Guild Wars. Like most fans of the knowledge in game, you can download the full game client and updates, by adding the command - image at the end of the "target" under properties after right click on the shortcut of Guild Wars. I managed to install the game but I can not type in the box 'target' to type - image at the end of the directory (C: / /... - imag) if anyone can help me with this problem I would really appreciate it. Once more, the question is, how can I do if I can actually type in the box "target"?

    It is compatible with Windows 7 (at least Windows 7 64-bit).

    In any case, this happens because of the way Guild Wars creates a shortcut on your desktop. What you can try to do, is make a new shortcut on the desktop and add the parameters you need in this way. Good luck.

  • Portable keyboard on Vista you will sign in with my password, but will not type after that

    * Original title: keyboard on my laptop computer vista will allow me to connect with my password, but will not type after that. I use a screen keyboard and mouse to this type. I even restored to factory settings. Always won

    My keyboard on my computer vista laptop will only sign in with my password, but will not type after that. I use a screen keyboard and mouse to this type. I even restored to factory settings. Still will not work. Checked ease of access settings and language settings, running of ideas. I tried another keyboard, failed to mention. Re-installed drivers as well. Any help would be great.

    Thanks for your reply. I tidied up my lap top for about 5 months and just used my office for awhile. One day I was in the mood to tinker around with my lap top, then when I turned it back B I N G O!  My main advice worked again. Matter of fact, I use it now. Thank you for your effort in the e-mail back me on this issue. good karma can follow you anyway yoy travels take you.

  • computer keys will not type

    Hi all

    I have a hp56 and some of the computer keys will not type - y at - it an easy solution anyone who knows very little about computers can do?   Thanks, Paul

    Hi Paul,.

    This could be a hardware problem, but it is always worth trying the following.

    Open windows control panel, open Device Manager, expand keyboards, right-click on the "Standard PS/2 Keyboard" entry and select uninstall.

    Shut down the laptop - if you're running Windows 8/8.1, do it by holding down the button SHIFT left click Shutdown to temporarily prevent a hybrid boot.

    Then disconnect the AC adapter and then remove the battery.  Press and hold the Power button for 30 seconds.  Reinsert the battery and plug in the AC adapter.

    Robinet tap away at the key esc that you start the computer to launch the Start Menu, and then select f10 to open the bios menu.  Press f5 to load the default values (sometimes it's f9, but the menu below indicates the correct key), use the arrow keys to select 'Yes' and press ENTER.  Press f10 to save the setting and still use the arrow keys to select 'Yes' and press on enter.

    Kind regards

    DP - K

Maybe you are looking for

  • At the time of install el capitan?

    How long does to install El Capitan on a MacBook Pro 2011 with 8G, from Yosemite? The notice said there 20 hours to go and then he spends 1 day and a half, etc. What is a normal view? It has already been downloaded for 1 1/2 hours and seems to be get

  • Restore slowly iPad

    I have an iPad 3 GN for the past 3 years. I support my iMac via iTunes - a secure backup. Now, if sick, remove and restore the iPad completely from my iMac, will all my preferences will be the same as before? Like now all preferences correspond to my

  • The crashing apps and battery drains quickly after updating iOS 9.2

    Well, that's what's happening: before upgrading to iOS 9.2, no app crashed, my battery lasted all day and everything was fine, but after update, applications such as Facebook, YouTube, Maps, even (Yes, stock cards, no Google or whatever it is) kept c

  • Update my video shipped to a new graphics card

    I have a hp p6347c computer with video graphics card integrated. I want to upgrade the graphics for a card HIS Radeon HD5770. Have plenty of room... able to add it to the material properly. I installed the drivers and grew up the pc. Monitor does not

  • Big Mutha Truckers will not work on windows 7, but it works on my old computer with xp.

    I can install the game but it won't play, if anyone can help I would be grateful, my 6 year old child would like to play his game