As3 get position from object in other object

please i need help, i have a object inside this object i have other objects, (MC.Part1,MC.Part2,MC.Part3...etc), the MC rotate in the escene, that with interpolation, with the tools of flash,that is ok, the object parent rotate and the childs with he, but i want obtain the coordenate from the childs (MC1.Part1.x, MC1.Part1.y,MC1.Part1.z, etc), i try with trace(MC1.Part1.x), and always give me the same coordenate, i think is the coordenate in the parent, but i want the coordinate of the child when the parend is rotating.
Please help me

The coordinates of the child objects do not change relative to the parent that holds them if the parent is being moved, so they will report the same values all of the time.  If you want to know the location relative to the main stage, then you need to make use of the localToGlobal() method.  Try searching Google using terms like "AS3 localToGlobal tutorial" to get an explanation of how to use it.

Similar Messages

  • How to get Position from EmployeeInfo in DIAPI

    I am using DIAPI(JCO) for SAP B1. According to one or my reuirement i am in need of Position from the EmployeesInfo. But there  seems no option or method for getting position from that. Can anyone guide me how to get that from EmployeesInfo ? Any help is appreciated..

    Looking at the DI API properties vs. DB fields mapping documentation in the SAP Business One developer area (https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/c5f5dbcc-0a01-0010-5d82-f25f2bee715e)
    it seems that this field is not exposed (yet).
    I.e. you could only run a SQL statement to get this information.
    Sorry,
    Frank

  • Get Position from 9512 Encoder in FPGA

    Hello,
    I am using the following Software/Hardware:
    LV2010 with SoftMotion, Realtime, and FPGA modules
    cRIO-9073 with NI 9512 Stepper Card and associated NI Drive
    Misc Input and Output cards for digital signals
    My application is essentially a conveyor capable of running up to 12.5 inches/sec with product spaced at approx 1.25" intervals.  I need to locate the parts on the conveyor using a trigger photoeye and then initiate different actions at different points of the conveyor as the product traverses down the conveyor.  The spacing between parts is variable.
    This is my first RT/FPGA application but I have underwent the NI Training.  I was originally planning on using the RT controller in scan mode, but my initial testing shows this may not be fast enough.  I have written code to perform the following:
    1. Activate Conveyor
    Using Softmotion Function Blocks the RT controller starts the stepper motor and hence runs the conveyor.  I am currently testing the conveyor at two speeds to simulate real life conditions (Currently testing at 6 in/s and 12.5 in/s)
    2. Capture Trigger Position
    Capture the part location using a photoeye.  I am NOT currently using the position capture feature of the 9512.  Instead I have a loop looking for a rising edge of the trigger photoeye and then using the Softmotion Function Block to read the current position at that point.  I shift the position into an array to serve as a shift register.  To reduce jitter, I may eventually go to the hardware capture point on the 9512.
    3. Inspect Part
    I have another loop constantly evaluating the position of the belt using a Softmotion FB read and searching the array to see if the current position minus an offset amount (distance of device from trigger point) is in the array within a given tolerance.  For instance, say a part was seen on the conveyor after the belt has moved 1.000" from its initialization.  1.000" is shifted into the array from step #2 above.  A visual inspection of the part needs to occur at 10" from the photoeye.  The loop monitors the position of the belt and when the position of the belt is seen between 10.980 and 11.020", the inspection loop triggers the inspection and evaluates the results.  The results are updated in the shift register for the part evaluated.  As you can see, the jitter in the system requires a window and not an exact value.  Obviously, I want this window to be as small as possible.
    4.  Divert Part
    Based on the inspection results, the part is divereted off of the belt.  Another loop monitoring the conveyor position (using the Softmotion FB Read) is constantly inspecting the current position to see if the part is in the diverter position.  This loop functions exactly as Step #3 but the offset is different (15.000").  When the conveyor position is between 15.980" and 16.020", the diverter is activated if the part is bad.
    5. Monitoring Loop
    This is a test loop I have added to determine the jitter in the system and how much conveyor movement has occurred since the last scan.  Basically this loop uses the Softmotion Read FB and subtracts the previous iteration's position from the current iteration to determine the belt movement since the last scan.
    ISSUES
    I have all loops set to sync with scan engine and the scan engine running at the default 5mS.  With the conveyor moving at 6 in/sec, I am seeing the monitor loop show a conveyor movement of approx 0.031" between scans.  This indicates that the part moved 0.031" before the RT controller can respond to this.  Therefore, the position tolerance windows in steps 3 and 4 above have to be greater then 0.031" to see the part and react as it passes by the point on the conveyor.  In this instance it seems to be working, but occasionally, the distance traversed is much greater.  If that occurs, then parts can be missed.
    When I run at 12.5 in/sec, I am seeing about double the distance traveled.  I need to minimize the position jitter on the system to insure that the part is as tightly controlled in location as possible.  If the part moves too much between scans, then my inspections might not be aligned with the part (ie. out of the vision FOV).  In my original research of the RT control system and discussions with NI technicians, I was under the impression that the scan engine would be running at 1kHz therefore, I could expect a position jitter of around 0.012".  Now that I have the hardware and am programming, I see that the recommended scan engine setting for Softmotion is 5ms.  That puts my position error around 0.060". 
    Furthermore, I plan on adding more inspections and actions at different points of the conveyor prior to the divert.  Therefore, it is beneficial to reduce the amount of delay.  My fall back approach was to program the hardware with FPGA which should give very quick response and minimize the position error between scans.  However, now that I am programming, I cannot find a way to control the 9512 with FPGA or read the encoder of the 9512 with FPGA.
    According to the NI C Series Module Compatibility Chart on the website, the NI 9512 is controllable from ScanEngine or FPGA.  I can create a project with FPGA and place the NI 9512 module under the FPGA portion, but there is no I/O or functions available for the module.  When adding a DIO card to the FPGA, Inputs and/or Output nodes are created.  Also, the Softmotion tools palette only has a couple of commands and none refer to the encoder. Am I overlooking something.
    SPECIFIC QUESTIONS
    1. How does one control the NI 9512 in FPGA.
    2. How can the encoder count from the NI 9512 module be examined in FPGA.
    3. Any insights on how to optimize the project or if it can be done in FPGA with the 9512 hardware.
    My gut feeling is that I will have to abandon the Scan Engine approach and go straight FPGA, but I am struggling to find ways to control the 9512 with FPGA.
    Thanks,
    Rick

    Hello Andy,
    Thank you for the reply.  I have reviewed that document and cannot find anything specific about the NI 9512 Stepper Module.  I understand how to create a small FPGA project, but the problem I'm specifically having is that when I add the NI 9512 module under the FPGA target, I do not get any FPGA I/O available.  When I add the 9512 module to slot 3, I can see the module itself under the FPGA target, but there is not any FGPA I/O available under Mod3 (there isn't even a Mod3 folder created).  I have attached a JPG showing my project and the absence of any Module 3 I/O.
    I cannot find a way to obtain the Enoder count from the 9512 module in FPGA.  I have searched for some examples on how to control this module in FPGA, but cannot find anything relevant.  Can you elaborate more specifically concerning the NI 9512 module in FPGA mode.
    Thanks,
    Rick
    Attachments:
    FPGA.jpg ‏35 KB

  • AS: getting integer from object reference of text for insertion point

    I'm thinking in data merge that I need an integer for the insertion point. I have a handy object reference that says, "text from character 78 to character ..."
    I'm trying different ways to get that first integer, but all the backwards ways are failing to turn it into an integer. Brute force such as coercion fail to work. How would you extract "78" from a object reference? thanx, sam

    Thanks, that certainly appears to work, sam

  • Getting REF from object

    Hi guys !
    There is a part of code:
    declare
    p1 tp_permission; -- my type !
    p1_ref ref tp_permission;
    begin
    select treat(t.p as tp_permission) into p1 from tbl_permissions t where t.p.id = 1; -- OK !!!!!
    select ref(p1) into p1_ref from dual; -- here rises
    exception !!!
    end;
    Exception like that:
    "inconsistent datatypes: expected TP_PERMISSION got
    REF TP_PERMISSION".
    Why !? I need in REF.
    Thanx in advance.

    Dirk, yes, it's clear ...
    But difficult is that;
    Here my types inheritance:
    1.
    create or replace type TP_SYS_ABSTRACT_OBJECT as object (
         id                    number,               obj_name          varchar2(1024),      descr               varchar2(1024)
    ) not final not instantiable
    2.
    create or replace type TP_PERMISSION3 under TP_SYS_ABSTRACT_OBJECT (
    And for polymorphism I create table for storing
    all inherited types ...
    create table tbl_permissions of TP_SYS_ABSTRACT_OBJECT;
    and now i have problem with type casting.
    But I found just now !
    declare
    p1_ref ref tp_permission;
    p1 tp_permission;
    p2_ref ref tp_sys_abstract_object;
    begin
    select ref(t) into p2_ref from tbl_permissions3 t where t.id = 1;
    select treat(p2_ref as ref tp_permission) into p1_ref from dual;
    end;
    It's compiled ...
    How about it, Dirk ?

  • Can not get output from Objective DAC without Pulseaudio [SOLVED]

    I have owned the ObjectiveDAC/O2 Amp combo for a couple of months now. Unfortunately I was unable to get the device to function properly without pulseaudio installed. When trying to configure it on a pure alsa system, I can set it as the default control card in alsamixer. The issue is that when I set it as the default pcm device, it fails to work. I can select the device in pulseaudio fine, and my system recognizes the device in alsa, however I cannot, for some reason, actually use the device. It seems that pulseaudio butchers sound quality, and I would greatly appreciate any help being able to get my device working without it. I can't believe that any sane individual would actually make part of the audio stack downmix audio by default.
    It was just a lack of understanding of Alsa's config syntax. I do apologize for taking up space on the forums. I now have Alsa running with my DAC just fine.
    Last edited by agahnim (2015-05-01 13:50:28)

    Yeah that's what I meant. Try to burn a new cd at a slower speed. When the new one is done create a hashsum of the new burn and compare it to the iso you used to burn it with. I only say this because a few times in the past when I had sr0 errors while booting live cds it was because the disk was messed up and I had to burn it again.

  • T.jizdnirady.cz, this site does not recieve my position from GPS, in other browser yes. Fix it pls. it is very important for me, many THX.

    The start position is blank.

    Looks like the link you originally clicked was a scam to get you to submit your username and password.  I reckon the email from Google was legit (because it did not ask you to enter your username and password, but advised you to change your password.)  So it looks like they did actually block a sign-in attempt.  Sometimes, scammers do send out emails like this, but they are the ones which ask you to sign in again (because it's those details they are after).
    Given that you've changed your password three times you should be safe.  The golden rule is never submit usernames and passwords when prompted from an email - it's almost certainly a phishing attempt designed to get hold of your details.

  • LoaderInfo get values from EMBED and OBject Tag (not FlashVars)

    hi
    i try get values from object and embed tags like bgColor and
    allowFullScreen
    but i cant find how i can it
    loaderInfo.parameters return only flashVars
    if some body know it please help
    thank you
    Sonettic Cinema
    Project

    <forward name="success" path="/jsp/success.jsp" redirect="true" />
    but when success.jsp page gets called its not displaying the username and usertype values on page.The request has been redirected to success.jsp(*redirect="true"*) and hence the attributes stored in request object will not be available in success.jsp. Use Session to store login user information instead.

  • How to get data from structures ??

    HI
    I have to do a report.I had given structures instead of display tables.we cant get data from the structures. are there any FM to diaplay data from structures or shd i need to sreach the fileds in display table
    Regards
    Rasheed

    Hi,
    There are several ways to find the tables:
    1) Choose the data elements that the structure fields belong to - do a 'Where User' in SE11 to see any tables - check using SE16.
    2) Use ST05 and or SE30 to trace the transaction and see what tables are being read.
    3) In many areas there are Function Modules that does these reads - could you please provide more details of the area you are trying to get data from?

  • Why did folk category get removed from radio when I double clicked on it?

    When I double clicked on 'folk' category it disapeared.  How do I get it back?

    So your problem is that the video won't play at all. This is probably because Sony has tweaked the 'codec' used to to compress the video. Usually camcorders come with software that can play the clip.
    So:
    Tell us what Sony camcorder you used.
    Install the software that came with your camcorder and see if that can show the footage.
    As requested tell us the exact error message you are receiving.
    Run the clip through 'GSpot' and post a screen capture here.
    Cheers,
    Neale
    Insanity is hereditary, you get it from your children

  • Dynamic Positioning of Objects in a Grid (rows and columns) AS3 Tutorial

    The topic of a dynamic positioning of objects in a right grid (rows and columns) comes up often so I decided to post an AS3 solution here:
    http://flashascript.wordpress.com/2010/12/25/arranging-objects-into-2d-dynamic-grid-with-a ctionscript-3/

    Hard to tell from your description but this might help:
    http://dtptools.com/product.asp?id=atid
    Bob

  • Dynamic Positioning of Objects in a Grid (rows and columns) with AS3 Tutorial

    The topic of a dynamic positioning of objects in a right grid (rows and columns) comes up often so I decided to post an AS3 solution here:
    http://flashascript.wordpress.com/2010/12/25/arranging-objects-into-2d-dynamic-grid-with-a ctionscript-3/

    Hard to tell from your description but this might help:
    http://dtptools.com/product.asp?id=atid
    Bob

  • How can I get the underlying object from the ObjectReference

    Dear friends,
    I think this question has been asked a couple of times. But, I am still wondering if anybody has found an answer to it. Maybe this is some common need ...
    I would like to get the underlying object for which the ObjectReference is
    a mirror For example, I have a class Customer in my application, and I can get an ObjectReference through JDI during runtime. But how can I get the target VM's object which is a real instance of Customer, by which I can invoke methods defined in Customer?
    Thank you so much for any input!
    SunnyDay

    I'll preface this response by admitting this far from an elegant solution, but I did write a function addressing this question, mostly as an exercise.
    If passed an object with an InTextFrame property (Pgf, AFrame, Cell, Fn) that resides in an open document, the function will return the Doc object. Otherwise, it returns undefined.
    function getParentDoc(testObj) {
        //Get object for current page
        try { var curPage = testObj.InTextFrame.FrameParent.PageFramePage; }
        catch(er) {return;}
        //Step backwards to first page in document
        var prevPage = curPage.PagePrev;
        while (prevPage.ObjectValid())
            curPage = prevPage;
            prevPage = prevPage.PagePrev;
        //Compare with first pages of open documents
        var testDoc = app.FirstOpenDoc;
        while (testDoc.ObjectValid())
            if (curPage.id==testDoc.FirstBodyPageInDoc.id) return testDoc;
            testDoc = testDoc.NextOpenDocInSession;    
        return;
    To your PPS: Rather than seeing the native framework grow bloated to address additional features, I would love to see Adobe and other developers publish libraries of useful functions and class extensions.

  • How to get an ArrayList Object in servlet from JSP?

    How to get an ArrayList Object in servlet from JSP?
    hi all
    please give the solution for this without using session and application...
    In test1.jsp file
    i am setting values for my setter methods using <jsp:usebean> <jsp:setproperty> tags as shown below.
    After that i am adding the usebean object to array list, then using request.setAttribute("arraylist object")
    ---------Code----------
    <jsp:useBean id="payment" class="com.common.PaymentHandler" scope="request" />
    <jsp:setProperty name="payment" property="strCreditCardNo" param="creditCardNumber" />
    <%-- <jsp:setProperty name="payment" property="iCsc" param="securityCode" /> --%>
    <jsp:setProperty name="payment" property="strDate" param="expirationDate" />
    <jsp:setProperty name="payment" property="strCardType" param="creditCardType" />
    <%--<jsp:setProperty name="payment" property="cDeactivate" param="deactivateBox" />
    <jsp:setProperty name="payment" property="fAmount" param="depositAmt" />
    <jsp:setProperty name="payment" property="fAmount" param="totalAmtDue" /> --%>
    <jsp:useBean id="lis" class="java.util.ArrayList" scope="request">
    <%
    lis.add(payment);
    %>
    </jsp:useBean>
    <%
    request.setAttribute("lis1",lis);
    %>
    -----------Code in JSP-----------------
    In testServlet.java
    i tried to get the arraylist object in servlet using request.getAttribute
    But I unable to get that arrayObject in servlet.....
    So if any one help me out in this, it will be very helpfull to me..
    Thanks in Advance
    Edward

    Hi,
    Im also facing the similar problen
    pls anybody help..
    thax in advance....
    Litty

  • How do I get an activeX object reference from a LabVIEW ActiveXContainer ref?

    How do I get an activeX object reference from a LabVIEW ActiveXContainer ref?
    I'm trying to control an ActiveX object (a Web Browser) from another VI and need to get the object reference programmatically. I can get the LabVIEW ActiveXContainer reference, but am lost on how to get the reference for the object _inside_ the container.

    Hi Lee,
    The reference to the container is actually also accessing the object inside the container. Use the Property Node and Invoke Node to access properties and launch methods for the object. I've attached a small example that passes the reference to a SubVI and invokes a method inside the SubVI.
    - Philip Courtois, Thinkbot Solutions
    Attachments:
    WebContainer.zip ‏21 KB

Maybe you are looking for

  • CMSS-3D and modes quest

    I've bought a XtremeGamer and being new at it I'm wondering about that feature. If it is enabled, does it have any effect in games that have 5. surround built in? I know it produces virtual surround from stereo so it should not interfere with games t

  • Auto-fill doesn't seem to remember my passwords?

    I have a MacPro & MBP. On the MacPro, Safari's autofill does not remember my passwords, but it does on my MBP. I sync all together using MobileMe. Any ideas why it doesn't work on the MacPro? Both machines are using Mac OS X 10.5.8. I looked at the A

  • 720p display resolution is too big for tv

    I recently got the kanex hdmi adapter to hook my mbp to my tv. The quality is superb and sound is good as well. However, the picture is slightly too big for my size of television. I had to select the 720p option so that my tv could recognize my compu

  • Default Environment layer ?

    Hey, does anyone know how I can specify which Environment layer gets new objects if/when they're created by Track->Create Multiple... ? I've played around with inserting and deleting layers, and I haven't yet found a reliable way to control where the

  • Where can I find this software?

    Hi, I am a law student and for taking our exams we use a program called "ExamSoft". The law school puts this on our computers but since I have an apple they will have to run it through Windows using bootcamp. In order to do this, I was told that I ne