Calling function from child to child?

Hi
is it possible? I have a main.swf. I have loaded two child-SWFs into it, child1.swf and child2.swf....
There´s a videoclip inside child1.swf, can I stop that video from child2.swf?

yes, it's possible.
You have to use the Loader.content for one child and cast it as a movieClip.
Here is an example of how you can control a loaded child from the main.swf:
http://www.flashdersi.com/flash/default.htm#ders61
And that's what you have to do:
in main.swf you add child1 like :
var loader:Loader=new Loader();
var child1:MovieClip;
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,fComp);
function fComp(evt:Event)
child1=loader.content as MovieClip;
loader.load(new URLRequest("child1.swf"));
addChild(loader);
and in child2.swf use this code:
MovieClip(this.parent).child1.videoClipName.stop();
Maybe you need to use
MovieClip(this.parent.parent.parent.......).child1.videoClipName.stop();   (depends on where you use the code in the child2.swf)
I'm sure it wont work at the first try, just trace what you get with  this.parent or this.parent.parent  etc... and find the right expression.

Similar Messages

  • How to Call Function from SAPSCRIPT

    I want to Call a function from my SAPSCRIPT to get some data and print the same in the form , Can I get an example for this

    Hi Nandan,
    U cannot directly call function from SAPScript... For that u have to create one include in which u need to write the code. Using Perform... EndPerform u can call the same from SAPScript. See the below example
    u need to write this code in SAPScript
    PERFORM formname IN PROGRAM includename
    USING &field1&                                      
    USING &field2&                                      
    CHANGING &field3&                                     
    ENDPERFORM                                               
    Here includename is your include type program.
    u need to write this code in your include type program..
    FORM formname TABLES in_par STRUCTURE itcsy
                            out_par STRUCTURE itcsy.
    data : var1 like field1,
           var2 like field2,
           var3 like field3.
      READ TABLE in_par WITH KEY 'field1'.
      CHECK sy-subrc = 0.
      var1 = in_par-value.
      READ TABLE in_par WITH KEY 'field2'.
      CHECK sy-subrc = 0.
      var2 = in_par-value.
    now u can call corresponding function using local VAR1 and VAR2. Here u can pass N no of USING parameters.
    After processing on VAR3...
      READ TABLE out_par WITH KEY 'field3'.
      out_par-value = VAR3.
      MODIFY out_par INDEX sy-tabix.
    EndForm.
    Here in_par and out_par are the structures which will be used to communicate with SAPScript. And this is the only way as per my view.
    I m sure this code will work fine. Here i have used dummy variables that u need to change as per your requirement. If u have more queries write me back.
    And yes if this works than dont forget to give the points.
    Regards,
    Sagar

  • Call function from data base with clob input parameter.

    Hello,
    In this project I use Jdev 11g.
    I call function from database.
    create or replace function get_fa_list (
    p_fa_id_list in clob
    return sys_refcursor
    is
    vCursor sys_refcursor;
    begin
    put_msg ('begin');
    if p_fa_id_list is null then
    put_msg ('CLOB is null!');
    else
    put_msg ('size CLOB: ' || dbms_lob.getlength (p_fa_id_list));
    end if;
    put_msg ('Save');
    open vCursor for
    select rownum as id, s.*
    from (
    select f.latitude, f.longitude, count (distinct f.res_id) as res_count, count (*) as fa_count, 16711680 as color, res_concat_distinct (f.res_id) as station_list
    from mv_frequency_assignment f, table (SplitClob (p_fa_id_list, ',')) l
    where f.ext_system = 'BI' and
    f.ext_sys_id = l.column_value
    group by f.latitude, f.longitude
    ) s;
    put_msg ('Open and End');
    return vCursor;
    end get_fa_list;
    I use TopLink in ejb.
    i use follow code for call function and get result.
    public List<TmpResPoints> findAllPointsBI(String p_id){
    UnitOfWork uow = getSessionFactory().acquireUnitOfWork();
    uow.beginEarlyTransaction();
    StoredFunctionCall call = new StoredFunctionCall();
    call.setProcedureName("get_fa_list");
    call.useUnnamedCursorOutputAsResultSet();
    ClobDomain c = new ClobDomain(p_id);
    //System.out.println(c.toString());
    call.addNamedArgumentValue("p_fa_id_list", c);
    ReadAllQuery query = new ReadAllQuery();
    query.setReferenceClass(TmpResPoints.class);
    query.setCall(call);
    List<TmpResPoints> result = (List<TmpResPoints>)uow.executeQuery(query);
    uow.commit();
    uow.release();
    return result;
    But size parameter "p_fa_id_list" is 0. (geting from temp table in Data base). this code in function >>
    if p_fa_id_list is null then
    put_msg ('CLOB is null!');
    else
    put_msg ('size CLOB: ' || dbms_lob.getlength (p_fa_id_list));
    end if;)
    How I can call this function from dataBase and get result?
    thx,
    Demka.

    What is the SQL generated?
    The argument should just be the Clob value (a String) not the domain object.
    Also try addNamedArgument, and then pass the named argument to the query.
    James : http://www.eclipselink.org

  • Send data to ECC table through RFC Call function from SAP B1 via  b1if

    Hi,
    I have created scenario in B1if which triggers from SAP B1, now I have to send this data in to ECC table, so I have created scenario for that with inbound SAP B1, outbound void and in process RFC Call atom is there but I am not getting data in receiver and also how to write xml to send data in RFC function. Function for RFC has configured from ECC end and have access of that function.
    So please help me to send data to ECC table through RFC Call function from SAP B1 (9.0) via b1if
    Thanks

    Solved by my own.

  • Parent swf call function in Child swf not working

    Hi all,
    I'm having a problem with this and I just can't figure it out
    :( (I've been trying different things and staring at it for hours
    and I'm losing my mind...)
    So I have a Parent swf that loads a Child swf (this goes
    without any problems), but I want the Parent to call a function in
    the child, now this is where it goes wrong...
    The function the Parent has to call is named "lookupcar" and
    needs to give the value "wagen" with it. The problem I think is
    that the Parent wants to call the function but it still needs to
    load (correct me if I'm wrong). Is there a way to check if the
    Child swf is loaded completely before trying to call the function?
    Could you give me an example of this please? Or any other
    suggestions on what goes wrong?
    Code in the Parent
    root.inhoud.createEmptyMovieClip("thetext", "thetext",
    this.getNextHighestDepth());
    root.inhoud.thetext.loadMovie("uitrusting-wagenpark.swf");
    root.inhoud.thetext.lookupcar(wagen);
    Code in the Child
    (the function lookupcar)
    _global.lookupcar = function(carnr:String){
    trace("LOOKUPCAR, with car nr: " + carnr);
    Thanks in advance for all the help.

    Perfect....just to make sure i m taking care of it in a nice practical way....here is how i learned to access a file located in Child (researching other posts)
    is this the way you recommend it?
    (LoaderName.content as MovieClip).functionName(new Event("whatever"))
    and in Child File we have
    function functionName(e:Event)
    i have seen other ways of calling a function in Child Swf , like using EmbedSWF and etc. wanna make sure which one is a better practice. Thanks

  • Using Parent Functions from Child

    I have created an application utilizing numerous components.
    Each component encompasses it's own functions. This has become an
    issue as the application has grown and I need to refresh components
    based on the click of a tab navigator.
    Being very new to flex 2 I am wondering how I could put all
    of the functions now in the components on my main.mxml and call
    them from the children (components)? I believe that this would
    allow me an easy way to refresh the different components utilizing
    a large init() function in main.mxml.
    Also, is it possible to call the init() functions of my
    components from the main.mxml. This would also allow me to refresh
    components. If it's possible I would like to see a simple example
    of the process.
    Thanks for the help. I appreciate it.
    Mark

    This code may help:
    components/init/InitButton1.mxml---------------------
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Button xmlns:mx="
    http://www.adobe.com/2006/mxml"
    label="ButtonOne" creationComplete="init()">
    <mx:Script>
    <![CDATA[
    public function init():void {
    setStyle("fontWeight", "bold");
    setStyle("fontSize", "10");
    setStyle("color", "0xFFFFFF");
    ]]>
    </mx:Script>
    </mx:Button>
    components/init/InitButton2.mxml---------------------
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Button xmlns:mx="
    http://www.adobe.com/2006/mxml"
    label="ButtonTwo" creationComplete="init()">
    <mx:Script>
    <![CDATA[
    public function init():void {
    setStyle("fontWeight", "bold");
    setStyle("fontSize", "5");
    setStyle("color", "0x000000");
    ]]>
    </mx:Script>
    </mx:Button>
    ----------------------------- Test.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    xmlns:comp="components.init.*"
    horizontalAlign="center" verticalAlign="middle">
    <mx:Script>
    <![CDATA[
    import mx.controls.Button;
    public function changeBtn1Styles(event:Event):void {
    if(event.target.id != "btn1" && event.target.id !=
    "btn2"){
    btn1.setStyle("fontWeight", "normal");
    btn1.setStyle("fontSize", "30");
    public function changeBtn2Styles(event:Event):void {
    if(event.target.id != "btn1" && event.target.id !=
    "btn2"){
    btn2.setStyle("fontWeight", "normal");
    btn2.setStyle("fontSize", "40");
    public function resetStyles(event:Event):void {
    var currBtn:Button = Button(event.currentTarget);
    if(currBtn.id == "btn1"){
    btn1.init();
    if(currBtn.id == "btn2"){
    btn2.init();
    ]]>
    </mx:Script>
    <mx:TabNavigator>
    <mx:VBox label="Button One" width="300" height="150"
    backgroundColor="0x0000CC" horizontalAlign="center"
    verticalAlign="middle" click="changeBtn1Styles(event)">
    <comp:InitButton1 id="btn1"
    click="resetStyles(event)"/>
    </mx:VBox>
    <mx:VBox label="Button Two" width="300" height="150"
    backgroundColor="0xCC3333" horizontalAlign="center"
    verticalAlign="middle" click="changeBtn2Styles(event)">
    <comp:InitButton2 id="btn2"
    click="resetStyles(event)"/>
    </mx:VBox>
    </mx:TabNavigator>
    </mx:Application>

  • Calling function from list of values section?

    can i call a function from list of values(LOV) section as well? I know we can sql query but udf is supported?

    See this recent thread: Display as Text (LOV) or join
    Scott

  • Calling function from PL/SQL block

    Hi,
    A very simple question.
    A have a function called "test1" in my database. It is there i double chekked.
    I would like to call this function from a block:
    DECLARE
    BEGIN
    TEST1(1202);
    END;
    This gives me an error.
    Why is this?

    user610868 wrote:
    Hi,
    A very simple question.
    A have a function called "test1" in my database. It is there i double chekked.
    I would like to call this function from a block:
    DECLARE
    BEGIN
    TEST1(1202);
    END;
    This gives me an error.
    Why is this?Hello
    A very very basic thing to do when you get an error is to include details of it. That helps narrow it down from one of the 1000s of potential Oracle errors it could be.
    Anyway, a function returns a value, and in PL/SQL you need to capture that otherwise you'll get "an error". Modify your code like so
    DECLARE
       l_Test1Val     VARCHAR2(4000); --CHANGE THIS TO BE THE SAME AS THE RETURN TYPE FOR YOUR FUNCTION
    BEGIN
       l_Test1Val :=  TEST1(1202);
    END;HTH
    David
    Edited by: Bravid on Oct 25, 2011 3:57 PM
    removed a ;

  • Calling Functions From Import Integration Script

    I've got an import integration script that runs fine, however I also have several DataPump scripts that are used in FDM to change specific columns as they come in. I can take the code from the scripts and add to the Import Integration script, but I would rather just call those other functions from the VBScript. I don't see any docs on this, and I'm just wondering if anyone has done this or can describe how I can do it.
    Is it possible? Since the standard import scripts reference the strField and the strRecord, can these functions be called from the import integration script?

    strField and strRecord are arguments passed by the application to the import function. The represent the field as defined by the import format and the record that is being processed during the import.
    Given that, I'm not sure how to answer your question.

  • Calling function from sql folder vs report

    Hi,
    A report based on a custom sql folder is taking a long time to run. One of the things that I noticed is that when I run the sql in plsql it takes a long time, but if I remove the row where I call a function, it runs pretty quickly.
    In general, is there a difference between running a function from the sql custom folder and calling it from the report itself?
    Thanks.
    Leah

    Hi Tamir,
    I might check out the execution plans, but truthfully, understanding the plans and the meaning of the differences is not my strong point.
    I thought that maybe there was some general rule that, for instance, it is better to keep functions out of the sql folder and use them in a condition in the report itself, or the opposite, or that maybe it makes no difference at all.
    I appreciate the response.
    Thanks.
    Leah

  • What is the syntax for calling function from class file by jsp

    does anyone here knows what is the syntax of how to call a function from java class file by javascript code or any way to call it?
    and where should i put the calling function code? because the function is called depend on the user click.
    for example
    <%=pc.functionName(a,b)%>
    for the variable a and b, how can i get the value from html textbox and put it in a and b...
    urgent needed...
    thx

    Jsp's are executed before the Html forms are created and loaded. Dont try to use a java code function calling on a javascript click. You'll have to explicitly redirect it into a servlet where in you can call the function you want.
    Well! another way could be using AJAX. That seems to be powerfull enough and it might also serve your purpose.
    Hope this helps

  • Put SQL query in a function/ call function from region

    How can I write a SQL query (like SELECT EMPNO, ENAME, JOB FROM EMP) as PL/SQL function, and then call this function from the PL/SQL Function Returning SQL Statement region?
    Thanks, Tom

    thanks jverd for your quick reply.
    I know passing in a reference to an object will do the job if I want to change the value several parameters in one function call.
    But I want to ask, is there any other ways?
    the following code works.....
    public class TestParameter {
         public static void main(String[] args) {
              Test2 t2 = new Test2();
              invokeChange(t2);
              System.out.println("x = " + t2.x + "\t y = " + t2.y);
         static void invokeChange(Test2 t2) {
              t2.x = 10;
              t2.y = 15;          
    class Test2 {     
         int x;
         int y;     
    }

  • Getting session hang When calling Function from SQL query

    Hi All,
    I am using Oracle 8.1.7.4.0. I have a fucntion in a Package and I am calling it from the SQL query. When I am firing the query my oracle session is going to hang position and I am not able to any thing. I have to kill the session.
    But this same thing is working fine in Oracle 9.i.
    There are no out parameter and no DML, DDL and DCL statement in this fucntion.
    Could you please get back me what is the problem on it.
    Regards
    SUN

    Check why your session hangs.
    Just a few ideas:
    * Blocking locks?
    * Endless loop?
    * Performance (maybe it is just slow in orac8i and you have to wait a bit longer). Check the execution plans of the SQL statements in your function.
    * Don't use a function, but direct SQL, it is faster in both versions.

  • Calling function from Backing Bean or JSP page

    We are on Jdeveloper 10.1.3.3.0, ADF Faces, JSF Faces .., Currently there is a function call from Javascript event (onmouseover) in the JSP page. I want to call this function from a backing bean or JSP page, as I have to pass some values to this function.
    For Ex., I have a function call like return submit('A','B','Test'); on the Javascript event (onmouseover) in jsp page. I want to remove this function from the javascript event and call from backing bean or jsp page to pass some values into the submit() function. I appreciate if anyone can give some example of how to call this function from backing bean or jsp page in the <SCRIPT> or <SCRIPTLET>
    Thanks,
    Ram

    A use case would be helpful so that we can get a better idea of what you want to do.
    As a general rule, there is no way to call a client side Javascript function from a backing bean, which is server side. However, there are ways to inject information from a backing bean into your Javascript call. For instance, I have an application that uses Google Maps API. It has an onload call to a Javascript function that builds the map and designates it's center point. The center point comes from a backing bean as latitude and longitude properties. So here is my body tag:
    <afh:body onload="initialize(#{backing_searchResults.latitude},#{backing_searchResults.longitude},#{searchCriteria.distance})"
              onunload="GUnload()">onload calls the Javascript function called initialize, and passes the latitude, longitude, and distance from the bean. Is the function really being called from my backing bean? No - the parameters are hard coded into the onload event code when the page is rendered. Does it do the job? Sure it does.

  • How to call function from Merge?

    Hello,
    I have a cursor with a loop and a Merge.
    I need to call a package function from Merge instead of direct Insert.
    Is is possible?
    Instead of Insert:
    FOR c1 in (SELECT EMP_ID..
                    FROM..
                    WHERE.. )
          Loop
            Merge into EMP em using DUAL
                On (em.EMP_ID = c1.EMP_ID)
                When Not Matched Then
                  Insert (EMP_ID..)
                  Values (c1.EMP_ID.. );
          End Loop;
    I need to call a function to get back a confirmation of insert:
    FOR c1 in (SELECT EMP_ID..
                    FROM..
                    WHERE.. )
          Loop
            Merge into EMP em using DUAL
                On (em.EMP_ID = c1.EMP_ID)
                When Not Matched Then
                  v_return := p_util.emp_audit (c1.EMP_ID.. );
          End Loop;
    I know that the second sample code is incorrect. it is just to give an idea of what I'm trying to achieve.
    Is there a way around it?
    What is the correct way to call a function from there?
    I am on Apex 4.2
    Thank you.

    Hi Leons,
    I have a cursor with a loop and a Merge.
    I need to call a package function from Merge instead of direct Insert.
    Is is possible?
        No, merge statement is not meant for it. It is meant for combining multiple DML operations.
        Refer :
    http://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_9016.htm#SQLRF01606 Oracle DB 11g
    http://docs.oracle.com/database/121/SQLRF/statements_9016.htm#SQLRF01606 Oracle DB 12c
        You have to change your logic to achieve what you want.
        Hope this helps!
    Regards,
    Kiran

Maybe you are looking for

  • How to transfer Vendor from SRM  to SAP R/3

    Hi... How to transfer Vendor registered in directly via self regstration in SRM to SAP r/3 system regds Kumar

  • Oracle BAM not starting

    Hi, I installed fmw 11.1.1.4 on 64 bit windows system.Everyting is working fine but while starting BAM managed server its giving error, "BamServer" failed to preload on startup in Web application: "/oracle/bam". Then I check oracle-bam (11.1.1) appli

  • Playing iPod through car stereo

    Hi, It plays just fine except it won't shuffle songs, and the battery drains when the car is off. The iPod needs to be ejected when the battery is down, the car started and the iPod reconnected for it to work (except it still won't shuffle). Thanks i

  • Workflow Condition giving strange output

    Hello Experts, I am getting an strange issue in my workflow. Here is the condition in the workflow - &SWITCHDOC.SERVICEPROVIDERNEW.SERVICEPROVIDER& NE "space"  AND &SWITCHDOC.TARGETSUPPLYSCENARIO.VERSORGUNGSSZENARIO& NE "space" still i get the result

  • Very Urgent: Thread 1 cannot allocate new log, sequence 6 : Script stuck

    I am running one script, it is stuck with log file showing: Thread 1 cannot allocate new log, sequence 6 All online logs needed archiving Current log# 7 seq# 5 mem# 0: /u13/sjmarte/oradata/redo7a.log I have checked the database: it is in archivelog m