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

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

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

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

  • 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);

    }

  • reference not valid error 1026 to the runVI call the hand method exe-&gt; slot - VI-&gt; secondary

    Hello

    I have a main VI who Subvi inside case structures put in place to show FP when called and be modal.

    These subVIs have a secondary that will pull up a call using RunVI method dynamicVI. The dymaicVIs is built using the constant application directory + name of VI to the invoke method.

    now the main VI is built in exe with the dynamicVIs in the list always included.

    When I run the main exe I get error 1026 VI reference invalid.

    Help, please

    Thank you

    Choose the layout of the 8.X file will change the path that your screw referenced are when you build your executable file.

    http://zone.NI.com/reference/en-XX/help/371361K-01/lvconcepts/referencing_files_in_applications/

    If you choose this option of layout, you adress just the vi you are calling where having the option deselected will mimic your file structure layout it is developing.

  • Windows email will not be printed and give this message "email error unexpected call to the method"

    Windows email will not be printed and give this message "email error unexpected call to the method"

    is there a solution for this?

    Yes, I uninstalled the upgrade to IE9 and rebooted and unfortunately I can print my email again! No more unexpected call to the method.  Check my IE and it's IE8.

    Problem solved!

    Thanks for the replies.
    Neal

  • BrowserField IllegalStateException to call the RequestContent method

    Hello world.

    I'm IllegalStateException when you try to view another page HTML on my BrowserField. This happens when BrowserField Manager calls the removeField() method.

    The paper said: to remove is field with focus - index: 0 - fieldDebugTree: net.rim.device.api.ui.component.NullField (0, 0) + (0, 0) * home * \n - managerDebugTree: net.rim.device.api.browser.field2.BrowserField (0, 0) + (480, 70) [480, 70] \n net.rim.device.api.ui.component.NullField (0, 0) + (0, 0) \n

    Everyone knows that kind of problem before?

    Thanks before.

    Never mind. I found the solution to this problem after doing some more research on this forum.

    Here is the link to the post with the solution: http://supportforums.blackberry.com/t5/Java-Development/BrowserField-refresh-throwing-IllegalStateEx...

  • Several call to the method of painting

    Ask for help on one of the most common problems in the development of BB UiApp. My method of painting is called more that I can think of logicall. Ask for help to understand why its happening

    Looks like my request

    CFL extends ListField implements {ListFieldCallback}

    }

       public int moveFocus(int amount, int status, int time){        invalidate();     return super.moveFocus(amount, status, time);    }    //Invoked when this field receives the focus.    public void onFocus(int direction){        _HASFOCUS = true;        super.onFocus(direction);    }    //Invoked when a field loses the focus.    public void onUnfocus(){        _HASFOCUS = false;        super.onUnfocus();        invalidate();    }    //Handles trackball movement on all directions    public boolean navigationMovement(int dx, int dy, int status, int time){               if (dy == 0 && dx <= -1){                /*do something*/           this.invalidate();        }else if (dy == 0 && dx >= 1){                /*do something*/           this.invalidate();        }        super.navigationMovement(dx, dy, status, time);        return false;    }    public void drawFocus(){
    
        }public void paint(){  /*paint the list row and the highlight manually*/} public void drawListRow(ListField listField, Graphics graphics, int index, int y, int width) {        // TODO Auto-generated method stub    } //Not yet implemented public Object get(ListField listField, int index) {       // TODO Auto-generated method stub        return null;  } //Returns the preferred width for the control public int getPreferredWidth(ListField listField) {       // TODO Auto-generated method stub        return this.getWidth();   } //What is this one? Looks like search public int indexOfList(ListField listField, String prefix, int start) {       // TODO Auto-generated method stub        return 0; }
    

    I created the ParentScreen stretching from the main screen with a verticalfieldmanager and custom list field inserted into it with 2 other controls.

    Now when I run the app and I move the focus to the top or to the bottom of the painting, the method is called 4 times. I expect the paint method to get called time or max 2 times. , but the paint method is called 4times.

    Here is the stack trace. I am trying to understand why this is happening from the stack trace, but can not understand. Can someone explain to me. Here is the stacktrace for all 4 calls to the methods of painting. Can someone explain?

    Stack trace for 1st call to paint method-----------------------------------------CFL:paintCFL(Field):paintSelfParentScreen:doRemoveFocusParentScreen:doFocusMoveParentScreen:navigationMovementParentScreen:dispatchNavigationEventUiEnginerImpl:processMessage
    
    Stack trace for 2nd call to paint method-----------------------------------------CFL:paintCFL(Field):drawHighlightRegionCFL(Field):drawFocusCFL(LisField):drawFocusParentScreen(Screen):doAddFocusParentScreen(Screen):doFocusMoveParentScreen(Screen):navigationMovementParentScreen(Screen):dispatchNavigationEventUiEnginerImpl:processMessage
    
    Stack trace for 3rd call to paint method-----------------------------------------CFL:paintCFL(Field):paintSelfVerticalFieldManager(Manager):paintChildVerticalFieldManager:subpaintVerticalFieldManager(Manager):paintVerticalFieldManager(Field):paintSelfVerticalFieldManager(Manager):paintSelfVerticalFieldManager(Manager):paintChild
    
    Stack trace for 4th call to paint method-----------------------------------------CFL:paintCFL(Field):drawHighlightRegionCFL(Field):drawFocusCFL(ListField):drawFocusCFL(Field)paintSelfVerticalFieldManager(manager):paintChild
    

    As far as I know, invalidate will get infrastructure to call paint twice, once to paint blurred and new areas to paint the update.  Why don't you try disconnected from the moveFocus() to see what changes this causes?

    About drawFocus, you have not overridden the drawFocus at all routine, because his signature looks like this:

    protected void drawFocus (graphics graphics, boolean on)

    You have substituted him:

    Public Sub drawFocus()

  • Call the java method lunch application

    Hello

    I use JDev 12.1.3 with MAF, I want to call the java method of the project ViewController lunch application, how can I do this?

    Thank you

    Hello

    Can you explain usecase? What features do you need perform the start-up of the application?

    You can run java code in an application LifeCycleListener - https://docs.oracle.com/middleware/maf210/mobile/develop-maf/maf-apps-register-listeners.htm#ADFMF25120

Maybe you are looking for

  • Satellite L300 - driver Open Webcam fail. Restart the computer or the camera

    Hello I recently bought a new Satellite L300 under Windows Vista Home Premium SP1. The Webcam worked fine for a few days and then the next time I booted up Vista, I get the following error "Webcam driver open fail, please restart camera or computer.

  • Force close/stop

    Somewhere in all the options that I had found a place where I could choose to force close/stop certain applications after a period of time after I closed. I can't find the setting anywhere... any of you guys don't know where it is?

  • 2 has no updates: KB970892 FF, KB978338 error 800b0100 of code error code

    Hi I have re-posted my original question in the Windows Vista forum.Need a little additional help please. Michael Murphy has suggested that I have try: http://support.Microsoft.com/kb/956702Error message when you try to use Microsoft Update or Window

  • C510 printer does not print in black

    C510 black cartridges may not print.  Both are completely full.

  • EasyLink as software for an E3000

    Hello I recently acquired an E3000 and install the Cisco Connect software. I expected that the software would be an improvement EasyLink Advisor but he does not do anything. Anyone know a good free EasyLink replacement? David