1180: call to a possibly undefined method... Perhaps?

I have buttons, that when you click on the will to instantiate in one of 3 video clips in a clip.

For example, it works fine:

b_IF_4G5_TOP.addEventListener (MouseEvent.CLICK, b_IF_4G5_TOP_add);

function b_IF_4G5_TOP_add(event:MouseEvent):void

{

var b:MovieClip = new IF_4G5_TOP();

b.Name = "IF_4G5_TOP";

layout.substrate.addChild (b);

}

but this is not:

p_conn_h.addEventListener (MouseEvent.CLICK, p_conn_h_add);

function p_conn_h_add(event:MouseEvent):void

{

var b:MovieClip = new PC_H(); <-this line generates this error: 1180: call to a method may be undefined PC_H.

b.Name = "p_conn";

layout.connectors.addChild (b);

}

Which is strange, because as you can see in the first example, I did not 'define' var b:MovieClip = new IF_4G5_TOP();

The two objects exist in the library, film clips, both targets and objects are named instruments and exists.

Am I missing something obvious? Thanks in advance for your help.

Check the name of movieclip PC_H gave as the name of the link, if yes, then check you gave no name for the same movieclip instance. If so remove the name of the instance.

or try to change the name of movieclip,

var b:MovieClip = new PC_H();

Tags: Adobe Animate

Similar Questions

  • error "call to a possibly undefined method '.

    I worked my way through the tutorials in the book 'Flash game University' of Gary Rosenzweig. Working on the game's tutorial "paddle ball", I changed the name of the file in 'PaddleBall.fla' to 'MyPaddleBall.fla' and changed the .as file name and the definition of class as a result. After that, I get the error above when you call the initialization function ("startPaddleBall()" "") the target for the .as file is set correctly. I tried to use the original file to test it; It compiles fine as long as it's called "Paddle", but as soon as I change the name of "MyPaddleBall" (or something else), it breaks. I commented all the code and replaced it with an instruction trace inside the startPaddleBall() function to see if there was something else causing the problem, but I got the same result. When all the other features are removed, the file still works, but only when called "paddle".

    Any help would be appreciated, thanks.

    -Mark

    What code you have in the fla to import the class?  The PaddleBall.as file is referred to as the document of the file class (look at the properties panel)?

  • Package of problems (Id 1061: call to a possibly undefined)

    I had a problem with not only my own code, but the code from the tutorials in books and around the ' net and it's obviously something stupid, but I can't decipher it. But by boiling the problem down to explain it, I think I have an idea.

    The problem is that my external action script classes are not correctly interpreted by Flex Builder. FB will not automatically on import declarations, don't code right to completion and complains that the properties of the class may not exist when I try to use them.

    I created two classes that are identical, except one, I created fresh and it's market, where the other is a Lite version. I have attached the code, but I don't think it's relevant.

    What I noticed, now that I have summarized, is one who does not display an icon Blue icons Black during the work. I can't seem to find a legend anywhere, and their properties, the files are identical.


    Screenshot of the problem. The AClass and other classes work very well, but Winc does not work.


    Does anyone have an idea? This has been tormenting me for awhile.

    in my case the blue icon next to the .as files means that the file is a Module, or main application and if the file has a blue icon this file is still present somewhere in the .actionScriptProperties file.
    I completely delete and recreate the project and that should fix all the problems.

  • 1180: call to undefined method possible

    Hello

    I'm coding in Flash CS4. I have a movie flv on the timeline, with a few different AS3 commands to stop. I want to be able to click on the button "continue_mc" and move to a structure later in film_mc (the mc with the FLV on the timeline). However, I get the error "1180: call to undefined method possible film_mc" I have the instance of the mc marked with 'film_mc' and the actual flv itself is called something different, so there is no confusion there. Any idea what is the problem?

    While I am - is it better to say "film_mc (905)" or "film_mc.currentFrame = 905"(si je dis film_mc.currentFrame = 905, j'obtiens une erreur 1059 disant que la propriété est en lecture seule-alors peut-être mon problème est avec le fichier flv?) ".

    Thanks for your help.

    This is my code:

    import flash.events.Event;

    hallScene_mc.visible = false;

    officeScene_mc.visible = false;

    doorScene_mc.visible = false;

    function interactiveScene(e:Event):void {}

    if (film_mc (905)) {}

    hallScene_mc.visible = true;

    }

    if (film_mc (1736)) {}

    officeScene_mc.visible = true;

    }

    if (film_mc (1928)) {}

    doorScene_mc.visible = true;

    }

    }

    continue_mc.addEventListener (MouseEvent.CLICK, continueFilm);

    function continueFilm(e:MouseEvent):void {}

    if (hallScene_mc.visible = true) {}

    film_mc.gotoAndPlay (906);

    }

    if (officeScene_mc.visible = true) {}

    film_mc.gotoAndPlay (1773);

    }

    if (doorScene_mc.visible = true) {}

    film_mc.gotoAndPlay (1929);

    }

    }

    Hi again...

    If (hallScene_mc.visible = true)

    {

    film_mc.gotoAndPlay (906);

    }

    You are wrong here: Watch how you do your test. The above code is trying to "assign" the Boolean 'true' to

    visible... This is the correct way:

    If (hallScene_mc. Visible is true)

    {

    film_mc.gotoAndPlay (906);

    }

    And here we are again:

    function interactiveScene(e:Event):void {}

    If (film_mc (905)) {}

    hallScene_mc.visible = true;

    }

    Correct way:

    function InteractiveScene(e:Event):void

    {

    if(film_mc.currentFrame == 905)

    {

    hallScene_mc.visible = true;

    }

    }

    If you want to compare two values, use "is".

    Use '=' to assign values...

    Best regards

    Peter

  • 1180: call to a method may be undefined addFrameScript.

    I have a fla file, it has been linked with external pacakage file this a document class

    It was called by the property inspector. When I try to do a code in the first picture it shows

    This error [1180: call to a method may be undefined addFrameScript.];

    Should I type the code in the time line what should I do?

    pls help me it is too urgent

    Thanks in advance

    You are welcome.

    Please mark this thread as answered, if you can.

  • Error: 1180: call to a method may be undefined application_creationCompleteHandler.

    Hello

    I am currently working on a Flash Catalyst project. The project was works very well (created buttons and assigning everything) and I added a new page and changed my (default state) and then added an interaction to change my status to "start" to my State "world map". I implemented the start state, add transitions and went to test. This error appeared:

    "Flash Catalyst cannot run this project because of an error in the code. To find the error, switch to the workspace Code and look into the Panel of problems. »

    Under the workspace of code, this is the error:

    Description: 1180: call to a method may be undefined application_creationCompleteHandler.

    Resources: Main.mxml

    Path: project/src

    Location: line 2

    Type: Flex problem

    It is located at the end of line 2 after the size of the width. I noticed other projects flash catalyst I did do not have this bit of coding on it.

    creationComplete = "application_creationCompleteHandler ()" "

    I tried to come back, removal of the "getting started" page, I added and trying to revive the project and the same error is there. I also tried to publish the project and that gives me the same error and only produced a few files in the folder "deploy-to-web", but several files missing.

    In the workspace 'code' you cannot change the code at all (so this workspace is not useful outside the preview of the code).

    I have to just restart my project or is it repairable? How can I avoid this error in the future? I tried to reproduce this problem by adding the same page 'start-up' to another similar document and it worked perfectly, and this error has not been created.

    Thanks for any help,

    Timothy Whalin

    This problem is caused by an underlying bug in the catalyst. But you may be able to fix your project as follows:

    1. Add one to start the Application > interaction play Action Sequence
    2. Delete the above interaction
    3. Add a new page/state
    4. Add one to start the Application > play Transition to [State]

    Maybe it's enough to get your project into a viable State.

    -Bear

  • 1180: call to a method maybe not defined Loader.  ???? WHY?

    Here's my class I'm trying to load a jpg it's show error!

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

    1180: call to a method maybe not defined Loader.

    package
    {
    import 12345678910111213import
    import flash.net.URLLoader
    import flash.net.URLRequest
    import flash.display.MovieClip

    public class imageloader extends MovieClip
    {
    var imgLd:Loader = new Loader() < it is showing error 
    public void imageloader()
    {
    }
    public void showIMG (img)
    {
    imgLd.load (new URLRequest("Images/"+img))
    addChild (imgLd)
    }
    }
    }

    URLLoader and loader are two different animals... use...

    import flash.display.Loader;

  • Fatal error: call to undefined method tNG_fields::tNG_fields() - after reappattage WAMP

    Hello

    Recently I had to replace my computer with a new one. Always running on XP, I got the old primary HDD as secondary in the new. MEASURE with WAMP worked very well in the earlier version of the system where as with the variation on I entered a series of questions.

    Here are the details of the version:

    The old Wamp version details:
    Wamp2.0
    phpMyAdmin2.11.6
    apache2.2.8
    PHP5.2.6

    A new:
    Wamp2.0
    phpmyadmin3.2.0.1
    Apache2.2.11
    PHP5.3.0

    MEASURE - 1.0.1.

    Now all my previous MEASURE used files as well as the new shows the error:

    Fatal error: Call to undefined method tNG_fields::tNG_fields() in C:\wamp\www\quote\includes\tng\tNG_insert.class.php on line 30

    I checked the configuration of PHP and extensions in comparison to the former. They seems to be okay.

    No idea what caused this chaos?

    Thank you

    Jay

    I had exactly the same problem, has nothing to do with your appz that have to do with the new version of php 5.3, I did a test where I have installed two versions of php 5.3 and 5.2.9 when I switched to 5.2.9 it worked as soon I went to 5.3 I got the error, what looks like uninstall is not compatiable with 5.3 or more.

  • GotoSlide WidgetFactory undefined method?

    I'm building a widget using the factory API 5.0 widget.

    I call "gotoSlide (5);" and get:

    1180: call to a method may be undefined gotoSlide

    I have widgetfactory import. StaticWidget and it shows the method in blue (code indicators), but does not compile without error.

    I tried inside a conditional statement (if that) (isCaptivat5), but still will not compile without error and accidents widget in Captivate.

    Is there some other issue I'm dominant?

    Hi merobertsjr,

    The gotoSlide() method has been added to WidgetFactory until version 5.1 (the one just after 5.0).

    Do you think you can download the latest version, set up, and then see if that solved the problem?

    Here is the download link: http://code.google.com/p/widgetfactory/downloads/list

  • undefined method rotatedGradientMatrix?

    I don't understand what I'm doing wrong.  I have a UIComponent and wanted to create a roundRect using a rotatedGradientMatrix.  According to the documentation, there should be a horizontal, vertical gradient, rotation matrix.  For some reason, I get an error:

    1180: call to a method may be undefined rotatedGradientMatrix.

    It works very well with horizontal and vertical...
    this.drawRoundRect (0,0,W,H,3,Colors,Alphas,rotatedGradientMatrix (0,0,W,H,45));

    HM...

    UIComponent not a sub-class of ProgrammaticSkin... so not.

    Click Show methods inherited in docs and you will see all the methods and properties. This method is protected by ProgrammaticSkin.

  • How to call the paint of another method program

    Hello

    I have a custom BitmapField that I would like to drawText, using graphics.drawText. Previously, I had no problem, that I would call setBitmap to the paint method and it would make the drawText. However, he did an infinite loop problem, so I moved it to another function, that will affect the value manually the bmp. Now, I am unable to drawText, that I placed this code in my service object. I would, however, when I select this particular BitmapField to drawText.

    For now, since another function setBitmap is not a very good option because this will call the FieldManager sublayout which I think can be a battery problem. Is there another way I can call drawText?

    What is the reason, once again, to not draw the text from inside her object?  Why must you to setBitmap() to draw the text in the first place?

    Indeed, setBitmap() inside of object causes an infinite loop (I remember this post).  However, it should not be linked to draw text in any way, nature or form.

    Check some (members) variable inside your method object and make the draw you need based on this value.  If you want your bitmapField to draw text under certain conditions, change the value of this member and invalidate(), causing object pick up the change.

    In addition, if your FieldManager sublayout a problem, there are a problem.  Look at this code and fix the bugs rather than them with all kinds of mobile code around masking.

    If you need more assistance, please post here the pieces of code (especially how you would draw the text when it worked) and we'll figure out something.

  • Access to originalScreenPublisher property possibly undefined

    Hello, get this error only when you test the application screenshare with the LCCS SDK:

    "Access to originalScreenPublisher property possibly undefined".

    Do you have an idea of what I might be missing?

    Thank you

    OK I thought about it, was to make double sure the LCCS SDK has been properly installed by following these steps:

    http://learn.Adobe.com/wiki/display/LCCs/1.2+set+up+your+developer+environment

    Problem solved.

  • 1180: call to a splice method possibly undefined.

    Hi, I get the error above, when I try to use the splice on this code:

    public void dispose(object:BlitSprite,i):void {}

    _gameModel.screen.removeChild (object);

    splice (_gameModel.bulletModels [i], 1);

    _gameModel.bulletModels [i] = null;

    }

    I'm not terrible at actionscript, I have to import something to make it work? If anyone knows the solution please let me know, thanks

    the junction is a method of the Array class, which allows the following...

    someArray.splice (startIndex, deleteCount);

    I think what you try to do it would be along the lines of...

    public void dispose(object:BlitSprite,i):void {}

    _gameModel.screen.removeChild (Object);

    _gameModel.bulletModels.splice (i, 1);

    }

  • Calling the method perhaps undefined addChild

    When I use the addChild method in my class, I got this message. Why it says error "Call to addChild method maybe not set.

    OK, that's the rationale, add that and importation of movieClip in your class...

    When you extend any existing class object that does not contain an addChild method is used, therefore, this method does not exist.

    import flash.display.MovieClip;

    extends MovieClip...

    Add these two things to your class, and then try again.

  • MouseEventExample.as, line 1 1180: call to a method may be undefined addFrameScript

    Hi. I have a question for an example of using Flash which generates an error, here - http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/MouseEvent .html? filter_flash = cs5.5 & filter_flashplayer = 10.3 & filter_air = 2.6 MOUSE_DOWN #

    and the code is at the bottom of the page, in the examples, the MouseEventExample class section.

    I created a doc AS named MouseEventExample.as, put in a folder, the same one with the file in Flash pro, see pro Flash file a document the MouseEventExample class name, but when I test the movie, I get this error - 1180 addFrameScript, presumably to line 1 of the AS file, but there is no addFrameScript it at all.

    Thanks for any help :)

    good work to find the answer here.

Maybe you are looking for