Calling the function from inside a onEnterFrame action

I have a class file called MonsterGame. Inside her, one of the methods that are called "queueAnim" creates a onEnterFrame function to wait until the current film is play before making the following visible.

That works fine, but I have certain conditions that the Main() function is called just after a certain movie is played (called "eatMovie"). Everything works except the call to Main();

I think it's a problem with SEO in the wrong place, but I don't know why.

The trace for "this should be the root name" returns "MonsterGame", which is the name of the class where the Main() method. So if this ._name returns MonsterGame and MonsterGame has Main() inside, why used Main() or that. Main() run the function?

PS: It's NOT because I remove the onEnterFrame before calling the Main(), at least I'm sure it's not because I put a trace here, and it works very well, proving that after deleting lines are always executed.

PM me if you want the link to the source code and swf file

Try the attached code. If not post a link to a zip with all the files.

Tags: Adobe Animate

Similar Questions

  • Cannot call the functions from Javascript using ExternalInterface

    Hi all, I use external Interface to call Javascript in an HTML document with an embedded flash object, but I can't call functions in the flash JavaScript object.

    JavaScript:
    function call_actionscript {}
    If (document.getElementById ('flashObj')) {}
    Alert ('object flash found.');
    document.getElementById('flash2').test_from_javascript ();
    }
    }


    ActionScript:

    package {}
    import flash.display.MovieClip;
    to import flash.external.ExternalInterface;
    import flash.events.Event;

    SerializableAttribute public class extends MovieClip {} FlashObj
    public void FlashObj() {}
    ExternalInterface.addCallback("IsStatic",IsStatic) ('test_from_javascript', test_from_javascript)
    }

    public void test_from_javascript(e:Event):void {}
    ExternalInterface.call("saveglobalscore",score) ("alert", "javascript test received in actionscript!")
    }
    }
    }

    Call the "call_actionscript()" javascript function produces no result. Call Test_from_javascript() manually to code Actionscript product alert "javascript test has received in actionscript!" without problem. So the ExternalInterface.call("saveglobalscore",score) method works fine, but the the ExternalInterface.addCallback("IsStatic",IsStatic) doesn't seem to work at all. What I'm missing here?

    Try to change/add the JS in your HTML code to the following.

    TS

  • How to call the popupscreen from inside menuitem

    I created a single screen. I added a menuitem.

    If this menuitem a popupscreen should be displayed with a click.

    but I'm IllegalThreadStateException. can anyone tell why its happening.

    I use following the line of code

    UiApplication.getUiApplication () .pushModalScreen (new FastTextScreen());

    inside the menuitem run() method.

    waiting for the answer

    Thanks for the reply.

    Oddly, now it works.

    in the sublayout method, I used setPosition(), setExtent() and layoutDelegate().

    Once again thank you.

  • Call the function in LabView from a DLL, and then access the global variable of DLL

    I've created a DLL in LabWindows with a function and structure.  I want to call the function from LabView and then access the overall structure.  I am able to call the function in the DLL with a "call library function node" and has access to the return value, but I can't understand how to access the overall structure.  The structure is declared in the header DLL with __declspec (dllimport) struct parameters file.

    Is it possible to access this structure without using the library of network variables?

    My guess is that you need two bytes of padding after "in_out" and another to two bytes of padding after "anin."  The reason being that ints are 4 bytes, and most of them C compilers will align on 4-byte boundaries.  The struct will naturally start to such a limit (in fact, in Windows, it will probably start to an 8 byte boundary).  If you then count bytes in your structure, you are 70 byte after "in_out."  70 is not divisible by 4, so you need 2 bytes more to reach the next 4 byte boundary.  You can also you could reorganize your struct so that "anin" follows "in_out" and this is probably the best option if it won't cause you other problems.

    Unlike most C compilers, LabVIEW compressed structures as closely as possible, without filling.  I don't know enough about the history of LabVIEW and internal parts to explain the reasons and to do this performance penalty, but, as choice of LabVIEW "endianness", it is probably a remnant of the first versions of LabVIEW that were running on the Mac.

    If for some reason you want to force your C struct to match package LabVIEW, you can use the #pragma pack (x) directive, but I wouldn't recommend that here because you can control the C and LabVIEW.

    EDIT: in the cases where it was not clear, add padding to your cluster of LabVIEW, insert appropriate size or items at the place desired in the cluster.

  • Transfer while calling the function of a trigger

    Hello

    I would appreciate if someone can point me in the right direction. So I have a trigger (TableAR_BU) on a table table. This trigger, I have a logic to call the function, and inside this function, I'm just a select statement of a few other tables that the table table.
    Function is supposed to return me 'Y' and it done correctly returns me 'Y' if I select the double feature. -Select the Function1 (100) twice;

    But when I call the trigger function, it returns me 'n'. So after investigation, I found that the select statement (selection of table) inside the function returns NULL when called from trigger.
     
    DROP TRIGGER TableAR_BU;
    
    CREATE OR REPLACE TRIGGER TableAR_BU
    BEFORE UPDATE
    ON TableAR_BU REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    declare
     localcontext varchar2(32000) := '; Context : ';
     sqlstmt varchar2 (2000);
    
     Status varchar2(1);
    
    Status := Function1(:new.Id);
    
    
    End;
    /
    
    
    function Function1(al_Id in TableAR.Id%type)
    RETURN  varchar2 is
    
    lsItemId TableAR.itemId%type;
    
    Begin
    
    Select itemId into lsItemId
    from TableAR
    where id = al_Id;
    
    
    
    Exception
    
    End Function1;
    Suggestions or comments appreciated.

    Edited by: Eclipse01 may 1, 2012 11:29

    The problem is that a level trigger line on table cannot query table or whatever it is that questions table call. In the middle of a SQL statement, the table is potentially in an invalid intermediate state if Oracle cannot guarantee that queries on the table return consistent or reasonable results so it does not allow queries of this type.

    99 + % of the time, it's a good thing because it means that you are trying to use triggers for something they are not designed for (in addition to creating applications that are terribly difficult to manage because an action like update a line will eventually create a huge cascade of effects). Most of the time, you are much better to reconsider the architecture and the displacement of the function call out of the trigger and in a sort of API that wraps the UPDATE statement (that is a stored procedure that made the UPDATE and calls the procedure).

    In the <1% of="" the="" cases="" where="" you=""> really want to do in a trigger, you would need a combination of objects (or a trigger composed containing several sections in 11 g). You would need
    -A package with a collection of table primary keys
    -A before the declaration that clears this collection
    -A level trigger line which inserts the: new. ID in the collection
    -A trigger statement that iterates over the collection and calls the function after.

    That, however, is a lot of moving parts to deal with, so it dramatically increases the complexity. If you only want to consider if you are really convinced that you must use triggers in the first place.

    Justin

  • PL/SQL anonymous block - try to call the function within cursor

    Hello-

    I need to create an anonymous block that contains a cursor and function. I want to call the function from the cursor and function will essentially have an ID as parameter and will return a list of values comma separated.

    However, when I try to do it I get the error 'function 'GET_PAYMENT_DATES' is not usable in SQL.

    Does anyone know of a workaround? I'm trying to avoid having to store this function.

    Thank you
    Christine

    Well you can't do this using an sql not stored function.
    What you could do is to increase your sort_area_size which can help you to overcome the performance Bug.

    for example: alter session set sort_area_size = 64000;

    other than that, it seems that you need a stored function

  • Call the function QML from C++ (simple question)

    I guess that's a pretty easy question but I'm a bit new apart from development c ++ of BB10. I have a QML file in the assets folder called Functions.qml which has only onne inside functions.

    import bb.cascades 1.3
    
    Page {
        objectName: "funct"
        function printStat() {
            console.log("hello");
        }
    }
    

    In one of the functions in applicationui.cpp there is a function called resendNotification() (you may know this code from the model of the app without head)

    void ApplicationUI::resendNotification()
    {
        InvokeRequest request;
        request.setTarget("com.example.TestNotificationService");
        request.setAction("com.example.TestNotificationService.RESET");
        m_invokeManager->invoke(request);    // --> call the printStat() function of Functions.qml file
        Application::instance()->minimize();
    }
    

    My question is, before you minimize the app How can I call the function printStat() of the qml file? I have always developed my apps in QML so never had to deal with c ++. Should be easy enough to call a function well.

    Thank you in advance!

    first step is to find the object by ObjectName using findChild, usually from your element root (navigationPane).
    example:
    NAV-> findChild ("myTextField")

    If you have the object of another source that is fine too, of course.

    second step is to use QMetaObject::invokeMethod with the object and the name of the method.
    Example:
    QMetaObject::invokeMethod (container, "setText", Q_ARG (QVariant, text));

  • Get the value of the variable inside the function from the event (EventListener)

    How to get the value of the variable inside the function from the event. Variable has been declared as a function of external events.

    var StringVar="sample";
    
    
    
    
    myButton.addEventListener(MouseEvent.CLICK, myClickReaction);
    
    function myClickReaction (e:MouseEvent):void{
    StringVar="other sample";
    }
    
    trace(StringVar); /* it gives me "sample" value and i would get "other sample" value */ 
    

    This strange because if it would be the trace of a normal function would give me good result.

    var StringVar="sample";
    
    
    function myClickReaction():void{
    StringVar="other sample";
    }
    
    myClickReaction();
    trace(StringVar); /* it gives me result as i wanted to have - "other sample" value */ 
    

    I also know method of passing of arguments depending on the event, but it doesn't for me as I would like to

    var StringVar="sample";
    
    
    
    
    myButton.addEventListener(MouseEvent.CLICK, function(e:MouseEvent){ myClickReaction(e, StringVar) },false, 0, true);
    
    function myClickReaction (e:MouseEvent, StrVar:String):void{
    
    StrVar="other sample";
    }
    
    trace(StringVar); /* it also gives me "sample" value and i would get "other sample" value */ 
    

    How to do it correctly?

    I do not know the structure of your screen lists so I can't tell you how to access the variable, but you're on the right track. If it's a parent, then you can always use the .parent property to cross to the top the list display to try to access.

    for example 1 level:

    MovieClip (this.parent). StringVar = "another sample";

    Add more properties .parent to continue to move to the top of the list.

    for example:

    MovieClip (this.parent.parent). StringVar = "another sample";

    Just like always, use traces (MovieClip (this.parent). StringVar); until you get the value that you want to know that you're accessing them correctly.

  • Call the function in the UI part without head

    I develop some app with no head.

    When I change the code in the head part and build - launch. But nothing changes in the part without a head.

    I have another solution call the function in the UI part headless. But whatever it is called.

    Please help me solution?

    The part without head of a long walk without head application is still running in the background. It will not update until you stop the part without a head.

    To stop the game without leading the race, you have three choices:
    (1) build increment in the bar file version - descriptor.xml. This will force the part without head to stop and restart with the new code.

    (2) use the monitor of the device to manually stop your application from running. Then, new launch and your game without head will run the new code.

    3) to implement your own way without a head, like a button that would send a personalized call to headless with (say) action "com.myDomain.myAppName.SHUTDOWN" and when headless receive this invocation, operate you this line:
    BB::application::instance()-> quit()
    This will make the part without head stop, then you run and your part without head will take place the new code.

    I prefer the #3 method, but if you do, don't forget to hide this feature before releasing to the public.

  • calls to functions from class to class

    How to call a function that is in one class from another class? My first class creates instances of a second class. The second class is emerging. I want it so that if a user clicks an instance of the second class, first class will know which instance of the second class was clicked. I try to use a clickHandler inside the second class that then calls the function (do) in the first class, but I get this error:

    1180: call to a method may not set of doubts.

    Here is a very simplified version of what I have in progress:


    This works! Using a single object to pass parameters is a great way to do it...!

    Thank you!!!

  • call the function onCreationCompleted c ++ in qml

    I currently have a problem with the c function call ++ QML.

    Œuvres of normal calls. But when I call a function in onCreationCompleted, he cannot access qml object on the page.

    For example:

    {Page}

    onCreationComplete:

    {myFunction() ;}

    Button {}

    ojbectName: "button1".

    }

    }

    MyFunc access using findChild button1.

    But this return 0 x 0, means the button does not exist.

    So how do I access button1 in c ++ to what page is loaded?

    I have posted from a phone, so sorry if there is no error.

    Look, we can't access the qml object when the page is created (we call it in onCreationCompleted). I bypassed by calling the function after navigationpane.push.

  • Get this error on pages MuseJSAssert: error calling the function switch: TypeError: $(...). museMenu is not a function. Have read and did what I could find to solve problems.

    Hi I keep getting the error MuseJSAssert: error calling the function switch: TypeError: $(...). museMenu is not a function on my Web site which is not published, but I am downloading in British Colombia through muse.

    I'm on a PC.

    I tried export to HTML and still have the same problems locally.

    I saw that someone had a problem with mailchimp forms in one of a previous post. I removed the a widget of external source? for reservation and it was always happening.

    I created a new project like this and downloaded BC site all the files again to see if she could make a difference but still have the error.

    It's my URL BCdraft - home

    I tried to look at the site in the section "console" (where you can see the code of pages) to see if I could see the error that people had already advised but I get nothing... maybe not completely published because?

    I have reloaded the site through the muse in British Colombia with "all files" and is always the same.

    Here are some pictures that can help...

    Once on the home page, it may come with the error immediately or not... If you choose to say the title of the FAQ

    choose faq.png

    You must then (or choose other titles until it is) have this error coming...

    error.png

    Note that the title you have previously chosen as 'FAQ' now as 'price '.

    Changes to old title pricing.png

    This title is for some time and seems strange appears again.

    Here is a picture of scripts/css in the admin of BC as I've seen that this can be a problem but I don't know if this is normal or not and how to fix...

    cpanel.png

    I had taken a break from building the site for about a month and I had added on changes, but not them uploaded to the server just left saved on my PC.

    In the hope of an easy solution; p

    See you soon,.

    Steve.

    I published BC... what I wanted to say is that I did not live.

    Export HTML was to check if the error occurred in the HTML files locally.

    It ended up being a code of the external widget that was causing the problem. With him removed the pages work fine. (I had removed what I thought of them while troubleshooting, but I forgot to a separate embedded image)

    Specifically, it is because it was a pop-up overlay widget made for reservations. When I put it to then start a new page in the tab it works now. Seems that muse has changed to something allowing overlays?

    My thanks to Neha in support

  • MuseJSAssert: Error calling the function switch: TypeError: undefined is not a function (assessment '$element .on this.')

    As usual I never update muse immediately incase of any question, however, a few days after the update (have not installed the update) I go on my site, this message appear out of no where "MuseJSAssert: error calling the function switch: TypeError: undefined is not a function (assessment ' this.)" ($element.sur ') ".

    So I decided to install the update and see, but the message would have still done appear then I wiped my server and download all my files to perhaps solve the problem of Javascript, and yet the message is still displayed.

    Note that this came from nowhere even tho I don't update my muse or uploaded to my FTP in days.

    My site entire is now totally useless after months in manufacturing.

    Can anyone help?

    The error on the sites is caused by having custom include the code that loads several different versions of jQuery. A single Web page should only have one.

    The redirect URL that fails intermittently. We actively work to diagnose and fix that, but which will not only cause these errors. Each Muse site contains a snippet of JavaScript that silently and automatically returns to use the version of jQuery that muse will be mailed to your host if the CA version is not available for some reason any.

    The problem is a number of customer sites have wrong incorporated several different versions of jQuery. When the CDN version is available, it is used. Unfortunately, when it is not available, an incompatible version loaded by the custom code or third-party widget is used and which translates these errors.

    Long term loading multiple versions of jQuery should be removed from the code or the third-party widgets on your site. In the short term, we will have solved CDN failure and these errors will disappear, but they return in the future if multiple copies of jQuery in the code no Adobe added to the page are not deleted.

  • Is it possible to call the function Document disinfect since a JavaScript?

    Hi, I hope that this should be easy, but a link back are not the results of the research in the SDK from Adobe live. Is it possible to call the functions Document disinfect or remove hidden information of in a javascript script? Here pointers would be GREATLY appreciated.

    This command opens the dialog window Document disinfect, but you will still need to run it manually, and you will also need to run it from a context of trust.

    app.execMenuItem("DIGSIG:SanitizeDocument")

  • MuseJSAssert: Error calling the function switch: TypeError: $(...). toBrowserWidth is not a function

    Hey,.

    I made a site with Muse on April 2014 and now (September 2014) I got the latest version of Adobe Muse, updated the site, send to an external FTP client directly from Muse, and now my client told me that he cannot see the site of Mozilla Firefox from his PC. It is said that MuseJSAssert: error calling the function switch: TypeError: $(...). toBrowserWidth is not a function. He can see the site in Internet Explorer. And it works with my Firefox, Chrome and Safari browsers on mac.

    I have found some answers and tried: I added / of the museutils.js of the file so that it looks like this: {url:"/scripts/pie.js... and (" / MuseJSassert:... instead of: {url: "scripts/pie.js... and (' MuseJSassert:...") "}")}

    Done with the code in parentheses editor and send the files to a remote server with Filezilla.

    Now, it displays error on my browsers as well, he said: some of the files on the server may be missing or incorrect. After you click OK, the site seems normal.

    I also deleted the site distance and exported directly from Muse again. Now it looks fine on my browser again, but not customers.

    Any help?

    It's frustrating because I'm not a coder (I chose the Muse of reason) and now I don't know what to do...

    I checked out the site on my end, but can't reproduce the same error:

    http://take.Ms/dAPJ0

    Please try to delete browser cookies or try to reset the preferences.

    Thank you

    Sanjit

Maybe you are looking for

  • Why my iMessages turn into SMS

    Why my iMessages turn into SMS

  • "HP Slate 2.

    Got a 2 HP slate, I don't know how - but the partition the primary BONE has been eliminated - and now the tablet on a restart loop. Advanced System Diagnostics HP no help, I made a flash drive with a car running Win7 Pro. -However even if I start the

  • How to get information about the important updates.

    Original title: How can I find a list of the updates, I really need and I can uninstall and how uninstall you unnecessary updates. I use a laptop computer Inspiron 1525 32-bit Home Premium Windows Vista 4 GB. I don't even think that I have enough for

  • HP 6510 put Scanner in place

    I'm trying to get the scanner to work on my new HP 6510 all-in-one. I am able to use the printer and wireless connection is good, but I get a message that says that the Scanner is not connected to the computer. I just saw a similar post on this forum

  • How can I download files directly to specific folders

    the files I want to download are in the download folder.