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

Similar Messages

  • Dispatching and Event in Parent SWF & Receiving it in Child SWF

    Hi All...
          I  would like to receive an event(Dispatchd in Parent swf) in Child SWF,  the bold italic text represents the piece of coding i require help with
         //in PARENT SWF i have -----------------------------
            dispatchEvent(new Event("CloseDoors"))
        // in Child SWF --------------------------------
           here i need a code that catches the event dispatched in parent.addEventListener("closeDoors",closedoor)
           Please let me know if there are alternative ways to do it. I think some  people prefer to listen to the event also in Parent file and run
           the function in CHild from parent file....i would like to learn the  best practive to INFORM CHILDREN through a PARENT FILE...
         Thanks.

    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

  • HT203712 I have a 2011 tahoe.  My bluetooth functioned properly until I updated my iPhone.  Now the iPhone connects to the Tahoe but when I try to call a number it does not work.  Either it cals the number and has no outgoing or incoming sound or it just

    I have a 2011 tahoe.  My bluetooth functioned properly until I updated my iPhone.  Now the iPhone connects to the Tahoe but when I try to call a number it does not work.  Either it cals the number and has no outgoing or incoming sound or it just says it iis unable to complete the call.

    I would check with the Auto dealer where the vehicle was purchased to check and see when the bluetooth software was last updated on your vehicle. With the vehicle being a 2011 and if the software has not been updated since the dropping of IOS 7 then obviously there will be software incompatibilities.
    Good luck.

  • HT1766 # is not working in my iphone 4s, when i want to see how much credit i have in iphone, i need to put # on that, than it calls and end, it is not working and not showing anything..

    # is not working in my iphone 4s, when i want to see how much credit i have in iphone, i need to put # on that, than it calls and end, it is not working and not showing anything..

    http://support.apple.com/kb/HT1848  Did you transfer your purchased item, take a look at the link

  • Repost Function using Variable is not working

    Hello experts!  I am on BW-BPS 3.5.  I have set up a repost function using variables to change a characteristic value for Business Unit.
    1. I created 2 variables as Bus.Unit From and Bus.Unit To in the Planning Area. I am not using the variables in my planning level.
    2. I entered the variables in the parameter group New Values area for the From and To Values.
    3. My goal is when the user executes the Repost Function for a Variable Prompt should appear and have the user select the From Business Unit and To Business Unit.
    The Variables are set up as USERVALUE User-Defined Values, Restriction of Values required by user and I have tried with/without option of Input Allowed by User. 
    Can you tell me what I am doing wrong, I expected a variable prompt when executing the Repost Function but it does not work.
    Thank you,
    Teri

    Ravi, Thank you for your reply however I contiue to have errors or the execution does not repost (change any value) as noted below.
    1. I have 2 Variables in Planning area var1 (from) var2 (to) for the same charateristic which is Business Unit
    2. Business Unit is in the level,  on the selection tab to add the variable I can only add 1 variable, So I added var1 (from) to the level. 
    3. Parameter group for old and new values - I have Var1 (from), var2 (to)
    4. Report Function - are you referring to Reporting variables in BPS? I have set this up as suggested in the "How to Use Reporting Variable in BW-BPS" document.
    5. Enter plan data: I receive prompt for VAR1, mandatory. At this point there is no value in Var2.
    6. Execute Repost function - I receive an error to "Restrict Var2"
    7. If I set variable values and add a value for Var2 I receive an error "The generated data is not contained in the selection condition".
    Next I removed VAR1 from my planning level and turned on the option 'Selection in package' for Business Unit. This seems to work well.
    What do you recommend?
    Thank you,
    Teri

  • Calling a parent function when child .swf closes

    I am adding a child .swf from the parent with a simple button. If this button is then clicked multiple times, the child is added multiple times. So I added the ".visible = false"  to the button when clicked so the button cannot be clicked while the child is open.
    Now, there is "Close" button on the child .swf that uses "this.parent.parent.removeChild(this.parent);" and would now need to set the parent button back to ".visible = true".
    I have tried MovieClip.parent.parent.resetButton();  and  parent as MovieClip.resetButton(); and many variations of the code. I get no errors but the code doesn't work either.
    Any ideas?
    Thank you.

    Figured this out on my own (don't believe it) without the child/parent communication.
    When the parent's button is clicked, I'm checking to see if the child already exists. If so, it won't create the child again.
    I'd still like to know how to perform the communication between child and parent.

  • How can I call functions from a SWF loaded in to another SWF?

    Hi there,
    Please excuse my ignorance, I am very new to actionscript and flash.
    I have 2 SWF's - a.swf and b.swf.
    I load b.swf into a.swf with the following code:
    var swfLoader:MovieClipLoader = new MovieClipLoader();
    swfLoader.loadClip("b.swf", container_mc);
    Now in b.swf, I have a function as follows:
    public function sendData(){
      trace("I ran the function!");
    So I have done a lot of reading, from what I can tell I should be able to run the sendData() function from the code in a.swf, by typing:
    container_mc.sendData();
    but its not working. What am I doing wrong?
    Thanks in advance,
    Adam

    Thanks heaps mate, after a bit of trial and error it works! Here is the code that I added:
    var loadingListener:Object = new Object();
    swfLoader.addListener(loadingListener);
    loadingListener.onLoadStart = function(container:MovieClip):Void  {
        trace("The MovieClip "+container+" started loading");
    loadingListener.onLoadInit = function(container:MovieClip):Void
        trace("The MovieClip " + container + " has been initialized");
      container_mc.test();
    Marked your answer as correct :-)
    Thanks again, I really appreciate your help.
    Cheers
    Adam

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

  • OBIEE 11g - Navigation in Parent Child Hiearchy not working

    Hi All,
    I have a employee parent child hierarchy and I want to show revenue for each employee in the report. I have modeled my revenue as a measure like case 4 shown in the following link
    http://www.rittmanmead.com/2010/11/oracle-bi-ee-11g-parent-child-hierarchies-multiple-modeling-methods/
    So for example this is my report ,
    --David (30)
    ---Sandra (15)
    -----Joe (10)
    Joe'e revenue is 10, Sandra's is 5 (showing her 5 Joe's revenue) and David's is 5 (showing his 5 Sandra's revenue)
    Issue :
    Now what I want is to provide action link on the revenue column so that when user would click on revenue for any employee it would direct them to a detail report showing the bifurcation.
    For ex, I want that when user click on 15 which is Sandra's revenue, he would be redirected to a detailed report for Sandra and similary for Joe and David
    MY ISSUE IS that the navigation is NOT working for sandra and Joe. It is only working for David (who is the ancestor of sandra and Joe). When I click on 15 to see sandra's detail report, it doesn't do anything and in the bottom left corner of the browser status bar below I see an ERROR saying
    (same for Joe but David work's fine)
    Message: 'getLevelInfo(...)' is null or not an object
    Line: 1
    Char: 11142
    Code: 0
    URI: http://localhost:7001/analytics/res/b_mozilla/answers/selectionsmodel.js
    Why is that happening? Is that because I have modeled the revenue as an measure and not attribute. Is navigation not possible in this case?
    Anybody has any solution or workaround for this, it will be highly appreciated.
    Thanks,
    Ronny

    Ok, so let me explain this in detail and give the structure of my tables and the data,
    There are three tables.
    1.Parent Child relationship table - pctable
    2.Closure table which OBIEE creates through a script - reltable
    3.Fact table which contains the revenue - facttable
    This is the data
    pctable
    personid | managerid
    David | NULL
    Sandra| David
    Joe|Sandra
    reltable
    memberkey | ancestorkey |distance |is_leaf
    David|NULL|NULL|0
    David|David|0|0
    Sandra|Sandra|0|0
    Joe|Joe|0|0
    Sandra|David|1|0
    Joe|Sandra|1|1
    Joe|David|2|1
    facttable
    personid|revenue
    David|5
    Sandra|5
    Joe|10
    and my joins conditions are, I join pctable to reltable and then reltable is joined to facttable like this.
    pctable.personid = reltable.ancestorkey
    reltable.memberkey = facttable.personid
    and then in the report, when I pull up the pchierarchy build from pctable and revenue , I get as below and like I said, when I click on Sandra to see the revenue she contributes, I am not able to navigate. Can you let me know what modifications needs to be done?
    ---David(20)
    ----Sandra(15)
    ------Joe(10)

  • DB Adapter wizard – WHERE clause on parent and child tables not working.

    I have two tables, SECURITY and SECURITY_POSITIONS, where SECURITY has a 1:M relationship with SECURITY_POSITIONS. I used the DB-adapter wizard to create the relationship and the following WHERE clause expression which is looking at both the parent and the child tables;
    The expression builder looks like this:
    AND
    |--- 1. partitionKey EQUAL p_SearchKey
    |--- 2. securityType EQUAL “DBT”
    |--- 3. securityPositionsCollection.dealReference EQUAL “NA”
    The primary key on SECURITY = PARTITION_KEY and SECURITY_REFERENCE
    The foreign key from SECURITY_POSITIONS to SECURITY = PARTITION_KEY and SECURITY_REFERENCE
    securityType is on SECURITY table (master)
    securityPositionsCollection.dealReference is on SECURITY_POSITIONS table (child)
    The invoke on the database adapter is selecting a row in securityPositionsCollection for each child row, rather than just those with dealReference = “NA”!
    I turned on DEBUG logging in the BPEL console and I can see that there are 2 SELECT queries run (guess this is how Toplink does it!), where the 1st query appears to select the parent rows and the 2nd query selects the child rows.
    However the 2nd query is not working because it is failing to select only those child rows where dealReference = “NA”. Also, don’t know why the 2nd SELECT query needs to specify the child SECURITY_POSITIONS table twice in the FROM clause, because that seems to be causing the problem.
    1st query executed is as follows;
    SELECT DISTINCT t0.PARTITION_KEY, t0.SECURITY_REFERENCE, t0.SECURITY_TYPE
    FROM CENTRAL.SECURITY t0, CENTRAL.SECURITY_POSITIONS t1
    WHERE ((((t0.PARTITION_KEY = ?) AND (t0.SECURITY_TYPE = ?)) AND (t1.DEAL_REFERENCE = ?)) AND ((t1.SECURITY_REFERENCE = t0.SECURITY_REFERENCE) AND (t1.PARTIT
    ION_KEY = t0.PARTITION_KEY)))
    bind => [200706200000, DBT, NA]
    2nd query executed is as follows, where child table appears twice! ;
    SELECT DISTINCT t0.DEAL_REFERENCE, t0.PARTITION_KEY, t0.SECURITY_REFERENCE
    FROM CENTRAL.SECURITY_POSITIONS t0,
    CENTRAL.SECURITY_POSITIONS t2,
    CENTRAL.SECURITY t1
    WHERE ((((t0.SECURITY_REFERENCE = t1.SECURITY_REFERENCE) AND (t0.PARTITION_KEY = t1.PARTITION_KEY)) AND
    (((t1.PARTITION_KEY = ?) AND (t1.SECURITY_TYPE = ?)) AND
    (t2.DEAL_REFERENCE = ?))) AND
    ((t2.SECURITY_REFERENCE = t1.SECURITY_REFERENCE) AND
    (t2.PARTITION_KEY = t1.PARTITION_KEY)))
    bind => [200706200000, DBT, NA]
    Anyone experienced the same problem e.g. why is toplink making the query more complicated that it needs to be, because the query only needs to reference the SECURITY_POSITIONS table once, as follows;
    SELECT DISTINCT t0.DEAL_REFERENCE, t0.PARTITION_KEY, t0.SECURITY_REFERENCE
    FROM CENTRAL.SECURITY_POSITIONS t0,
    CENTRAL.SECURITY t1
    WHERE ((((t0.SECURITY_REFERENCE = t1.SECURITY_REFERENCE) AND (t0.PARTITION_KEY = t1.PARTITION_KEY)) AND
    (((t1.PARTITION_KEY = '200706200000') AND (t1.SECURITY_TYPE = 'DBT')) AND
    (t0.DEAL_REFERENCE = 'NA'))) AND
    ((t0.SECURITY_REFERENCE = t1.SECURITY_REFERENCE) AND
    (t0.PARTITION_KEY = t1.PARTITION_KEY)))

    Hello,
    It looks like you have configured your 1:M relationship to use batch reading. This causes the query to bring in the Security_Position table's objects to use the same selection criteria as was used on the initial query, with a join statement. This is more efficient in most cases as it ensures only the Security_positions needed for the Security objects to be fully built are read, in a single query.
    The selection criteria added is only used to filter out the Security objects. All referenced Security_Positions must be read in for the returned Security objects so that the data matches what is in the database. If you do not want the Security_Positions, you might try using indirection on the mapping which will delay the second query until you need the Security_Positions. Or, if you want only the Security_Positions with dealReference EQUAL “NA", you could do a query specifically to filter on them.
    Best Regards,
    Chris

  • Parent Child Hiearachy not working while applying from prompt

    Hi,
    I have a requirement to have a prompt on parent-child hiearachy. I am able to create prompt but when we are selecting anything in that prompt then value is not passing in the main report. I mentinoned "override with prompt" in selection steps, but still prompt is not working. I am using OBIEE 11.1.1.5.
    Please let me know if I am missing anything.
    Thanks
    Anirban

    Hi All,
    Any updates on this.
    Thanks
    Anirban

  • Call function with rfc or not ?

    How can I know that an function is called by rfc or not ?
    info : The caller is not R/3 system. This web interface...
    thanks in advance

    Hi Stephan,
    Try this FM
    TRANSACTION_CALL_VIA_RFC
    Data : v_bdi_line type bdi_line.
    Call Function 'TRANSACTION_CALL_VIA_RFC'
         Exporting
             tcode = sy-tcode.
         importing
             transaction_data = v_bdi_line.
         Exceptions
             tcode_not_exist = 1.
    if sy-subrc ne 0.
       It means it is RFC call.
    endif.
    Reward points if it helps you.
    Regards,
    Sudhakar.

  • Call transaction in new session not working inside CRM Interaction Center

    Hi Experts,
    I have developed a report which contains a screen with push button. When user clicks on button a  transaction (FPL9) is being called and opened in new session or window. But when the report is being called in CRM Interaction Center using transaction launcher and button is clicked no new session or new window is being opened. Our requirement is FPL9 transaction will be opened in new session / window inside Interaction Center also.
    Please help me how to open a new session or window  in interaction center on push botton click.
    Thanks in advance.
    Regards,
    Arnab

    Hi Anil..
    This is the Solution for ur Requirement.   try this program and change as per ur need.
    REPORT  ZSEL_CALL_TCODE.
    data : IT_KNA1 TYPE TABLE OF KNA1 WITH HEADER LINE.
    DATA : IT_SPA TYPE TABLE OF RFC_SPAGPA WITH HEADER LINE.
    SELECT * FROM KNA1 INTO TABLE IT_KNA1 .
    LOOP AT IT_KNA1 .
      WRITE:/ IT_KNA1-KUNNR HOTSPOT ON.
      HIDE IT_KNA1-KUNNR .
    ENDLOOP.
    CLEAR IT_KNA1-KUNNR.
    AT LINE-SELECTION.
    CASE SY-LSIND.
    WHEN 1.
    IF IT_KNA1-KUNNR IS NOT INITIAL.
    REFRESH IT_SPA.
    IT_SPA-PARID = 'KUN'.
    IT_SPA-PARVAL = IT_KNA1-KUNNR.
    APPEND IT_SPA.
      CALL FUNCTION 'ABAP4_CALL_TRANSACTION' STARTING NEW TASK 'S1'
        EXPORTING
          TCODE                         = 'XD02'
         SKIP_SCREEN                   = ' '
        MODE_VAL                      = 'A'
        UPDATE_VAL                    = 'A'
      IMPORTING
        SUBRC                         =
       TABLES
        USING_TAB                     =
         SPAGPA_TAB                    = IT_SPA
        MESS_TAB                      =
      EXCEPTIONS
        CALL_TRANSACTION_DENIED       = 1
        TCODE_INVALID                 = 2
        OTHERS                        = 3
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      ENDIF.
    ENDCASE.
    <b>Reward if Helpful.</b>

  • SetVisible() function for JDialog is not working on Macintosh machine

    Hi All,
    I have coded 2 dialog boxes and i m making only one dialog box visible at a time and using threading.
    But using setVisible() function works fine when I am running that code on windows platform; while when I run on macintosh machine this is not working.It seems as i setvisible() is not executing at all on macintosh machine.
    I am using jdk1.5 on both windows as well as on macintosh.
    Tell me if there is some other method to make dialog boxes/frames visible/invisible.
    Waiting for reply
    Thanks

    Since you mentioned that you're using threading, I have to ask: have you ensured that setVisible is called on the EDT, possibly by wrapping it in a SwingUtilities.invokeLater ?
    db

  • Caller ID on TV does not work.

    This feature has become so unreliable that I have had to make several calls and send emails to Verizon.  The last tech promised me that the problem was resolved for ever, but alas, the problem has returned.  No caller ID on TV.  It works OK on my phone displays, but not on the TV.  Did anybody have any luck resolving this issue permanently?  If so, how?
    This issue was last resolved under ticket{edited for privacy} on Oct. 14, 2011.

    PreciousBella wrote:
    My just changed to the Digital Voice and my caller ID is not appearing on my TV screen either.  I asked the tech and they said to make sure the it was enabled.  I did and it was but I am still not getting caller ID on my screen. If anyone has figured out how to make it work, please share. Thanks 
    Worked for me
    http://forums.verizon.com/t5/Home-Phone-Landline-or-Digital/How-to-get-Caller-ID-on-TV-working-again...

Maybe you are looking for

  • /616 Add gross salary Issue

    HI, We have an issue in /616 wage type (Add Gross salary) 1. How do we calculate /616 wage type value manually? 2. /616 wage type is difference between grass salary that including arrears payment i guess. but i don't know how do we calculate manually

  • Custom Components and Properties in Flex Builder Design View

    How do I create a custom component with custom properties that renders well in Flex Builder design view? This is a simple HelloWorld example of what I am trying below. Here is the HelloWorld.mxml file: <?xml version="1.0" encoding="utf-8"?> <mx:Canva

  • Airport express is green but not showing up

    My airport express used to work awesome, when my timecapsule was hosting the wireless. My time capsule died, and now my airport express doesn't work. I have done a thousand resets, and eveytime i set it up witout any trouble. Then after a couple of h

  • Getting select options in module pool screen

    hi experts, can any one suggest me how to provide select options in module pool screen. thank you, regards vijay

  • List of features of new Patch level

    Hello experts, Can you advise how to find list of features of new patch level, would be great if someone shares the link. Attached is one such sample. I am looking for features of PL 5 and 6 of 9.1 Thanks Deepak