How do you call a function in an attached MovieClip from the current MovieClip?

Hi there,
I have this MovieClip A (converted as a symbol) and put in my
main MovieClip B using attachMovie() , and I am wondering how I can
call a function defined in A from within B.
Is it possible?
Thanks

Hi kglad,
yes, I did the attachMovie of the symbol B and it seems like
none of the ActionScript written in B was not carried over.
This is how I built B into a symbol :
(1) Two layers ( one for the ActionScript only, the other for
the Components)
(2) I defined the functions to be called remotely by A in the
ActionScript layer
(3) I selected all the components in the Components Layer and
did a Convert To Symbol
(4) I added the Symbol into A's Library
(5) I used attachMovie to instantiate the Symbol of B
I must have missed out something somewhere
Thanks

Similar Messages

  • How can you tell what type of Iphone I have from the model number or serial number from the settings menu

    how can you tell what type of Iphone I have from the model number or serial number from the settings menu?

    Type Serial Number from Settings App here https://selfsolve.apple.com/agreementWarrantyDynamic.do it will tell you the type of iPhone.

  • How do you call a function within a package using OCI in C

    I am trying to call a user-defined function in Oracle 8.1.7 using OCI in C. I am getting a ORA-06550 PLS-00221, <function name> is not a procedure or is undefined. Can anyone tell me how I would call a function using OCI?
    Thanks.

    I think I figured it out, but I am now getting a ORA-06512 error; numeric or value error: character string buffer too small.

  • How do you call a function that belongs in a package?

    Hello,
    Can anyone help me with this issue? My intent is to create a procedure that returns a cursor to the results of the query without passing in the cursor to the function. After reading thru online tutorials, I found that I had to create a function, not a procedure.
    I created a .sql file as such:
    create or replace package GetEmployeeCursors is
    type empResultSet is REF CURSOR;
    function Funct1 return empResultSet;
    end GetEmployeeCursors;
    create or replace package body GetEmployeeCursors is function Funct1 return
    empResultSet is
    tmpResultSet empResultSet;
    begin
    open tmpResultSet for
    select * from employee;
    return tmpResultSet;
    end Funct1;
    end GetEmployeeCursors;
    Both the package and package body were created without any problems.
    Then, I tried to call the Funct1() in many ways, including the following:
    call System.getEmployeeCursors.Funct1()
    call getEmployeeCursors.Funct1()
    call Funct1()
    All produced the following error message:
    ERROR at line 1:
    ORA-06576: not a valid function or procedure name
    How do I call Funct1()?
    Thanks so much in advance,
    --Anna                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Hello Frank,
    Thanks for the information regarding not using the system schema when creating packages.
    I tried what you suggested to call the Funct1 in many ways:
    SQL> mycursor := system.getEmployeeCursors.funct1;
    SP2-0734: unknown command beginning "mycursor :..." - rest of line ignored.
    SQL> mycursor := getEmployeeCursors.funct1;
    SP2-0734: unknown command beginning "mycursor :..." - rest of line ignored.
    SQL> mycursor := funct1;
    SP2-0734: unknown command beginning "mycursor :..." - rest of line ignored.
    SQL> select *
    2 from table(system.getEmployeeCursors.funct1);
    from table(system.getEmployeeCursors.funct1)
    ERROR at line 2:
    ORA-22905: cannot access rows from a non-nested table item
    Could there be something else I need to do before making the function call?
    Thanks alot!
    --Anna                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How do you call a function module in a web dynpro application ?

    Why do you delete my postings ?????????????????????????????
    pls see subject
    Edited by: Ilhan Ertas on Apr 1, 2009 4:51 PM
    Edited by: Ilhan Ertas on Apr 1, 2009 4:52 PM

    Its not me deleting them.  Perhaps a different moderator or a technical problem within SCN itself.
    Someone might be concerned about your question because it is very basic.
    You can call a function module from WD the same way you did in any ABAP program - with the CALL FUNCTION syntax.  There is a service call wizard that will generate a matching context and calling code for you - but it is just a helper, code generator.  Everything it does can be done by hand as well (and often better than the generator).

  • How do you call a single block in a form from a different form ?

    Hello All,
    I'm trying to call a particular block in a form. The actual call is done via fnd_function.execute. This brings up 2 blocks:
    1) a find/search block
    2) the block I want with the correct information based on the parameters I have passed in.
    Everything so far is OK with the exception of not wanting the 'find' block to appear. I've tried to hide the associated window by using the hide_window function but this doesn't work. Anyone got any new ideas I can try ?
    Thanks in advance
    Sandy

    If you have both blocks on the same canvas they will both appear if you navigate to a field in either block.
    So, put each block on its own canvas. When you navigate to a field in one block only that block will appear.
    As far as navigating to a block from another form there is not built-in function to do that. You can only call and entire form from another form. You could however pass a parameter from the calling form to the called form. On the when-new-form-instance of the called form check for the parameter value and go_item('myblock.myitem') which will display the block you want.
    Message was edited by:
    Mark Reichman

  • How can I get an item and it's attachments from the current list using SP's JavaScript Client Object Model on newform.aspx?

    I only recently learned/read about SharePoint's JavaScript Client Object Model. I'm reading online trying to figure this out but not having much luck.
    On newform.aspx (and dispform.aspx) I want to get the
    current list,
    the last item created, and it's attachments. I now the CAML query I need to get the last item created, but first I have to get the current list and I am not sure how to do that.
    I tried this but it returns null:
    SP.ListOperation.Selection.getSelectedList()

    Hi,
    For your issue, you can get the list name from the new form url and retrieve the list last created item :
    https://social.msdn.microsoft.com/Forums/office/en-US/b90a64f8-2255-41b0-9d91-78335dd4a4cf/get-list-name-from-list-url-through-javascript?forum=sharepointdevelopmentprevious
    http://msdn.microsoft.com/en-us/library/office/hh185007(v=office.14).aspx
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • How to set a bind variable into a vo query from the current vo ?

    I would like to exclude from my list of values defined in a view object the already referenced items in the current view object content.
    Let's say i have dept and emp with a many to many relationships, I would like that the already existing dept for emp not listed (excluded) in the list of values for emp.
    Do i need to define a bind parameters and set it during search or is it possible to use an expression that will refer the current row attribute representing the dept ?
    I didn't find an example or explanation how to set bind parameters defined in a view object query from seach pages or list of values ui components. May be somebody know how to find the info.
    Thank you

    I think that bind variable accessors in the VO class is what you need. You can override the getter method of the bind variable "LocaleCode2" in order to return the first 2 chars from the bind variable "LocaleCode". Have a look at this blog post for details:
    http://jdeveloperandadf.blogspot.com/2011/03/custom-java-bind-variable-in-where.html
    Dimitar

  • How do you rename a component file (in a book) from the FDK?

    ...and upate all the links?

    Good question. There is no function for it, AFAIK. There is an fcode:
    #define KBD_BOOKRENAMEFILE
    0x30C
    ...and F_ApiNotify() responds to a rename action with that code, but I wouldn't know how to initiate the process with the code. FCodes work good for simple commands, but I don't know how you would submit the new name, etc. Maybe somebody else knows. If not, you might have to build it yourself.
    Russ

  • Calling a function in a flex app from a loaded SWF

    How can I call a function in a flex application from a loaded
    swf file?

    Two ways:
    Application.application returns a reference to the top-level
    application scope. You can access any public member, var, function,
    component, etc through that reference.
    Dispatch an event event form the loaded swf and use a event
    handler in the main app. All the gurus advise this as best
    practice, to ensure "loose coupling" It is also pretty easy,
    especially if you use a bubbling event.
    Tracy

  • How do you run loop functions on specific frames of nested Movieclips?

    I'm still pretty new to AS3 and I've run into a problem that I never had with AS2.  I have a project where the 1st frame of the main timeline is the loading screen and the second frame has buttons and a title bar that I want to be on every "page" of my project.  There are 7 buttons that take the user between 7 different "pages", which consist of 7 frames of a movieclip I have filling the content area on frame 2 of my main timeline.  I'll call this movieclip "pages_mc".
    The problem is that frame 6 of the pages_mc movieclip has the following code:
    var moving = 0;
    var xmoved;
    var xbegin = pano_cont.pano_image.x;
    parts_mc.addEventListener(Event.ENTER_FRAME, moveImage); // constantly moves the image 1 pixel left or right depending on the button pressed
    btn_left.addEventListener(MouseEvent.MOUSE_DOWN, moveLeft); //changes the variable "moving" to 2 on mouse down
    btn_right.addEventListener(MouseEvent.MOUSE_DOWN, moveRight); //changes the variable "moving" to 1 on mouse down
    btn_left.addEventListener(MouseEvent.MOUSE_UP, stopMoveLeft); //changes the variable "moving" to 0 on mouse up
    btn_right.addEventListener(MouseEvent.MOUSE_UP, stopMoveRight); //changes the variable "moving" to 0 on mouse up
    function moveImage(e.Event):void{
    xmoved = xbegin - pano_cont.pano_image.x;
        if(moving == 1)
            pano_cont.pano_image.x -= 1;
        if(moving == 2)
            pano_cont.pano_image.x += 1;
        if(xmoved < -(pano_cont.pano_image.width/2)+180)
            pano_cont.pano_image.x = -2538;
        if(xmoved > (pano_cont.pano_image.width/2)- 180)
            pano_cont.pano_image.x = -2178;
    function moveRight (e:MouseEvent):void
        btn_right.gotoAndStop("down");
        moving = 1;
    function moveLeft (e:MouseEvent):void
        btn_left.gotoAndStop("down");
        moving = 2;
    function stopMoveLeft (e:MouseEvent):void
        moving = 0;
        btn_left.gotoAndStop("active");
    function stopMoveRight (e:MouseEvent):void
        moving = 0;
        btn_right.gotoAndStop("active");
    This is all just some code to allow users to move a panaromic image around on the screen.  But when I navigate to a different page from of my pages_mc movieclip I get the following output message:
    TypeError: Error #1099: Cannot access a property or method of a null object reference.
         at SampleProject_fla::Content_MC_1/moveImage()
    I'm thinking this is happening because the "parts_mc" movieclip I referenced for the ENTER_FRAME event listener no longer exists (unless you go back to frame 6 of pages_mc).  I'm not sure how to remove this event listener when the user moves to another frame of pages_mc.
    Any help would be greatly appreciated.

    kglad wrote:
    what's parts_mc.parts_mc???
    Not sure where you see that.  I see pages_mc.parts_mc which is just because the parts_mc movieclip is nested on the 6th frame of the pages_mc movieclip.
    At any rate, I was able to get it working by moving all the code onto frame 2 of the main timline and declaring all of my vairables on frame 1 of the main timeline.  I then added an ENTER_FRAME event listener onto one of my movieclip buttons (main_btn) on the main timeline and had it check what frame the pages_mc movieclip was on.  If it was frame 6, I then executed the moveImage function and had it remove the event listener from the main_btn movieclip if the frame changed away from frame 6.
    Seems to be working so far.
    Here's the code:
    Frame 1
    /* Declaring variables. */
    var pagenumber:Number;
    var moving:Number = 0;
    var firstTime:Number = 0;
    var xmoved:Number;
    var xbegin:Number;
    Frame 2
    pages_mc.addEventListener(Event.ENTER_FRAME, pageNum);
    pages_mc.addEventListener(Event.ENTER_FRAME, BtnSelParts);
    /* Keeps track of current page. */
    function pageNum(e:Event):void
        pagenumber = pages_mc.currentFrame;
        title_bar.gotoAndStop(pages_mc.currentFrame);
    function BtnSelParts(e:Event):void
        if(pagenumber == 6)
            btn_parts.gotoAndStop("current");
            if(firstTime == 0)
                btn_main.addEventListener(Event.ENTER_FRAME, moveImage); //moves the panorama image left or right
        else
            if(btn_parts.currentFrame == 32)
                btn_parts.gotoAndStop(1);
    function moveImage(e:Event):void
        if(pagenumber==6)
            if(firstTime == 0)
                pages_mc.btn_left.addEventListener(MouseEvent.MOUSE_OVER, overLeft); //animates left arrow button on rollover
                pages_mc.btn_right.addEventListener(MouseEvent.MOUSE_OVER, overRight); //animates right arrow button on rollover
                pages_mc.btn_left.addEventListener(MouseEvent.MOUSE_DOWN, moveLeft); //changes the variable "moving" to 2 on mouse down
                pages_mc.btn_right.addEventListener(MouseEvent.MOUSE_DOWN, moveRight); //changes the variable "moving" to 1 on mouse down
                pages_mc.btn_left.addEventListener(MouseEvent.MOUSE_UP, stopMoveLeft); //changes the variable "moving" to 0 on mouse up
                pages_mc.btn_right.addEventListener(MouseEvent.MOUSE_UP, stopMoveRight); //changes the variable "moving" to 0 on mouse up
                pages_mc.btn_left.addEventListener(MouseEvent.MOUSE_OUT, rollOutLeft); //animates left arrow button on rollout
                pages_mc.btn_right.addEventListener(MouseEvent.MOUSE_OUT, rollOutRight); //animates right arrow button on rollout
                xbegin = pages_mc.parts_mc.pano_image.x;
                firstTime = 1;
            xmoved = xbegin - pages_mc.parts_mc.pano_image.x;
            if(moving == 1)
                pages_mc.parts_mc.pano_image.x -= 1;
            if(moving == 2)
                pages_mc.parts_mc.pano_image.x += 1;
            if(xmoved < -(pages_mc.parts_mc.pano_image.width/2)+180)
                pages_mc.parts_mc.pano_image.x = -2538;
            if(xmoved > (pages_mc.parts_mc.pano_image.width/2)- 180)
                pages_mc.parts_mc.pano_image.x = -2178;
            if(pages_mc.parts_mc.pano_image.pano1.currentFrame == 1)
                pages_mc.btn_sel.gotoAndStop(1);
            if(pages_mc.parts_mc.pano_image.pano1.currentFrame == 2)
                pages_mc.btn_sel.gotoAndStop(2);
            if(pages_mc.parts_mc.pano_image.pano1.currentFrame == 3)
                pages_mc.btn_sel.gotoAndStop(3);
        else
            btn_main.removeEventListener(Event.ENTER_FRAME, moveImage);
            firstTime = 0;
    } // controlls the panaromas
    Let me know if you see any problems with this.
    Thanks again.

  • How do you call 0900 numbers on iphone?

    how do you call 0900 numbers on iphone? it keeps saying that i cant call it- is there a code or anything?
    im on vodafone
    thanks

    thanks for the advice both
    ive noticed though that sometimes companies provide a cheaper alternative to an 0900 number as in 8***** or something - if this makes any sense? but even those numbers are still blocked???

  • How can I call a function from a procedure

    I have a function named: f_calc_value which return the variable v_result. This function is part of a package.
    How can I call this function from a new procedure I am creating?
    Thanks

    or refer this theread....calling function from procedure

  • How to call a function in one .js file from another .js file

    Hello Techies,
    I am trying to call a function in two.js file from one.js file.
    Here is my code
    one.js
    <script>
    document.write("<script type='text/javascript' src='/htmls/js/two.js'> <\/script>");
         function one()
                        var a;
                       two(a);
              }two.js
                  function two(a)
                          alert("two");
                      }But the function two() is not working.
    How can I do this one??
    regards,
    Krish

    I think there is a syntax error in line
    document.write("<script type='text/javascript' src='/htmls/js/two.js'> <\/script>");
    end tag <\/script> is wrong.

  • How do you call a field?

    Good morning everyone,
    I'm trying to work with the BufferedInputStream (work from friday) and i went to the website:
    http://java.sun.com/j2se/1.4.2/docs/api/java/io/BufferedInputStream.html#BufferedInputStream(java.io.InputStream)
    at that website they have a "field summary" and i want to use the buf array (cause it says thats where the data is stored) but i cant figure out the coding to put it in my project. how do you call a field?

    Fr. Murderess,
    a) The short answer is "no". Only public methods and fields can be accessed that way.
    b) If getting the "buf" field is of paramount importance to you, declare a class like this:
    public class MyBufferedInputStream extends BufferedInputStream {
        public MyBufferedInputStream(InputStream in) { super(in); }
        public MyBufferedInputStream(InputStream in, int size) { super(in, size); }
        public byte[] getBuf() { return buf; }
        public void setBuf(byte[] newBuf) { buf = newBuf; }
    }to get and set the "buf" field. As you can see by reading the source code of BufferedInputStream, the other fields (count, pos and markpos) are needed too, and you will need to provide the getters and setters for the other fields.
    It's better not to "fiddle" with the protected fields of BufferedInputStream. Simply use BufferedInputStream "as is", and don't bother about the "buf" field.
    I think that you will need to tinker only with the size of the buffer (maybe to cache more data inside), but it is available in the second constructor of BufferedInputStream (InputStream in, int size).

Maybe you are looking for

  • Can't send or receive email on e72

    Hi all. For a few weeks now my e72 hasnt been receiving any emails. It's set to do so automatically. Originally I just thought it was just a small delay but almost a month later and still nothing. I have tried to receive manually, send a test email a

  • Download Folder Icon

    Recently, the icon, fan, grid, or any view setting for checking my download folder on the dock has stopped updating any changes made to it. If I delete a file from the Downloads folder, the icon or any view on the dock will still show the file listed

  • 1Z0-045 (for 8i OCPs or Gold DBA 10g)

    Hello Gurus, OTN members, Please clear my doubt about upgrade certification exam. I am Oracle 8i OCP certified (DBA track); I want to upgrade myself from 8i to 10g; for which I selected paper code "1Z0-045" title "Oracle Database 10g: New Features fo

  • Need solution for a Reporting Requirement

    Hello Experts, I need design a solution for Report, where in I need to show ageing of Invoice based of Due date of Invoice for last four weeks as explained below: In cube i have records like this: Industry       Invoice Number      Due Date      Amou

  • Possible?: I need to hook up a VIA SATA chipsetPCI card to macbook in winxp

    I haven't installed windows XP on my macbook yet, but I will soon. When I do, I want to be able to use this chipset :http://www.dealextreme.com/details.dx/sku.7598 with my macbook and for it to be recognized in windows XP. I want to be able to hook u