call a function in the hull of the SWF to a SWF imported

We have set flash up as a shell to retrieve data from the lesson in XML and display image by image.

We import SWF files when the XML code that tells it to affix the frame.

How can I get the SWF file imported to call a function in the hull...

basically a button or movie clip in swf call imported the function "gotoNextFrame()" in the hull.

We found an easier way to 'bit' if anyone is interested... We have an eventlistner added to the charger to assign an event in the swf file that is imported:

flashLoader.contentLoaderInfo.addEventListener (Event.COMPLETE, addEventHandlers);

then when its done, it adds event listeners and calls our function "goNextFrame" (then it clears when its removed from the scene):

function addEventHandlers(event:Event):void
{

var swfMC:MovieClip = event.target.content as MovieClip;

swfMC.addEventListener ("NextFrame", goNextFrame);
swfMC.addEventListener ("PreviousFrame", goPrevFrame);
swfMC.addEventListener (Event.REMOVED_FROM_STAGE, clearEventListeners);

}

Then in the swf file that will be imported, its real simple:

next_btn.addEventListener (MouseEvent.CLICK, MoveToNextFrame);
prev_btn.addEventListener (MouseEvent.CLICK, MoveToPreviousFrame);

function MoveToNextFrame(e:MouseEvent):void
{
dispatchEvent (new Event ("NextFrame"));
}

function MoveToPreviousFrame(e:MouseEvent):void
{
dispatchEvent (new Event ("PreviousFrame"));
}

Tags: Adobe Animate

Similar Questions

  • Calling a function in the HTML window that course is located inside - 8 Captivate

    Hello

    I scoured the forums to answer this but still have developed in white.

    Our LMS is launching a course in a pop-up window and inside that the Captivate output file .htm lies.

    Currently this pop-up window has a button that performs a function.  The problem is this button is rather unsightly sitting above the price in the HTML window and I wish I could call this function inside the Captivate course itself.

    The function is called closeSCOContent() and it closes the window of course but basically sends the user to a page of comments.

    So, basically is it possible to call this function using the Javascript function in Captivate 8?

    I hope that I have explained that sufficient

    Thank you very much!

    You should be able to call the function, but you would need to know where he is regarding parents/children/opener. Looks like there's frameset inside the popup.

  • Can I call a function using the array index?

    I defined a table that stores the name of the function, like this:

    var aresetButtonTop:Array = new Array(resetTop1,resetTop2,resetTop3,resetTop4,resetTop5);

    Then I have a button named "btnresetTop" which, once clicked will be called one of the five functions stored in the array (aresetButtonTop) above. Functions are called at runtime depending on certain conditions. I need to figure out how I can call these functions using the array index. I use the following code to call the function. The value of i has already been calculated.


    btnresetTop.addEventListener (MouseEvent.CLICK, aresetButtonTop [i]);

    After doing this, I get the following error when I click on the button:

    TypeError: Error #2007: parameter listener must be non-null.
    at flash.events::EventDispatcher/addEventListener()
    at gallerytest_fla::MainTimeline/thumbTopClick()

    Note: thumbTopClick() is a function within which all these codes are written.

    I need to know if it is posible in AS3 to call a function name using array index or not. If so, could you afford ehelp me out.

    You can certainly do.

    In your case, it looks like i is out of range. Show your loop.

  • Calling a function in the main sequence of a loaded swf file

    I know this is probably a very basic question, but I loaded a SWF file in another film. Now, I want to call a function in the main SWF file. Is it possible to do? Otherwise, I have a custom class where I could put the function, but I was not able to understand how to call it from the SWF loaded either. Can I somehow associate the class with the main movie, or...?

    Nevermind - I did something very stupid and was not calling the function as a method of a clip. I was just calling checkTarget (event) and not event.currentTarget.checkTarget (event); that seems to work.

  • Call a function within the same CFC component

    Hello
    / * Niewbie Question * /.
    I have a strange problem. When I try to call one function on the other in the same CFC component, I get an error named: "Entity has incorrect type to be called as a function."
    I looked on many forums and searched in Google groups. I have yet found a work around for this problem.
    I thought I did caution o not use twice the same name...
    Can someone tell me what I did wrong?

    My sample code to reproduce this error is included

    The full error message is:
    Entity is of the wrong type to be called as a function.
    The symbol you provided superfunction is not the name of a function.

    The error occurred in C:\ColdFusion8\wwwroot\admin\_components\test.cfc: line 6

    4: < cfinvoke
    5: method = "superfunction".
    6: returnVariable = "myReturn" >
    7: < / cfinvoke >
    8: < cfset some_text = myReturn >

    OK, solved with all your advice!

    A big thank you to everyone

    Here is the final code for others...

  • Call a function on the stage of the symbol that is nested in a symbol

    Scenario of

    creation of complete scene

    stage = sym.getComposition () .getStage ();

    SYM.func_btn1 = function() {}

    code

    }

    symbol btn_1

    stage.func_btn1 ();

    It works well

    symbol Index

    symbol btn_1

    stage.func_btn1 ();

    No chance to fire service

    Where is my mistake?

    I write a little different functions, but I tested my way and it works.

    Create functions in compositionReady like that

    SYM. Test = function() {}

    SYM.$("element"). Hide();

    }

    When this function is run it will hide the element on the stage, called 'Element '.

    You can call this function in compositonReady leave a nested using this line symbol

    sym.getComposition () .getStage (). Test();

    I have install a sample project I hope it helps.

    http://www.mediafire.com/download/wv8k19pzqdg9b31/NestedSymbolFunction.zip

  • Calling a function in the apex region

    Hello
    I want to call a function from a package in the region of Apex report, but he used to analysis
    I tested in sql dev successfully

    code example goes like this...

    SELECT DISTINCT SOR_OFFENDER. FIRST_NAME. » ' ||
    SOR_OFFENDER. MIDDLE_NAME | ' ' ||
    SOR_OFFENDER. Last_name like "Name",
    SOR_OFFENDER_DETAILS.get_offlu_url(:p216_detail) - package where the function is defined
    OF SOR_OFFENDER.
    SOR_LOCATION
    WHERE SOR_OFFENDER. OFFENDER_ID = SOR_LOCATION. OFFENDER_ID
    AND: p216_detail = SOR_LOCATION. OFFENDER_ID




    any idea/help

    Published by: Red_Bull on 8 August 2012 15:02

    I agree. Until and unless it is absolutely necessary avoid calling function in a select statement because it will degrade your performance of applications over a period of time.
    As far as I know if the query is run in SQLDeveloper, it should also work in the APEX.
    I see a syntax problem in your query. Try this.

    SELECT DISTINCT SOR_OFFENDER. FIRST_NAME. » ' ||
    SOR_OFFENDER. MIDDLE_NAME | ' ' ||
    SOR_OFFENDER. Last_name like "Name",
    SOR_OFFENDER_DETAILS.get_offlu_url(:p216_detail) url,
    OF SOR_OFFENDER.
    SOR_LOCATION
    WHERE SOR_OFFENDER. OFFENDER_ID = SOR_LOCATION. OFFENDER_ID
    AND: p216_detail = SOR_LOCATION. OFFENDER_ID

    Thank you
    Mehabub

  • ITS POSSIBLE TO CALL A FUNCTION WHEN THE LINES ARE ALREADY MET?

    Hello, I'm new in pl sql and I learn.
    My requirment is:

    I made a function for calculating the values of cumulative of the account period.

    My problem is:

    I have this data

    amount of the account
    12 100
    12 50
    13 200

    and I have this simple query

    SELECT flat, account, acumulated_amount (period)
    THE F1
    GROUP account, the period

    I get

    amount of the account
    12 150
    13 200

    I want to add is to add a column that is calculated by a function. This function calculates the cumulative amount of previous years of account.
    If I insert this select statement so that it will calculate the cumulative amount each online account and what I want is show the amount acumullated after the grouped data

    For example: my accumulated amount of the 12 is 1000 and based on my request I will receive

    account amount acumullated
    12 150 2000
    13 200

    because the cumulative amount in each line and I need perform the calculation only when data are collected. Something like this:


    account amount acumullated
    12-150-1000
    13 200

    Someone has an idea how to do this?

    Thanks in advance

    Paulo Duarte

    Hi, Paulo,

    user4256563 wrote:
    Hello, I'm new in pl sql and I learn.
    My requirment is:

    I made a function for calculating the values of cumulative of the account period.

    My problem is:

    I have this data

    amount of the account
    12 100
    12 50
    13 200

    Whenever you have a problem, please psot of CREATE TABLE and INSERT statements for your sample data, even if it's only 3 rows.
    Always say what version of Oracle you are using (for example, 11.2.0.1.0).

    and I have this simple query

    SELECT flat, account, acumulated_amount (period)
    THE F1
    GROUP account, the period

    I get

    amount of the account
    12 150
    13 200

    You have 3 columns in your SELECT statement, but only 2 columns in the output. Is one of the output NULL columns?

    I want to add is to add a column that is calculated by a function. This function calculates the cumulative amount of previous years of account.
    If I insert this select statement so that it will calculate the cumulative amount each online account and what I want is show the amount acumullated after the grouped data

    For example: my accumulated amount of the 12 is 1000 and based on my request I will receive

    account amount acumullated
    12 150 2000
    13 200

    Sorry, I don't see how you get 1000 or 2000 for examples of data that you said that you have. Can you explain, step by step, how to get this figure?

    because the cumulative amount in each line and I need perform the calculation only when data are collected. Something like this:

    account amount acumullated
    12-150-1000
    13 200

    That's what you want, or you want the results given just before her, with accumulated = 2000?
    Whatever it is, I still don't see how you get 1000 or 2000 of 100, 50 and 200.

    Someone has an idea how to do this?

    Analytical functions can do what you want. When you use analytical functions and aggregation in the same query, the GROUP BY clause is applied and aggregate functions are calculated before the analytical functions are started.

    You can write (or analytical) global functions defined by the user. For a simple (and very useful) example, called STRAGG, see
    http://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:2196162600402

  • Call or function of the class from a loaded MC

    Hello

    Can someone tell me if its possible to call a function or a class from a loaded MC?

    mainMovie charge MC > MC calls the function in a class of mainMovie

    If so, what is the best method?

    I tried this loaded MC but (of course) an error:

    movieClip (parent.parent). DO_THIS();

    Thanks for everything 'light' on this.

    Have the loaded SWF file send a custom event that spreads and listen to this event in the parent.

    In SWF loaded:

    dispatchEvent (new Event ("customEvent", true));

    Parent:

    addEventListener ("customEvent", handleCustomEvent);


    function handleCustomEvent(event:Event):void

    {

    do your stuff in the parent here
    }

    TS

  • Calling a function in the application

    What is the best way to call a function that is located in the main file of the application to a custom component that is nested several layers down

    Thank you

    Try to use FlexGlobals.topLevelApplication

  • Calling a function in the process of prior authentication in the authentication scheme

    Hi all

    I want to call a function somewhere inside the apex (not in the database) of the prior authentication process in an authentication scheme.
    Is this possible?

    Cordially Pedro.

    Pedro

    Apex is in the database under the scheme of flow so I don't know what you're getting...

    Is that what you want your function (I guess that's PL/SQL?) in a pattern that do not have access to the users?

    See you soon

    Ben

  • Can I call a function with the argument % ROWTYPE directly from SQL?

    I have the following function in a 10g DB:

    FUNCTION to CREATE or REPLACE f_is_eligible2 (in_dm_row IN amplify_dm % ROWTYPE)
    RETURN NUMBER
    IS
    ....

    I know that I can call this function to another function from pl/sql, but I wonder if I can call this function directly from an SQL statement, something like this:

    SELECT f_is_eligible2 (dm.*)
    Of amplify_dm dm

    or

    SELECT f_is_eligible2 (dm % rowtype)
    Of amplify_dm dm

    None of those who have worked so I think it is not possible, but I thought I'd ask anyway.

    Thanks in advance!

    You are correct, it is not possible.

    SY.

  • How to call other functions within the ScriptableFunction class

    I am trying to create an extension of javascript class which will record audio, but the problem is that I can't call other methods in the class.

    clear explanation about my problem:

    It's my Scriptable class

    public final class OCNUtilsNamespace extends Scriptable
    {
        VoiceRecord vr;
    
        public OCNUtilsNamespace()
        {
            this.vr = new VoiceRecord();
        }
        public Object getField(String name) throws Exception
        {
            else if(name.equals("VoiceRecorder")){
                return this.vr;
            }
    
            else if (name.equals("stopRecording"))
            {
                this.vr.stopRecording();
                return new String("Stopped Recording");
            }
            else if (name.equals("startRecording"))
            {
                this.vr.startRecording();
                return new String("Started Recording");
            }
            return super.getField(name);
        }
    }
    

    and here's my ScriptableFunction class:

    public class VoiceRecord extends ScriptableFunction {
    
        String status = "start";
        public Object invoke(Object obj, Object[] args) throws Exception{
            if(status.equals("start"))
                return new String("Started Recording");
            if(status.equals("stop"))
                return new String("Stopped Recording");
            return new String("nothing");
        }
    
        public void stopRecording(){
            status = "stop";
            return;
        }
        public void startRecording(){
            status = "start";
            return;
        }
    }
    

    in my javascript every time I call

    alert(OCN.OCNUtils.VoiceRecorder());
    

    I get the response as "recording started"

    but whenever I tried to call

    alert(OCN.OCNUtils.startRecording());
    

    I don't get all respose and the script will stop working at that time here.

    Why is happening like that?

    I'm doing something wrong?

    I did not understand this concept of scriptablefunction anyone please explain what is happening?

    have to apply Runnble to the future because I have to record the sound of the microphone

    I suggest that you simply pass an argument of your javascript in your extension like this:

    public final class OCNUtilsNamespace extends Scriptable
    {
        VoiceRecord vr;
    
        public OCNUtilsNamespace()
        {
            this.vr = new VoiceRecord();
        }
        public Object getField(String name) throws Exception
        {
            if(name.equals("VoiceRecorder")){
                return this.vr;
            }
            return super.getField(name);
        }
    }
    

    and on your class that extends a ScriptableFunction,.

    public Object invoke(Object obj, Object[] args) throws Exception{
    
                   String param = args[0].toString(); // Cast a parameter from your js to a string
    
            if(param.equals("start"))
                return startRecording();
            if(status.equals("stop"))
                return stopRecording();
            return new String("nothing");
        }
    
        public String stopRecording(){
            status = "stop";
            return status;
        }
        public String startRecording(){
            status = "start";
            return status;
        }
    

    Finally, call your extension via javascript like this:

    alert(OCN.OCNUtils.VoiceRecord("start")); // Call the startRecording() on your VoiceRecord class
    alert(OCN.OCNUtils.VoiceRecord("stop")); // Call the stopRecording() on your VoiceRecord class
    

    Hope this helps

  • : Error 35 call external function of the object

    I get "error 35: error when calling external object function driverinit on line 302 of the event open"and impossible to open a program. " A few solutions that I found for this search refer to an update to the SQL Server.  The only thing I tried to do lately is to update a printer driver, all was working fine before this.  I got an SQL error on a website trying to access the FAQ section.  I found an article to download an update to the original version of SQL Server 2005 SP2 but not sure if that's what I really do.  Can anyone help?

    CRTet,

    Error 35 is not a common Windows error. It is very likely that the registry scanner above will only cause more problems.
    The error you get is from your application. Given that this is not generated by Windows, I highly recommend directly contacting the support of bookkeeper.

    Cody C
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Call to function outside the scope of the scene

    So that it won't be easy for me to call a hideNav() function, I put the function away from the scene. You can see the end of the closing of the step below, followed by the different things that do not work I tried. Suggestions are welcome. The alert goes off well, so this is a problem with the address button to return to the main timeline.

    ... script here staged stuff

    (}) ('step');

    End of edge symbol: "internship."

    If you do not understand a concept, put all the words you know in a random order and see if something happens - but is not

    function hideNav() {}

    Alert ("Hide");

    sym.getComposition () .getStage ().getSymbol("back").hide ();

    sym.getComposition () .getStage ().$("back").hide ();

    SYM.$("stage").backButton.hide ();

    sym.getSymbol("back").hide ();

    sym.getParentSymbol ().getSymbol("back").hide ();

    backButton.hide ();

    SYM.$("back"). Hide();

    }

    PS, yes I tried one at a time. It's just a compilation of my greatest success.

    Here's an example of use of the scene to call the symbol 'back', but also another symbol calling symbol "return":

    Edge symbol: "internship."

    (function (symbolName) {}

    Symbol.bindElementAction (compId, NomSymbole, 'document', 'compositionReady', function (sym, e) {})

    If you want a shortcut method

    sym.hideNav = function() {}

    sym.getSymbol("back").hideNav ();

    }

    });

    End of binding edge

    (}) ('step');

    End of edge symbol: "internship."

    //=========================================================

    Edge symbol: «back»

    (function (symbolName) {}

    Symbol.bindSymbolAction (compId, NomSymbole, "creationComplete", function (sym, e) {})

    sym.showNav = function() {}

    do things

    Console.log ('showing');

    }

    sym.hideNav = function() {}

    do things

    Console.log ('hiding');

    }

    });

    End of binding edge

    (}) ("back");

    End of edge symbol: «back»

    //=========================================================

    Symbol of border: 'something_else '.

    (function (symbolName) {}

    Symbol.bindSymbolAction (compId, NomSymbole, "creationComplete", function (sym, e) {})

    This is an example of another symbol using two methods to talk about «back»

    var point = sym.getComposition () .getStage ();

    method 1 (calls the method on the stage, which calls the method on the symbol)

    stage.hideNav ();

    method 2 (directly calls the method on the symbol)

    stage.getSymbol('back').hideNav ();

    });

    End of binding edge

    (}) ("something_else");

    End of symbol of border: 'something_else '.

Maybe you are looking for

  • Need power supply for Satellite A30

    Can someone tell me the part number correct for the power for the Satellite A30 laptop adapter. I bought a generic and that did not work.I had tested machine because he kept closing and the technician said there was nothing wrong with the fan etc. so

  • Screensaver not working only not with the hot corner

    I used to have my screensaver set to start with the upper left corner of my screen using the feature 'hot corner '. However, lately, he doesn't. I tested it with all the other corners, and it does not work. I tried other functions with the hot corner

  • Buttons

    Hello users Diadem I'm a new user for Diadem, I created my own function analysis and calculation and made an interface to it with a dialog box, I want to create a new button in the interface of tiara, when it is selected, the user dialog box to appea

  • using NI USB 9201 with LabVIEW Real-time

    Hello I try to use a USB of NI 9201 on a remote real-time target. Here's what I did: 1) tricked out of a desktop PC to serve as target RT using the instructions provided on the Web site of NOR. He now starts in an RTOS with LabView RTOS 9.0. (2) I co

  • HP laptop 13 Stream: Bios password forgotten HP flow

    Hi, I forgot my Bios password on my HP Notebook PC 13 stream, is it possible that I can get back. The password I can remember brings system 51709253 disabled