1046: type was not found or is not a constant of compilation: [flashx.textLayout.elements]: IFormatResolver, error. Help?

If im working on a project and this error keeps happening and I have no idea why. Does anyone know how can I fix? For now I was just opening an old version of the file and copy and paste my changes in it, but it is extremely time consuming and I was hoping that he could be another faster way around that. If someone could just tell me what could be the cause of what would be a great help.

Im working in Flash CS6 with AS3

1046: type was not found or is not a constant of compilation: [flashx.textLayout.elements]: IFormatResolver.

Well by going to settings publish Flash I realized that everything what happened past the Flash version he published as Flash player 9 Flash player No 11.4. I went on it and the error message no longer appears.

Thanks for your help Ned.

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: type was not found or is not a constant of compilation: URLRequest.

    Hi all!

    I'm having a little difficulty with ActionScript 3 and I was wondering if someone could help me.

    I'm new to Flash CS5 and AS3, but I tried to create a sample track (originally single) application that allows the user to click on an image to start/stop an mp3, I had the initial sorting script where the button could toggle to go and stop the mp3. I tried hard for weeks, but as soon as I tried to package (to allow additions future script effects) he threw it to the top of the following error:

    C:\Users\Alice\Desktop\Prototype\com\app\Application.as, line 57

    1046: type was not found or is not a constant of compilation: URLRequest.

    Here is the code for the Application.as package

    package com.app {}



    to import flash.display.SimpleButton;

    import flash.media.Sound;

    import flash.media.SoundChannel;

    import flash.events.Event;

    import flash.display.MovieClip;

    import flash.events.MouseEvent;

    import flash.display.Sprite;

    import flash.net.URLLoader;


    SerializableAttribute public class Application extends MovieClip {}



    public var flag: Boolean;


    public void Application()

    {

    bozeat.addEventListener (MouseEvent.CLICK, bozeat_button_Handler);

    flag = false;

    }



    public void bozeat_button_Handler (e:MouseEvent): void {}


    bozeat_snd.load (new URLRequest ("drums.mp3"));

    if (flag == false) {}

    bzChannel = bozeat_snd.play (0, int.) MAX_VALUE);

    flag = true;

    trace ("true");

    { } else if(flag == true) {}

    bzChannel.stop ();

    flag = false;

    trace ("false");

    }

    }


    This is the error #1046: he keeps pointing me:

    bozeat_snd. Load (new URLRequest ("drums.mp3"));

    And here is the code for the .fla file

    import com.app.Application;

    App: var app = new Application();

    I named the document class for

    com.app.Application

    My mp3 is

    with an instance name of bozeat_sound drums.mp3

    I hope someone understands what I'm talking about lol. Sorry for the hassle for any help in advance thanks

    Alice19Eighty8

    You did not import flash.net.URLRequest

  • 1046: type was not found or is not a constant of compilation: Point.

    It worked yesterday so I have not what happened today?

    In the document class, I have a main swf with the 'Hero' inside mc

    1046: type was not found or is not a constant of compilation: Point.

    package {}

    import 12345678910111213import;

    import flash.display.MovieClip;

    import flash.media.Sound;

    import flash.events.Event;

    import flash.ui.Mouse;

    import flash.events.MouseEvent;

    import fl.transitions.Tween;

    import fl.transitions.TweenEvent;

    fl.transitions.easing import. *;

    import proyectos.trivia.TriviaEvent;

    public class game1SunnyWalk extends MovieClip {}

    private var v: Number = 5;

    varObject:String private var;

    i: Number private var;

    arrayObjects:Array private var;

    soundClip:Sound private var;

    randomnumber:Number private var;

    public void game1SunnyWalk() {}

    stage.addEventListener (MouseEvent.CLICK, myClickReaction);

    / / fill array and initialize the variables i and varObject

    this.arrayObjects = ["one", "two", "three", "four", "five"];

    this.i = 1;

    this.varObject = arrayObjects [i-1];

    }

    / / trace (varObject);

    / / speeds along the HYPOTENUSE

    / / point of mouse click

    var clickPoint:Point = new focus();

    public void myClickReaction(e:MouseEvent):void {}

    clickPoint.x = this.mouseX;

    clickPoint.y = this.mouseY;

    addEventListener (Event.ENTER_FRAME, onEnterFrame);

    addEventListener (Event.ENTER_FRAME, enterFrameHandler);

    }

    You must add

    to import flash.geom.Point;

  • 1046: type was not found or is not a constant of compilation

    I am creating a Flash game and I'm at the point where I am trying to add blocks to my platform but want to do by script so that I can tell him where to place them on the stage rather than my having to do it manually. However, I now get the following errors and the code on mygame.as:

    1046: type was not found or is not a compilation constant: rect2020.
    var newObject:rect2020 = new rect2020();

    1180: call to a method may be undefined rect2020.
    var newObject:rect2020 = new rect2020();

    I mygame.fla in the library a movieclip to rect2020 which is essentially a 20 x 20 image I had created in fireworks and imported into the library. Is there something special I need to do? my code is attached:

    You must assign a class name to the element in the library. Did you do that? If not, then right-click on it in the library and select the binding element in the menu. In the interface that appears, select the export for actionscript option and the name of mc should automatically fill in the class field. Remember, it is that your code calls (rect2020).

  • 1046: type was not found.

    I tried to insert a clock in an ActionScript file, but it came out wrong. Specifically, it gave this error:

    1046: type was not found or is not a constant of compilation: TimerEvent.

    I'm not experiented it rules of Object Oriented programming, so it's a bit difficult to find errors.

    -Kasper

    Try:

  • 1046: type was not found or is not a constant of compilation: ResultEvent.

    I get this error message with my code:

    1046: type was not found or is not a constant of compilation: ResultEvent.

    The code that causes the error is line 10:
    private void checkLogin(evt:ResultEvent):void

    Help, please!

    I think you are missing import for ResultEvent statement.

    TIP: Hover your mouse coursor just after the word ResultEvent and then do ctrl + space, FB will insert the statement import for you.

  • Error in the ActionScript 3: 1046: Type was not found or...

    Hello

    I am completely new to the FLAS and AS3. I am creating an opacity slider by using the slider. I found a similar tutorial and tried to change it to fit to my needs opacity. In line 8 (function opacityChange (event: SliderEvent): void {}) I get the 1046 error message. When I test in Flash the cursor flashes on light up very quickly too. Although I searched, I am clueless as to what is the problem.

    Any help will be appreciated.

    Thank you!!

    importfl.events.SliderEvent;

    percent_txt. Text = "% opacity: 0 '. » ;

    Slider.Value = 0;

    slider.addEventListener (SliderEvent.CHANGE, opacityChange);

    function opacityChange (event: SliderEvent): void {}

    percent_txt. Text = "% opacity:"+ event.target.value; "

    logo.Alpha = event.target.value;

    }

    This should be:

    import fl.events.SliderEvent

    (and you need a slider component in your library or you will raise and 1172 error):

    1172: definition fl.events:SliderEvent could not be found.
  • 1046: type was not found or is not a constant of compilation: SQLConnection.

    Appologise I posted this earlier and thought I had fixed it, but I did not

    I'm trying to update, insert, drop etc tables in a database from a class file.

    The class file is called from a fla not an air application and when I try and run it I get the error 1046 on each instance of sql related, he claims that my imports are defined. Is there an Air application to access a database?

    If what I'm doing wrong. These are my imports

    import flash.events.SQLErrorEvent;
    import flash.events.SQLEvent;
    import flash.data.SQLConnection;
    import flash.errors.SQLError;

    And I try the basics:

    var updateStmt:SQLStatement = new SQLStatement();
    updateStmt.sqlConnection = conn;
    updateStmt.addEventListener (SQLEvent.RESULT, updateHandler);
    updateStmt.addEventListener (SQLErrorEvent.ERROR, errorHandler);
    updateStmt.text = "statement;
    updateStmt.execute ();

    function updateHandler(event:SQLEvent):void {}
    trace ("updated successfully");
    }
    function errorHandler(event:SQLErrorEvent):void {}
    trace (Event.Error);
    }

    It fails on every line with SQL in it.

    Any help would be appreciated, I don't want to make the file an Air application

    Thank you

    Yes.

  • Type 1046: Type was not found or was not a compilation constant: NetworkInfo

    Hello

    All started to play with the new AIR features NetworkInfo and NetworkInterface, but cannot build...

    This is the example that I started by: tourdeflex

    But these lines cause errors:

    var networkInfo:NetworkInfo = NetworkInfo.networkInfo;
    var networkInterfaces:Vector.<NetworkInterface> = networkInfo.findInterfaces();

    Looks like this isn't the construction with the last AIR2, although my app.xml looks OK:

    <? XML version = "1.0" encoding = "utf-8" standalone = 'no '? >
    " < application xmlns =" http://ns.Adobe.com/air/application/2.0 ">

    And my Build of Flex is:

    c:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.0.0

    Any ideas on how to solve it?

    Thank you very much

    Frank

    AIR 2 is not delivered with Flash Builder 4.0.0. FB currently has 1.5. On AIR dev tools page http://www.adobe.com/products/air/tools/ you can find this link http://kb2.adobe.com/cps/495/cpsid_49532.html which explains how to use the AIR SDK by copying and then superimpose the required files. The 1.5 reference docs, but they apply to 2.0.

    Once you've done that, add the new SDK in FB under preferences > Flash Builder > installed SDKS and point your project to the new SDK.

    Jason San Jose

    Software engineer, Flash Builder

  • 1046: type was not found or is not a constant of compilation: charger.

    How to solve this error? I'm a little lost here (again)...

    This is my code:

    loader.addEventListener (ProgressEvent.PROGRESS, onProgress);

    loader.addEventListener (Event.COMPLETE, onComplete);

    function onProgress(e:ProgressEvent): void

    {

    var loaded: number = loader.bytesLoaded;

    var total: Number = loader.bytesTotal;

    preloader_mc.scaleX = 1-(load/total);

    }

    function onComplete(e:Event): void

    {

    removeChild (preloader_mc);

    removeChild (loadLogo_mc);

    }

    Kind regards!

    Fernandes

    You probably have a lot more errors in your code if this is the case.  What I gave is a must have, so if he has only increased your errors, this means that fixed an error allowed for many other errors which have not yet been disclosed to appear.  The compiler often generates errors in stages, not all at once.

    If you need help to create a preloader, here is a link to a tutorial that should help you...

    http://www.gotoandlearn.com/play?ID=85

    It allows to display the full error messages you get.  They help to give an idea of where the problems lie.

  • src\starling\textures\ConcreteRectangleTexture.as, line 49 1046: Type was not found or is not a compilation constant: RectangleTexture.

    Framework of Starling showing this error in flash professional cs6

    I tried to run the simple code starling. My journey has been authorized.

    package

    {

    import flash.display.Sprite;

    Import starling.core.Starling;

    [SWF (width = "400" height = "300", frameRate = "60", backgroundColor = "#ffffff")]

    Game/public class extends Sprite

    {

    private var _starling:Starling;

    public function Startup()

    {

    _starling = new Starling (game, Stadium);

    _starling. Start();

    }

    }

    }

    Post in the forum of starling.

  • 1046: type was not found or is not a constant of compilation: event.

    package {}
    import flash.display.MovieClip
    import flash.display.MovieClip
    import flash.events.Event
    import flash.events.MouseEvent
    import flash.events.KeyboardEvent
    import flash.ui.Keyboard

    public class maintest extends MovieClip {}
    private var Lahat: MovieClip = new allAnimals();

    public function maintest (): void {}

    stage.addEventListener (event. ENTER_FRAME, mgaanimal);

    {
    function mgaanimal(evt:event):void {}
    evt. Target.x = stage.stageWidth / 2
    evt. Target.y += 8
    lahat.gotoAndStop (Math.ceil (Math.random () * 6) + 1);
    this.addChild (lahat);

    }
    }
    }
    }
    }

    can you help me with this plss?

    You use "event" where you should use "Event".

    lahat.addEventListener (event. ENTER_FRAME, mgaanimal);
              
    {
    function mgaanimal(evt:__Event_):void {}

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

    Hi all

    It's driving me crazy and I can't understand it.

    This is my code

    package ShoppingCart.Model
    {
              // IMPORT STATEMENTS
              import flash.events.EventDispatcher;
              import ShoppingCart.Model.DataModel;
              
              [Bindable]
              public class ShopViewAdapter
              {
                   // VARIABLES
                   public var dispatcher:EventDispatcher;
                   public var dataModel:Datamodel;
                   
                   public function ShopViewAdapter()
                   {
                        
                   }
              }
    }
    

    Any help please?

    Thank you very much

    DataModel is badly spelled - there should be DataModel - capital M (unless the class name is Datamodel, in which case it is misspelled in import)

  • 1046: type was not found or is not a compilation constant: void.

    Stop();

    addEventListener (Event.ENTER_FRAME, abc1);

    function abc1(e:Event):Void {}

    gotoAndStop (10);

    }

    Here's what I copied under the compile error

    function abc1(e:Event):Void {}

    I have no idea why this is happening):

    Sub must be lowercase.

Maybe you are looking for