Mutiple mc to two targets (Urgent question tq)

currently i am doing a game assignment in school
mc: red1, red2, red3, red4, red5 [match to target_red]
mc: green1, green2, green3, green4, green5 [match to target_green]
after the mc drag to the right target, the mc will be disappear as right drag -- because the target is a bag
so, what should i do in the code part?
i think i have try many codes that i found online
but still cannot get the results i want
actually my mc got 50+ to put into 2 different targets..
somebody help me T__T
the assignment need to hand in in one more day, and i still haven figure out the code part
my code now is like this:
var startX:Number;
var startY:Number;
red19_mc.addEventListener(MouseEvent.MOUSE_DOWN, pickUp);
red19_mc.addEventListener(MouseEvent.MOUSE_UP, dropIt);
function pickUp(e:Event)
          red19_mc.startDrag();
function dropIt(e:Event)
          red19_mc.stopDrag();
          if (red19_mc.hitTestObject(target_red))
                    trace("CORRECT");
          else
                    trace("WRONG");

for(var i:int=1;i<=5;i++){
this["red"+i].startX = this["red"+i].x;
this["red"+i].startY = this["red"+i].y;
this["green"+i].startX = this["green"+i].x;
this["green"+i].startY = this["green"+i].y;
this["red"+i].addEventListener(MouseEvent.MOUSE_DOWN,downF);
this["green"+i].addEventListener(MouseEvent.MOUSE_DOWN,downF);
this["red"+i].addEventListener(MouseEvent.MOUSE_UP,upF);
this["green"+i].addEventListener(MouseEvent.MOUSE_UP,upF);
function downF(e:MouseEvent):void{
e.currentTarget.startDrag();
function upF(e:MouseEvent):void{
e.currentTarget.stopDrag();
if((e.currentTarget.name.indexOf("red")>-1 && e.currentTarget.dropTarget.name.indexOf("red")>-1) || (e.currentTarget.name.indexOf("green")>-1 && e.currentTarget.dropTarget.name.indexOf("green")>-1){
e.currentTarget.visible = false;
} else {
e.currentTarget.x=MovieClip(e.currentTarget).startX;
e.currentTarget.y=MovieClip(e.currentTarget).startY;

Similar Messages

  • Use one fpga vi to control two targets

    Hi,
    I have two fpga because I need more than 8 analogue output and analogue input.  I wonder if I can use one fpga vi to control two targets (the two FPGA boards I use are PCI-7833R) so that the outputs can be synchronized.  I think if it's possible it'll be easier to implement the synchronization between while loops,etc.  If it's not possible, how can I interface between between fpga.vi and make the synchronization possible and make two vi's talk to each other?  Thank you very much for your help!
    Thanks,
    Charles

    I have successfully ran the same code on two (2) different FPGA boards. The difference being that the host will use different Aliases to control the FPGA boards,
    Both FPGA Boards MUST be the same type ( I used PXI-7811s). 
    My program consisted of 6 individual communication portals and there was NO synchronization between boards
    Visualize the Solution
    CLA
    LabVIEW, LabVIEW FPGA

  • Drag and Drop game with only two targets

    I created a drag and drop activity where their are five boxes that are supposed to go in to two columns in any order. I found a tutorial online that I based this activity off of.
    The problem is that the tutorial shows you how to make a target for each mc which has worked for all the activities I've made except for this one where I need only two targets. How would I change it so I can have multiple mc's drop on to one target?
    This is my AS:
    var score:Number = 0;
    var objectoriginalX:Number;
    var objectoriginalY:Number;
    growing_mc.buttonMode = true;
    growing_mc.addEventListener(MouseEvent.MOUSE_DOWN, pickupObject);
    growing_mc.addEventListener(MouseEvent.MOUSE_UP, dropObject);
    gorging_mc.buttonMode = true;
    gorging_mc.addEventListener(MouseEvent.MOUSE_DOWN, pickupObject);
    gorging_mc.addEventListener(MouseEvent.MOUSE_UP, dropObject);
    dormancy_mc.buttonMode = true;
    dormancy_mc.addEventListener(MouseEvent.MOUSE_DOWN  , pickupObject);
    dormancy_mc.addEventListener(MouseEvent.MOUSE_UP, dropObject);
    cystform_mc.buttonMode = true;
    cystform_mc.addEventListener(MouseEvent.MOUSE_DOWN  , pickupObject);
    cystform_mc.addEventListener(MouseEvent.MOUSE_UP, dropObject);
    hosttrans_mc.buttonMode = true;
    hosttrans_mc.addEventListener(MouseEvent.MOUSE_DOW  N, pickupObject);
    hosttrans_mc.addEventListener(MouseEvent.MOUSE_UP, dropObject);
    function pickupObject(event:MouseEvent):void {
    event.target.startDrag(true);
    event.target.parent.addChild(event.target);
    objectoriginalX = event.target.x;
    objectoriginalY = event.target.y;
    function dropObject(event:MouseEvent):void {
    event.target.stopDrag();
    var matchingTargetName:String = "target" + event.target.name;
    var matchingTargetisplayObject = getChildByName(matchingTargetName);
    if (event.target.dropTarget != null && event.target.dropTarget.parent == matchingTarget){
    event.target.removeEventListener(MouseEvent.MOUSE_  DOWN, pickupObject);
    event.target.removeEventListener(MouseEvent.MOUSE_  UP, dropObject);
    event.target.buttonMode = false;
    event.target.x = matchingTarget.x;
    event.target.y = matchingTarget.y;
    score++;
    scoreField.text = String(score);
    } else {
    event.target.x = objectoriginalX;
    event.target.y = objectoriginalY;
    if(score == 5){
    response_mc.gotoAndStop(2);

    var matchingTargetName:String =(event.target.name).substring(0, 1);
    Change the name of the target to A and B and the mc A1, A2, A3, A4... and B1, B2,B3...

  • Urgent question:can you replace source video and automatically have AE swap clips in timeline?

    Hi there
    Have an urgent question. I have finished editing a project that has been edited from pre-exported videos, but the problem is that i have been notified last minute if it is possible to change parts of it!
    Is is possible to change and re-render the pre-exported clips at same length that are affected and then replace the 'source footage' in after effects to have it automatically swap the clips that I've edited and cut up already? As it would take a very messy and extremely long time to manually change all the trimmed parts!
    It is only a small section of the source clip I need to change, but the overall composition edits are fine so I don't really need to touch that, it's just really to replace the footage but have everything to stay the exact same.
    Please advise!
    Appreciate this if anyone can! fairly urgent
    Thanks

    Yes, just right-click on a source in the Project bin and choose Replace Footage.

  • Urgent Question about System Center Server Names and Dashes

    Hey guys I have a quick Urgent question that would be awesome if it happens to get answered quickly :). 
    So in the past we had problems with different server names in components of System Center when setting up different servers.... I never myself saw the errors or what it did, but an absentee colleague did. For example is anything wrong with a name setup like
    xx-scom-01 / xx-scom-02  as compared to the standard scom01 scom02? We have a certain naming convention we are moving to and I wanted to see if this was fixed. I wanted to say it had something to do with the hyphens... anyways any foresight anyone can
    provide would be awesome. Thanks!

    Dashes in the name will work fine.
    Jonathan Almquist | SCOMskills, LLC (http://scomskills.com)

  • I have an urgent question about my indesign. I had problems with the creative cloude app and then uninstalled it and then installed it again. Now it is not opening and I cannot download it again either. Pls give me help and advice if there is anything I c

    I have an urgent question about my indesign. I had problems with the creative cloude app and then uninstalled it and then installed it again. Now it is not opening and I cannot download it again either. Pls give me help and advice if there is anything I can do to repair it

    Please authorize ADE 3 with same credentials that you used with older version of ADE

  • How to make af: query (ResultComponentId) has two target values?

    hello all :D
    i'm newbie in jdev, i have little problem with af:query.
    how to make af: query (ResultComponentId) has two target values?
    thx
    agungdmt :D

    I think you can simply set the second target control's partialTrigger to the af:query.
    and access to the same binding attribute as your first target. (e.g.: if you have 2 target tables, set the value to #{bindings.XxxxxVO1.collectionModel})
    Samson Fu

  • Urgent questions about XMPL Standalone Deployment

    Hi,
    I've got some urgent questions from customer as below:
    1. Could XMLP be depoyed to BEA Weglogic?
    2. Could customer use Weblogic user to log on to XMLP?
    3. How is the performance of XMLP compared with other reporting tools?
    4. When will XMLP 5.6 release?
    Hope somebody can give me a hand!!!
    Regrads,
    Libra

    i am not sure abt the release date, but XMLP 5.6 Enterprise Edition comes with its own OC4J Component, refer to Mark Rittman's Blog for more details
    http://www.rittman.net/archives/2006/03/taking_a_sneak_peek_at_xml_pub.html

  • Urgent question about two monitors for Sun Ultra 40 M2

    Hello,
    I feel extremely unhappy to ask you the following.
    I bought recently a Sun Utra 40 M2. I thought that with NVIDA Quadro FX1500 one could have two monitors as there are two DVI-D 's to connect with two monitors.
    But today I heard from SUN support that Sun does not support two monitors under SUN Solaris 10. It is possible with Linux on this SUN Ultra 40, but not with Solaris, so it was told to me.
    But: is this true? I still can not believe it.
    with friendly greetings,

    Hello,
    I see, with Windows it is possible just lik that and with Solaris one needs two cards.
    Well, it seems for a one man"s business customer like me: end of story.
    I still can not believe it that Sun would arrange this.
    I will wait and see.
    with friendly greetings,
    P_ter

  • Two New Membership Questions

    I am coming to Photoshop from another editing program and face a bit of a learning curve.
    Two questions.
    Because of the learning curve, I am interested in starting with just a subscription to photoshop . Is the single subscription for Photoshop ($19.99 per month version with a contract), for Photoshop or Photshop Extended?
    Second, will it be possible to upgrade mid contract from just photoshop to the full Master Collection, either ending or converting the original contract without having to pay both at once (similar to the way you can with cell phones)?
    Thanks for your time

    Your best bet would be to contact Adobe Customer Service with your questions.  There are several FAQs online which may help you.  In this one http://www.adobe.com/products/creativesuite/faq.html  I found the following:
    If I decide I would like to upgrade to Adobe Creative Cloud rather than continue to subscribe to an individual CS6 application, how do I do that?
    You can upgrade your subscription to a Creative Cloud membership by logging in to www.creativecloud.com, going to the My Account page, and simply walking through the steps to upgrade. You will be given a partial refund on the remaining amount due on your existing subscription.
    Good luck!

  • Phantom Frame Appears Between Two Clips Updated Question

    I can't edit my other question anymore, so here's a follow-up. When I move from edit point to edit point, there does appear to be one between the two clips. I hit Select using the dropdown menu, but the options to cut or delete are grayed out afterwards, so it doesn't seem like anything is getting selected. Does anyone know how to select a clip too small to see? Thank you.
    Final Update: I got it selected and deleted! I just moved the cursor along the bottom of the timeline instead of moving it in the middle of the timeline, which was just giving me the double-arrow handle thing, or whatever it is.
    Thanks for looking!

    In my continued conversation with myself, I'm replying so I can figure out how to mark question answered.

  • URGENT QUESTION concerning Pavilion DV6 laptop charger

    Hey I have a question: I have two HP laptops; one is the Pavilion dv6 and has a charger with the series number PPP009L-E, with input 1.6A and 65W;
    The other laptop is the Pavilion dv6-3236NR, with the charger having the series number PPP009D, with input 1.7A and 65W.
    My question is, can I use the second charger for the first charger's laptop? My first Pavilion dv6 won't charge at all! Could someone PLEASE help me ASAP and tell me if it's the charger's problem, battery problem, or both, and whether I could use the second charger on the laptop!

    Hi Sekhar,
    Well the error code would certainly indicate that the drive has started to fail, but just in case, you could try wiping the entire Hard Drive first and then reinstalling the Operating System as described below.
    Download and install Killdisk on the link below - ( this application will write zeros to the entire drive ).
    http://software.lsoft.net/KillDiskSuiteFree-Setup.exe
    Download and install ImgBurn on the link below.
    http://download.cnet.com/ImgBurn/3000-2646_4-10847481.html
    Go to the Kill Disk application you have installed in All Programs, open the main folder, then select Bootable Disk creators and from that select Bootable DOS CD Creator which will burn the bootable ISO to a blank CD.
    During the next process do not worry about any warnings as your Windows 7 installation disc will reformat the HDD.
    Insert this CD in to your PC that is unable to load Operating System properly. Shut the notebook down, then start it again to boot from the Killdisk CD and follow the on screen instructions for Kill Disk.
    A brief description of the process is here Killdisk.
    Use this to wipe the whole of the Hard Drive, highlight (80h) and press f10 ( you will also have to type a confirmation and hit enter ) - ( this will make sure you include all partitions and then start the process - this may take a couple of hours! ). 
    When the process is complete, remove the Killdisk CD and try installing Windows 7 again.
    If it still fails, I think your only option is to replace the HDD.
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • Deleting requests from Cube with code using infopackage with two targets

    hi experts,
    Working on BW 3.5.
    I am creating a process chain to load from a table in a source system to two Infocubes.
    In the start routines of the update rules depending on the date of load, if it is not the last day of month InfoCube A will be loaded with data and InfoCube B will have Datapackage deleted but a request will still load but will contain no data.
    And vice versa if it is the last day of month.
    In InfoCube A I only want to retain a rolling 15 days of data and have entered a "Delete Overlapping Request from Cube" step.
    In the "Deletion-selections" of this step I have added a "Request Selection through Routine" and put in the following code;
      del_date = sy-datum - 15.
      loop at l_t_request_to_delete.
        if l_t_request_to_delete-timestamp+0(8) GT del_date.
          delete l_t_request_to_delete.
        endif.
      endloop.
    My question is, how can I ensure this delete code will only work for InfoCube A, as I only want the rollings 15 days of data in here, in Infocube B I want to store all the requests that are loaded here for the end of month.

    Hi
    Try in some sql browser with outer joins and you will see the problem.
    select *
    from (select nvl(leverklant.klant_code,'-1') fk_cube_abonnementen_kla_code,
         nvl(factuurklant.klant_code,'-1') fk_cube_abonnementen_kl2_code
         from ods_titsub
         left outer join dim_klant leverklant on (leverklant.klant_code = ods_titsub.cust)
         left outer join dim_klant factuurklant on (factuurklant.klant_code = ods_titsub.sta_cust)
         where (case substr(ods_titsub.isbn,1,8) when 'FBVISTAQ' then 'J' else 'N' end) = 'N'
         and ods_titsub.rec_sta <> 'X'
         and ods_titsub.curr_start >= to_date('01011999', 'DDMMYYYY')
         and ods_titsub.curr_start <= to_date('01022008', 'DDMMYYYY')
         and (leverklant.klant_sk is null or leverklant.klant_sk = leverklant.dimension_key)
         and (factuurklant.klant_sk is null or factuurklant.klant_sk = factuurklant.dimension_key)) a
    left outer join dim_klant b on
         b.klant_code = a.fk_cube_abonnementen_kla_code and
         b.dimension_key = b.klant_sk and b.klant_sk is not null
    left outer join dim_klant c on
         c.klant_code = a.fk_cube_abonnementen_kl2_code and
         c.dimension_key = c.klant_sk and c.klant_sk is not null
    Regards
    Result will be like:
    FACT_TABLE DIM1 NULL
    FACT_TABLE NULL DIM2
    but never like:
    FACT_TABLE DIM1 DIM2
    Message was edited by:
    Armands

  • AS3 newbe target my_mc question

    Good day to all of you. I have a basic question.
    I have movC_mc inside movB_mc inside movA_mc
    AS2 to access movC_mc from the my Actions layer in frame 1 in the root would be
         movA_mc.movB_mc.movC_mc
    My question is how can I target the movA_mc from the root of my .fla
    This is what I got so far
    movA_mc.addEventListener(MouseEvent.ROLL_OVER, a_player);
    function a_player(e:MouseEvent):void{
        Object(this).movA_mc.movB_mc.movC_mc.x = 250
    I am sure this is very simple, but just can't get my head to transition from AS2 to AS3.
    Thanks again 

    if all 3 movieclips were created in the authoring environment use:
    movA_mc.addEventListener(MouseEvent.ROLL_OVER,  a_player);
    function  a_player(e:MouseEvent):void{
        movA_mc.movB_mc.movC_mc.x = 250
    if any were created with code, referencing mov_mc may be different.

  • BPM 11g urgent questions

    Questions:
    1, we don’t want to have the “Bulk Actions” function. Is there a way to delete the select column and bulk action function?
    2, how to change a worklist table header? For instance, can we change the “Participant” to “Assigned to”?
    3, almost all the workspace customizations are done by modifying files in OraBPMStudioHome. These customizations will apply to all projects. Is there a way to make project specific customizations? If we have two projects running at the same time, how should we do the project specific customizations?

    Hi user586942,
    You can customize the columns by creating your own view of the inbox. You can select whichever columns you want. You can use flex fields to add columns with data from the form. These changes are process/user activity specific so you can have a different view for each process.
    Here is where you can read about flex fields
    http://download.oracle.com/docs/cd/E14571_01/doc.1111/e15175/bpmug_ws_admin.htm#sthref118
    For your question on bulk actions, which tool are you using?
    Heidi.

Maybe you are looking for

  • When to use getVariableData() in Assign? Really no direct access?

    Assume I have (simpified) a scope variable "foobar" with the complex-type <xsd:element name="foobar" type="mytype"/> <xsd:complexType name="mytype"> <xsd:sequence> <xsd:element name="foo" type="xsd:string"/> <xsd:element name="bar" type="xsd:int"/> <

  • TREX problem: Rapid Installer 2.0

    First I try to install EP 6.0 SR1 with Rapid Installer 2.0, I got an trex error in the installation. In this forum (read by Nicky Gromeleit) I got the information that installing TREX in rapid installation is not possible so I try again the following

  • How to calculate No.of Weeks?

    Hi Mates, My problem has not solved so far. As I have already posted last week I have no clue from forum  to fix it. I want to explain once again . Please tretthis as urgent. I need to calculate <b>no.of weeks</b> to current date from Rel.date. I hav

  • TS1424 Error -1202, I am not able to complete a purchase after entering security information

    When I try to purchase music, i keep getting this error and it will not finish the purchase.  Anyone have a fix?

  • Find missing data from parent table

    hI, PLEASE IGNORE ABOVE STATEMENT JUST NOW GOT THE RESULTS SELECT c.table_name CHILD_TABLE, p.table_name PARENT_TABLE FROM user_constraints p, user_constraints c WHERE (p.constraint_type = 'P' OR p.constraint_type = 'U') AND c.constraint_type = 'R' A