1061 call to a method may be undefined for addEventListener a static type reference Class

import flash.events.MouseEvent;

import flash.net.URLRequest;

import flash.net.navigateToURL;

var getContactPage:URLRequest = new URLRequest ("http://www.mycontacturl.html" ")

Contact.addEventListener (MouseEvent.CLICK, ContactClick);

function ContactClick(event:MouseEvent): void {}

navigateToURL (getContactPage);

}

Any help would be appreciated

Thank you

The message makes it sound like Contact is the name of a class, not an instance of an object name.  Make sure that you name the object with a class name.

Tags: Adobe Animate

Similar Questions

  • Symbol "LoseMessage", "Reset_btn", image1, 15 1061 line: call to a method may be undefined

    Hi I have a game set in place, when exhaust you your life it takes you to a screen to lose (symbol), on this screen, I have a button called Reset Game.

    The name of the button is 'Reset_btn '.

    The button instance's "resetbtn".

    I have the code in the symbol, and I get this error:

    Symbol "LoseMessage", "Reset_btn", image1, 15 1061 line: call to a method may be undefined for addEventListener through a reference with static type class.

    Here is my code:

    The button Reset code
    resetbtn.addEventListener (MouseEvent.CLICK, Reset_btn);
    function Reset_btn(event:Event):void
    {
    gotoAndStop (1);
    }


    I gave my button and the instance name and a name for the button, why am I still get this error, can anyone help?

    Casey

    As I mentioned in my last response, this isn't how you assign an instance name to an object.  Delete what you have done for this button in the library.  Select the button on the stage inside the movieclip and in the Panel properties assign it as the instance name where it say .

  • 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

  • Call to a method may be undefined

    Hello
    I am very new to Flex but made Actionscript Flash for a while now. I can't for the life of understand me why I get the error message "calling a method maybe not set" when you include actionscript code in my mxml file. For example, I have the following in a mx:script tag.

    public void testName() {}
    do nothing
    }
    testName();

    But when I try to compile, it complains that testName is not defined. I can compile the mxml file very well without these lines of code. I know the answer to this is probably something that everyone except beginners but I can't. Thanks for any help.

    You must wrap your call to testName() in an event, it cannot be simply put in a Script tag. Call it SO, in the Application CreationComplete, initialize, etc.. Or call from an object such as a button and the onClick event.

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

    HI - I get the following error in one of my classes and not too sure why? Would be recognizing some lights

    package {}
    import flash.display.Loader;
    import flash.net.URLRequest;
    import flash.events. *;
    import flash.display. *;

    import flash.display.MovieClip;

    SerializableAttribute public class LoadActivities extends MovieClip {}
    public class LoadActivities {}

    public var isACoin:Boolean;

    public void LoadActivities (game): void
    {

    var loader: Loader = new Loader;
    loader.contentLoaderInfo.addEventListener (Event.COMPLETE, handler);
    Loader.Load (new URLRequest (game));
    }
    public void handler(e:Event):void
    {
    var mc:MovieClip = MovieClip (e.target.loader);
    addChild (mc);
    }

    }
    }

    If you have a new problem, you should start a new assignment... in this case mainly because class implementations are not a strong point of mine... I understand enough to be dangerous.

    In this case, apart from not being a good interpretter of what appears to be Spanish, I would take a hypothesis that you may need to specify the data type of the game argument that you pass to the function...

    public void LoadActivities(game:String): void

  • 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.

  • error1180: call to a method may be undefined myButton_mc.

    Hello

    I am creating a menu (possibly in two rows of three buttons) here's code so far:

    the pages are available on the timeline to 10, 11 12 (13 14 15).

    Stop();

    var menu_label:Array = new Array ("Homepage", "Plans", "a point");
    var total: Number = menu_label.length;
    var: page number;
    var main_menu:MovieClip = new MovieClip();
    main_menu.x = 40;
    main_menu.y = 50;
    stage.addChild (main_menu);
    for (var i: int = 0; i < total; i ++)

    {
    var BTN = new myButton_mc();
    BTN. Name = "btn" + i;
    BTN.x = i * btn.width + (I * 10);
    btn.buttonMode = true;
    BTN.item_no = i;
    btn.myClickArea_mc.addEventListener (MouseEvent.CLICK, btn_enter);
    var each_substring:Array is menu_label [i].split("|");.
    btn.myButtonLabel_mc.text = each_substring [0];
    BTN.item_url = each_substring [1];
    main_menu. AddChild (BTN);
    }
    function btn_enter(e:Event):void
    {
    gotoAndStop(e.target.parent.item_no+1);
    }

    I don't know how to download fla it is small to 9.75 kb zip format I can send if you want

    Peter

    Hi Peter,.

    I just sent back you a fla work. Do not take into account the attachment in the first email, that was my stupid brain at work

    see you soon,

    ~ chipleh

  • Call to a method may not be defined for Custom Itemrenderer Component

    Hi all

    < mx:Application >

    < mx:Script >
    <! [CDATA]

    public quiet function (): void
    {

    }

    []] >
    < / mx:Script >

    < XY = "0" mx:Panel = "0" width = "530" height = "405" layout = "absolute".
    title = "Item Renderers" >
    < XY = "0" mx:DataGrid = "0" width = "510" height = "365" >
    < mx:columns >

    < mx:DataGridColumn headerText = "Song" width = "50" >
    < mx:itemRenderer >
    < mx:Component >
    < mx:VBox verticalGap = "10" >
    < mx:Label text = "Happy" / >
    < mx:Button label = "Edit" click = "quiet ()" / >
    < / mx:VBox >
    < / mx:Component >
    < / mx:itemRenderer >
    < / mx:DataGridColumn >

    < / mx:columns >
    < mx:dataProvider >

    < / mx:dataProvider >
    < / mx:DataGrid >
    < / mx:Panel >
    < / mx:Application >

    why, I make this appeal to a quiet method maybe not set, how do I solve this problem?

    use outerDocument.callme

  • 1180: call to a method may not set...?

    Hello

    I'm doing a menu button when the mouse enters it, the rest of the menu is displayed. I wanted to simply controlling timeline of video Clip (menu_mc). I have a stop(); action at the beginning of the Clip. But alas, once more AS3 tells me I did something wrong, this is the code I use...

    menu_mc.menu_btn.addEventListener (MouseEvent.MOUSE_OVER, menuUp);

    function menuUp(e:MouseEvent):void {}

    menu_mc (root) .gotoAndPlay (2);

    }

    I am a very slow beginner. So I apologize if this is a ridiculously simple problem.

    Try:

    menu_mc.menu_btn.addEventListener (MouseEvent.MOUSE_OVER, menuUp);

    function menuUp(e:MouseEvent):void {}

    menu_mc.gotoAndPlay (2);

    }

  • 1119: access of property may be undefined onMotionFinished a static type reference

    It sounds simple enough, but it does not work. Any ideas. Here is the code

    function dunnsriverclick(Event:MouseEvent):void

    {

    If (currentSection! = "dunnsriver") {}

    var movecontent_mc:Tween = new Tween (content_mc, "x", Elastic.easeOut, 377,8, 2300, 5, true);

    var moveslider_mc:Tween = new Tween (slider_mc, "x", Elastic.easeOut, 2, 2300, 5, true);

    moveslider_mc.onMotionFinished = function() {}

    var dunnsriverDetails:Tween = new Tween (dunnsriverDetails_mc, "x", Elastic.easeOut, - 1135.85, 2, 5, true);

    }

                                     }

    }

    Declare it outside the service, but you assign it to the breast...

    var movecontent_mc:Tween;

    function...

    movecontent_mc = new Tween (...

  • The call for a getClipboardContents method maybe not defined through a reference with static type flashx.textLayout.edit:ISelectionManager.

    Hi guys,.

    As I use the Tlf 4.0.0.11073 nigtly version.

    I want to copy some text from the TLF, by the copy operation. I get this error.

    -Call to a method may not set getClipboardContents via a reference type static flashx.textLayout.edit:ISelectionManager.

    In the previous generation, I do not get this type of error, but in this nocturnal compilations, I get this error.

    Can someone help me to fix the same or all workaound.

    Thanks in advance.

    Krishna

    This feature is always available, but it has been moved. He is now in a class of TextClipboard, in the same package flashx.textLayout.edit. If you need to replace calls to getClipboardFormat() by TextClipboard.getContents ().

    Hope this helps,

    -robin

  • "The call to the method"setTextFormat"can be defined" in Air application (need help)

    Hello

    I followed a tutorial for getting started with ActionScript 3 and Adobe Flash. I'm ready to create an Air application, but I ran into a problem. The tutorial is for Flash Player, so I wonder if it also works for Air applications (sorry, I don't get quite the differences yet).

    So, here's a screenshot of the problem:

    flash_erreur.png

    The error reads: 'setTextFormat' method cannot be set via the fl.controls:TextArea static type reference

    (Sorry if it's badly translated :/)

    What I have below is a TextArea (taken from the User Interface components) and a button (same). I noticed their name of the instance that you can find in the block of the ACE.

    So since it's the same code as in the tutorial (where he works), why make this mistake? I tried many things to get rid of it, but I'm out of options now, so I ask you for help.

    Kind regards.

    Chances are the tutorial you're folowing uses a TExtField, not a text box.  The TextArea component is not supported by the setTextFormat method.  You will need to use the setStyle method to set the characteristics of the text.  Alternatively, you can use a TExtField and then the setTextFormat method could be applied

  • Method is not defined for type T

    I have a class called GernericOrder, which declares a generic type T, and I get an error with this block of code:
         public double totalCost(){
              double sum = 0;
              for(int i = 0; i < pList.size(); i++){
                   sum = sum + pList.get(i).price();
              }
              return sum;
         }
    This is the error I get:
    Exception in thread "main" java.lang.Error: Unresolved compilation problem: 
         The method price() is undefined for the type T
    pList is a list of products. I can't change the class of products (according to the rules of the assignment). How can I fix this so that I can sum up the total cost of the products?

    pList is a list of products

    So it should be declared as a, or more likely the list list and T must be reported as .

  • You can call a public method in a custom look and feel?

    I made an appearance for a button. In the skin, there is a method to change the text. Can I call this method in my application?

    I get an error message when I try to call it as a normal object:

    uploadNewBtn. setNewPhotosLabel (« test ») ;

    Error 1061: Call to a setNewPhotosLabel method maybe not defined through a reference with static type spark.components:Button.

    You said, the method is inside the skin, not the HostComponent (button in your case). Obviously you can not call it.

    There is a protperty of the skin inside the SkinnableComponent, but it is typed as UIComponent, so you can always not cal on the skin without casting. I don't know your use case, so in theory you press either on the text label / from the host to the skin, or you listen to or link of the skin on the hostcomponent.

    C

Maybe you are looking for

  • Replace hard drive SSD

    I have a 15 inch macbook pro late 2008.This came with a 250 GB hard drive that I partitioned two areas of 125 GB that appear as separate HD1 and HD2 hard drives on my desktop. I have OSX 10.5.11 the HD1 and the last OSX El Capitan on HD2. According t

  • EliteBook 2570p: EliteBook 2570p reinstall Win 7 Pro OEM

    Hi all. I replaced the HARD drive on my Elitebook2570p for SSD and I need to reinstall Win 7 Pro OEM to enable using my travel sticker located under the battery. I saw in aid of MS that we should reach to the local HP service center to do this, can c

  • Place 3:4 png on background and the economies of the 16:9

    I have several PowerPoint slides 3:4 saved in png format and the need to place each one on a background of 16:9 and to be inserted in a video. How can I do this with a batch?Thank you

  • Mutation

    Hello CREATE TABLE "SCOTT"."SALES_ORDER_DETAIL"    (    "ORDER_ID" NUMBER,   "SERIAL" NUMBER,       "ITEM_ID" NUMBER,       "PRODUCTION_DATE" DATE,     "EXPIRY_DATE" DATE,   "MAX_QUANTITY" NUMBER,     "MID_QUANTITY" NUMBER,     "MIN_QUANTITY" NUMBER)

  • Export PDF font thickness questions

    Hello worldThis is a few days that I try to understand this point, and I searched the Web a bit trying to find an answer, so far without success.Long story short, check this PDF file I exported in Indesign:http://Empain.EU/4Ltrophy/sponsoring/dossier