"On Chnage Of" Conditional Switching Event

Hi All,
I want to change the value in the Global Auxiliary Field of the Event 'On Change of', with which it checks for the changes.
Please suggest whether this is possible or not.
Regards,
Pankaj Agarwal

hi pankaj ,
data : begin of itab occurs 0,
       matnr(18),
       val(6) ,
       end of itab .
       itab-matnr = '0233-8019'.
       ITAB-VAL   = '10'.
       APPEND ITAB.
       itab-matnr = '0233-8019'.
       ITAB-VAL   = '20'.
       APPEND ITAB.
       itab-matnr = '0233-8020'.
       ITAB-VAL   = '10'.
       APPEND ITAB.
      LOOP AT ITAB .
      ON CHANGE OF ITAB-matNR.
      WRITE:/ 'EXECUTED ONCE FOR ', ITAB-matnR.
      SET PARAMETER ID 'MAT' FIELD itab-matnr.
      CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
      ENDON.
      ENDLOOP.
this is getting executed only once .. that is what ur saying .. agreed ..
now //This is because my list contains duplicate Work Orders. If I select the same Work Order multiple times then it should call the transaction only once. //
this is resolved ..
2..
for single order ..
data : begin of itab occurs 0,
       matnr(18),
       val(6) ,
       end of itab .
       itab-matnr = '0233-8019'.
       ITAB-VAL   = '10'.
       APPEND ITAB.
      LOOP AT ITAB .
      ON CHANGE OF ITAB-matNR.
      WRITE:/ 'EXECUTED ONCE FOR ', ITAB-matnR.
      SET PARAMETER ID 'MAT' FIELD itab-matnr.
      CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
      ENDON.
      ENDLOOP.
For the above case it is working fine. But if I am selecting only a single Work Order & then after calling the Transaction I<b> want to view the same order again, the execution will not go into the ON CHANGE OF Event and will skip those lines because the value of this Work Order has not changed in the Global Field of ON</b> CHANGE OF.
exactly when i run the code in the option 2 i know for sure that there is only <b>one entry</b> .. so loop executes <b>only once</b> and the mm03 transaction is called only once ..
now u cannot view the same order again as the loop is not iterated , it has gone executed and came back .. now how will this skip lines come into effect ..
please let me know if im missing some thing over here..
regards,
VIjay

Similar Messages

  • When syncing multiple Google calendars to iPad, switching event to different calendar on iPad creates a duplicate in Google. Ideas?

    When syncing multiple Google calendars to iPad, switching event to different Google sub-calendar using iPad creates a duplicate in Google.
    Using Google account with the Exchange setup on an iPad mini. iOS up to date. I have a secondary calendar in my Google account for some appointments, and when I create the event on the iPad and it defaults to my main Google calendar, changing the event to the secondary calendar caused the following:
    1) at first, the event totally disappeared from my iPad. Scary! Reappeared when I went into Gcal on the web, opened the event to edit, and re-saved. Phew.
    2) Failing to re-create error #1, I switched a new event from primary to secondary calendar, and it then appears correct on iPad, but is duplicated on the web. The duplicate remains even after deleting the changed event on iPad, refreshing Gcal, etc.
    Just curious if anyone else is having this problem or has discovered a workaround or fix.

    When you open the Calendar app, tap the button at the top-left corner (Calendars).  That should reveal all the calendars you have available, and you can select/ un-select any or all of them.
    If you don't see your 2nd GMail calendar listed, go into Settings/ Mail/ (account name) and make sure you've turned the calendar ON for this account.

  • Conditionally  Switch Model Driven Lov In Jdev 12c problem

    Hi
    I this the following is a bug in Jdeveloper 12c
    I downloaded the  the demo application "How-to conditionally switch model driven LOV in ADF forms and tables"
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html
    and I open it using Jdeveloper 12c 12.1.2
    Click on the SOrdView  view object
    Click on the attribute tab and select "PaymentDetail"
    Click on List of values tab to see  the two defined LOVs
    now try to edit any one of these two LOVs by click on the pencil icon to open the edit LOV window
    On the Edit LOV window click on UI Hint to add or remove displayed attributes
    You will see that the shuttle list is dimmed . I mean disabled and this is the problem. Why it is disabled
    Is this a bug in Jdeveloper 12c?
    if it is not, how can i remove a displayed attribute from the list
    Please help

    Yes  I did
    In fact I know well how to make switch model driven LOV.
    In the very beginning I tried to do this task in my work and I find out this problem. So I downloaded the Demo to test it and I discovered that the demo too does not work.

  • Condition/Terminate Event Problem

    Hi,
    When I call a condition after take the Approval but it is taking default reject task even if i take Approved button,
    Else
    When i call a Terminate Event after take the Approval but it is taking default reject task even if i take Approved button,
    What could be the problem here
    Regards,
    Peter Son

    Hi Martin,
    In my Program i called Workflow for User Command When Save/Approved/Rejected three Workflow's separately called.Work's fine in all stages Initiator starts workflow by Save the screen, If approver press Approved button the 2nd Workflow will start, If Approver press Rejected button the 3rd Workflow will start.
    All these 3 workflow's are not linked each other in one workflow. All 3 are in separate,
    Everything goes well, only the mail send to the Initiator not happening its taking who has taken last action (Approved/Rejected) that manager is receiving mail instead of getting Initiator.
    I have not used any step like Condition / Terminate Events in my workflows.
    Regards,
    Peter Son

  • Change the condition in event structures

    Hi all,
    I am a student, currently doing a project. I'm very new to labview and I don't really know much of the function in labview. Anyway, I have this timer made using event structure if I'm not mistaken (I downloaded this timer from one of the post in this forum). This timer will start at 0s, count to 20s, then stop. So what can I do to change the end time of this timer?? Let's say stop at 50s??
    Attached is the program. Kindly please explain to me or modify the program and attached back as a reply. I've been trying to figure it out from the help function, but still don't understand.
    Thank you very much in advance!!!
    Solved!
    Go to Solution.
    Attachments:
    TIMER s.vi ‏13 KB

    Hi,
    Thanks for your inquiry. The VI attached uses a couple of programming structures: While loop, Event structure and Case structure. What you would have to change is actually the case structure. Before we go to that, let us go through the different structures. Open up the block diagram by going to the Menu bar of the front panel and navigate to Window->Open block diagram.
    The While loop is like a Do Loop in text based programming. It will execute until a condition is met. From the attached VI, it stops running when you click the exit button.
    The Event structure is a structure which consists of subdiagrams. The structure responds to interactions with front panel objects. For example, if you click the start or stop button in the front panel, the event structure will switch to a case which corresponds to this interation. In the attached VI, the case, which corresponds to intreaction with the start or stop button, is called  "Start", "Stop": Value Change. Each case will contain an event-handling routine.
    Case structures are like switch statements in text programming. Take a look at the "Start", "Stop": Value Change event. It contains a routine which consists of a case structure. The case structure responds to the input terminal called Start (which is actually the start button on the front panel). The case structure switches between cases according to this input. To view the different cases just cycle through the case structure by clicking the left and right buttons. There are only two cases: True or False as the input is a boolean.
    Now lets take a look at the VI. Take a look at the "Timeout" case of the event structure. This is where the modification needs to be made. Modify the case structure by editing the cases. Change the numbers in case structures: ..20000 to ..50000  and 20001.. to 50001.. This should do the trick.
    Regards,
    Alan Bong

  • RSCRM_BAPI and Start Condition after Event

    Hello all
    I have a process chain set up that loads data to cubes. I wish to run RSCRM_BAPI after a certain cube has loaded.
    I create the extract in RSCRM_BAPI and for the START condition I use 'After Event' does anyone know if this is correct and if it is how do I identify the event that I want the job to run after or do I use 'After Job' and agin if so how do I idntify job etc.
    Thanks
    George

    Hi,
    Using Customer Exit Variables we can work with RSCRM_BAPI. See some example. If you need differnet reports i.e. formates then create the copy of the same reports an dchange the selection variables with Month, Week , Day like that using Customer exit variable.
    Re: Running Quaries automatically and saving them in as a Excel file in Server
    Re: Data transfer to external systems
    Re: Loading from a Custom R/3 Table
    Re: How can I schedule my Bex report to execute in background
    Re: How can I insert the RSCRM_BAPI into Process chain?
    See the help abt Customer Exits variables in Reports.
    https://wiki.sdn.sap.com/wiki/display/profile/Surendra+Reddy
    How to transfer the Data from SAP-System to Non-SAP system without additional Cost/License
    /people/surendrakumarreddy.koduru/blog/2009/03/11/how-to-transfer-the-data-from-sap-system-to-non-sap-system-without-additional-costlicense
    Thanks
    Reddy

  • Starting a job with 2 conditions (User Event and end of job)

    Hello ,
    I'd like to make a process SAP which start a job depending
    on 2 conditions :
    Condition 1 : raise an event
    and
    Condition 2 : end of another job
    I know that it 's possible for each conditions but is it possible for both conditions ?
    Thank you

    hi again,
    Ok, i'm sorry, my english is not yet fluent.
    I'm searching a solution for an SAP administrator.
    Here is his problem :
    He must launch an Abap program with a job1.
    The abap programm  :
    1>generates a spool in which you can find status code like OK or NOK and
    2>raises an event (EVT_CONTINUE) only if the spool contains OK code.
    Afterwards, The administrator wants to launch job2 if
    2 conditions are OK :
    Condition 1 : EVT_CONTINUE is raised
    Condition 2 : job 1 is terminated
    My question is : is-it possible with a transaction like sm36 or another to do that. (my objective is to avoid
    writing an abap program)
    thanks

  • Condition Type Event for button doesnt fire after Tab Change?

    Hi,
    I have 3 Tabs (Interactive Reports) and when I change between these Tabs (without submit) my parameters getting null values, which is OK. For this situation my "condition type" of a button doesn't fire (button should disappear when parameter is null)?
    cheers,
    Bernhard
    Edited by: boffman on 05.07.2010 17:12

    IR reports use all the bells and whistles of DHTNL and Ajax. So without the Submit evnt you do not reload the page but only reload relevant regions (PPR).
    Net result is that the other items that have already been loaded when the page was loaded remain as they are, hidden or dispayed as the case may be.
    One could theoritically use Javascript to hide/show ($x_Hide and $x_Show) to toggle the buttom. But I am not clear how one would trigger that! which event on which HTML element? The tabs are generated by Apex as DHTML and that I believe is a black box.
    If a eent to trigger JS can be found then it will work.
    Regards.

  • Catch the Tab Switch Event

    Hi All,
    I have a few tabs in my OAF page. I would like to capture the event when the user switches between tabs.
    Could anyone please tell me the code in processFormRequest ?
    Thanks
    Ponraj

    Hi Gaurav,
    I have a few tabs, each of them have a shuttle region. I shuttle some items in each of the shuttle regions available list to selected list.
    But when i submit in the end, the selected values are visible only for the tab from which i click on the submit button.
    But the values are retained in the selected lists of all the tabs if I walk through them and even after refresh. My plan is to keep them in a datastructure whenever user navigates between tabs and use that datastructure in the final submit to retrieve the selected values of all the shuttle regions.
    Hope you understood the problem
    Thanks
    Ponraj

  • Conditional stopping event structure

    Hi all
    Attached is my Vi , I want to stop the event structure in loop 1 , from the loop 2 which is continously running in parallel and getting digital input from a DAQ device.
    whats happening is first I am checking the status of teh digital input and then on that I am excuting the true structure. once I am in the True case , an event structure for user operations and a parallel while loop is used to monitor the digital input , what I  want to do is as soon as the digital daq input is low again i should be back to my fasle case in the main loop but the loop 1 with event structure is not stopping.
    help
    regards
    Regards
    Attachments:
    Untitled 1.vi ‏12 KB

    Snamprogetti wrote:
    You can't put an event structure into a case structure. It will run even if you are in the other case.
    See http://forums.ni.com/t5/LabVIEW/An-event-structure-can-freeze-the-front-panel-even-if-not/m-p/106629...
    What then, is a queued state machine? . The issue is the event structure still queues your events whether or not you are in your "idle" case. So if you don't promptly return to your idle case, events can back up in the event structure causing your program to act like it's lagging. Setting a busy cursor can help to solve this problem. I felt this should be clarified because a properly set up queued state machine is very powerful. This obviously isn't the solution for the parallel loops here but I thought I should add to your point..
    CLA, LabVIEW Versions 2010-2013

  • Is there a task switch event for iOS? Like Event.DEACTIVATE for Android

    Hello,
    I need to be able to trigger a function when someone presses the front facing button that has the square in it on an iDevice.
    I've tried:
    NativeApplication.nativeApplication.addEventListener(Event.DEACTIVATE, quitApplication);
    This doesn't work on iOS but it does work on Android.
    Anyone have an idea what to do?
    -Scott

    Hi,
    If you want to exit the application on pressing the Home button, set the following in the iPhone section of application xml:
    <key>UIApplicationExitsOnSuspend</key>
    <true/>
    Thanks,
    Sanika

  • Switching touch events from symbols/classes to the main stage?

    For previous threads:
    http://forums.adobe.com/thread/864057
    http://forums.adobe.com/thread/863566
    http://forums.adobe.com/thread/864262
    http://forums.adobe.com/thread/863597
    Bug ID #2940816
    I have an app that wasn't compiling correctly. I sent the bug to Adobe who responded with a workaround. However, I can't figure out how to make their stated workaround work in my code.
    I have puzzle pieces on the stage. Each is assigned to a separate class. Inside the class I have touch events defining multiple touch events for each piece.
    I have another spot on the stage where, when it is touched, a puzzle piece appears. These are also each linked to a separate class. Inside this class I also have touch events defining multiple touch events for each piece.
    Though it works fine on my computer, it wasn't working on an iPad. Adobe said that I needed to switch the touch events so that they were assigned to the main stage instead of to each individual object.
    However, the code they gave me didn't really make sense in context and I'm confused how to implement it.
    This is the code in the class for each piece that is created when you touch the stage:
            public function GeoPiece(): void {
                if (PuzzleGlobals.currentLevel == "Name") {
                    this.gotoAndStop("wholeName");
                else if (PuzzleGlobals.currentLevel == "Abbrev") {
                    this.gotoAndStop("abbrev");
                else if (PuzzleGlobals.currentLevel == "Shape") {
                    this.gotoAndStop("shape");
                this.addEventListener(TouchEvent.TOUCH_MOVE, geoPieceBegin);
            public function geoPieceBegin (e:TouchEvent): void {
                PuzzleGlobals.pieceActive = true;
                e.target.startTouchDrag(e.touchPointID, false);
                e.target.addEventListener(TouchEvent.TOUCH_END, geoPieceEnd);
                e.target.interactionBegin();
                MovieClip(this.parent.parent).nameDisplay.gotoAndStop(e.target.abbrev);
                PuzzleGlobals.currentPiece = e.target.abbrev;
            public function geoPieceEnd (e:TouchEvent): void {
                PuzzleGlobals.pieceActive = false;
                if (currentObjOver.isLocked == true) {
                    currentObjOver.gotoAndStop ("Lock");
                else {
                    currentObjOver.gotoAndStop ("Out");
                MovieClip(this.parent.parent).nameDisplay.gotoAndStop(PuzzleGlobals.chosenPuzzle);
                e.target.stopTouchDrag(e.touchPointID);
                if (this.dropTarget.parent is GeoPuzzle) {
                    if (GeoPuzzle(this.dropTarget.parent).abbrev == e.target.abbrev) {
                        PuzzleGlobals.statesCompletedUSA++;
                        GeoPuzzle(this.dropTarget.parent).isLocked = true;
                        GeoPuzzle(this.dropTarget.parent).gotoAndStop("Lock");
                        e.target.parent.removeChild(DisplayObject(e.target));
                    else {
                        //play BOOP sound indicated wrong drop;
                if (PuzzleGlobals.statesCompletedUSA == PuzzleGlobals.TOTAL_NUMBER_USA) {
                    //play fireworks game
                else {
                    //do nothing
                e.target.removeEventListener(TouchEvent.TOUCH_END, geoPieceEnd);
            public function interactionBegin () {
                if (this.dropTarget != null && this.dropTarget.parent is GeoPuzzle) { //check to make sure it's over a puzzle piece
                    currentObjOver = GeoPuzzle(this.dropTarget.parent);
                    currentObjOver.gotoAndStop("Over");
                if (lastObjOver != currentObjOver) {
                    if (lastObjOver.isLocked == true) {
                        lastObjOver.gotoAndStop("Lock");
                    else {
                        lastObjOver.gotoAndStop("Out");
                    lastObjOver = currentObjOver;
    This is the code in the class for each piece that's already on the stage:
            public function GeoPuzzle(): void {
                if (this.isLocked == true) {
                    this.gotoAndStop ("Lock");
                if (PuzzleGlobals.pieceActive == true) {
                    this.addEventListener(TouchEvent.TOUCH_BEGIN, geoPuzzleBegin);
            public function geoPuzzleBegin (e:TouchEvent): void {
                e.target.addEventListener(TouchEvent.TOUCH_END, geoPuzzleEnd);
                e.target.gotoAndStop("Over");
                MovieClip(this.parent).nameDisplay.gotoAndStop(e.target.abbrev);
            public function geoPuzzleEnd (e:TouchEvent): void {
                if (e.target.isLocked == false) {
                    e.target.gotoAndStop("Off");
                else if (e.target.isLocked == true) {
                    e.target.gotoAndStop("Lock");
                MovieClip(this.parent).nameDisplay.gotoAndStop(PuzzleGlobals.chosenPuzzle);
                e.target.removeEventListener(TouchEvent.TOUCH_END, geoPuzzleEnd);
    You can see that each piece (whether it's already locked on the stage or movable) reacts differently to different touch events. However, this is the code that Adobe gave me as a workaround:
    this.stage.addEventListener(TouchEvent.TOUCH_BEGIN, onTouchEvent);
    this.stage.addEventListener(TouchEvent.TOUCH_MOVE, onTouchEvent);
    this.stage.addEventListener(TouchEvent.TOUCH_END, onTouchEvent);
    var beginCount:uint=0;
    var moveCount:uint=0;
    var endCount:uint=0;
    function onTouchEvent(event:TouchEvent):void{
         switch (event.type){
              case TouchEvent.TOUCH_BEGIN:
                             trace("BEGIN")
                             beginCount++;
                             square.x = event.stageX;
                             square.y = event.stageY;
                             square.startTouchDrag(event.touchPointID, false);
                             break;
              case TouchEvent.TOUCH_MOVE:
                             trace("MOVE")
                             moveCount++;
                             break;
              case TouchEvent.TOUCH_END:
                             trace("END")
                             endCount++;
                             square.stopTouchDrag(event.touchPointID);
                             break;
         trace("begin: "+beginCount+" move: "+moveCount+" end: "+endCount);
    //     countText.text = "begin: "+beginCount+" move: "+moveCount+" end: "+endCount;
    This doesn't make any sense to me because it seems that it would only work if touching the stage had to react in just a single way. I have multiple pieces that need to each react differently.
    1. The pieces that are locked to the stage need to highlight when touched and display their name.
    2. These pieces also need to keep themselves highlighted and their names displayed when the touch is dragged off of them instead of just removed.
    3. Each piece needs to be created when touching the Puzzle Piece button the stage. As these pieces are dragged, they need to highlight the pieces underneath them and unhighlight them when they are dragged off. They also need to display their own names, and lock into place when they are dragged over the correct piece.
    My questions are:
    1. Why don't touch events work in the compiler?
    2. How can I translate my current working code's touch events to all be directly linked to the stage instead of their objects?
    Thanks so much!
    Amber

    I am going to copy and paste this answer into all of the forums I've asked this question in case some noob like me comes along and needs the answer.
    I found the problem! After 3 months I finally figured out what was wrong and why my app was working in Device Central when exported as Flash 10.1 and not on my iPad when exported as AIR for iOS.
    The problem is that in the Flash runtime, if a line of code returns a bug, the flash runtime says "Error, shmerror, try again next time." So I had one if, else statement that was executing when it wasn't supposed to be - only once, at the very beginning of the program. It was throwing an error. When I exported as Flash, flash didn't care, and still executed the code later when it was supposed to. But Apple won't let their programs crash. So instead of just trying that code again, Apple decided, after the first error was thrown, that it would then COMPLETELY IGNORE that line of code. So the error was in the line where the states would unhighlight themselves. Apple just shut down that line of code, that's why it wouldn't execute properly.
    I ended up changing this line of code
    if (lastObjOver != null && lastObjOver.isLocked == true)
    which threw an error when the piece was FIRST dragged over the puzzle, to to this
    if (lastObjOver.parent != null && lastObjOver.isLocked == true)
    which wouldn't throw the error.
    Problem solved!
    If anyone else is having this problem, I suggest you do what I did. Change all your touch events to mouse events so you can run the program in the adc debugger. That's when I discovered the error being thrown.

  • Bug fix requires switching touch events from symbols/classes to the main stage?

    Also posted in Mobile Development, I'm still not sure which forum I should be in.
    For previous threads:
    http://forums.adobe.com/thread/864057
    http://forums.adobe.com/thread/863566
    http://forums.adobe.com/thread/864262
    http://forums.adobe.com/thread/863597
    Bug ID #2940816
    I  have an app that wasn't compiling correctly. I sent the bug to Adobe  who responded with a workaround. However, I can't figure out how to make  their stated workaround work in my code.
    I have puzzle  pieces on the stage. Each is assigned to a separate class. Inside the  class I have touch events defining multiple touch events for each piece.
    I  have another spot on the stage where, when it is touched, a puzzle  piece appears. These are also each linked to a separate class. Inside  this class I also have touch events defining multiple touch events for  each piece.
    Though it works fine on my computer, it wasn't  working on an iPad. Adobe said that I needed to switch the touch events  so that they were assigned to the main stage instead of to each  individual object.
    However, the code they gave me didn't really make sense in context and I'm confused how to implement it.
    This is the code in the class for each piece that is created when you touch the stage:
            public function GeoPiece(): void {
                if (PuzzleGlobals.currentLevel == "Name") {
                    this.gotoAndStop("wholeName");
                else if (PuzzleGlobals.currentLevel == "Abbrev") {
                    this.gotoAndStop("abbrev");
                else if (PuzzleGlobals.currentLevel == "Shape") {
                    this.gotoAndStop("shape");
                this.addEventListener(TouchEvent.TOUCH_MOVE, geoPieceBegin);
            public function geoPieceBegin (e:TouchEvent): void {
                PuzzleGlobals.pieceActive = true;
                e.target.startTouchDrag(e.touchPointID, false);
                e.target.addEventListener(TouchEvent.TOUCH_END, geoPieceEnd);
                e.target.interactionBegin();
                MovieClip(this.parent.parent).nameDisplay.gotoAndStop(e.target.abbrev );
                PuzzleGlobals.currentPiece = e.target.abbrev;
            public function geoPieceEnd (e:TouchEvent): void {
                PuzzleGlobals.pieceActive = false;
                if (currentObjOver.isLocked == true) {
                    currentObjOver.gotoAndStop ("Lock");
                else {
                    currentObjOver.gotoAndStop ("Out");
                MovieClip(this.parent.parent).nameDisplay.gotoAndStop(PuzzleGlobals.c hosenPuzzle);
                e.target.stopTouchDrag(e.touchPointID);
                if (this.dropTarget.parent is GeoPuzzle) {
                    if (GeoPuzzle(this.dropTarget.parent).abbrev == e.target.abbrev) {
                        PuzzleGlobals.statesCompletedUSA++;
                        GeoPuzzle(this.dropTarget.parent).isLocked = true;
                        GeoPuzzle(this.dropTarget.parent).gotoAndStop("Lock");
                        e.target.parent.removeChild(DisplayObject(e.target));
                    else {
                        //play BOOP sound indicated wrong drop;
                if (PuzzleGlobals.statesCompletedUSA == PuzzleGlobals.TOTAL_NUMBER_USA) {
                    //play fireworks game
                else {
                    //do nothing
                e.target.removeEventListener(TouchEvent.TOUCH_END, geoPieceEnd);
            public function interactionBegin () {
                 if (this.dropTarget != null && this.dropTarget.parent is  GeoPuzzle) { //check to make sure it's over a puzzle piece
                    currentObjOver = GeoPuzzle(this.dropTarget.parent);
                    currentObjOver.gotoAndStop("Over");
                if (lastObjOver != currentObjOver) {
                    if (lastObjOver.isLocked == true) {
                        lastObjOver.gotoAndStop("Lock");
                    else {
                        lastObjOver.gotoAndStop("Out");
                    lastObjOver = currentObjOver;
    This is the code in the class for each piece that's already on the stage:
            public function GeoPuzzle(): void {
                if (this.isLocked == true) {
                    this.gotoAndStop ("Lock");
                if (PuzzleGlobals.pieceActive == true) {
                    this.addEventListener(TouchEvent.TOUCH_BEGIN, geoPuzzleBegin);
            public function geoPuzzleBegin (e:TouchEvent): void {
                e.target.addEventListener(TouchEvent.TOUCH_END, geoPuzzleEnd);
                e.target.gotoAndStop("Over");
                MovieClip(this.parent).nameDisplay.gotoAndStop(e.target.abbrev);
            public function geoPuzzleEnd (e:TouchEvent): void {
                if (e.target.isLocked == false) {
                    e.target.gotoAndStop("Off");
                else if (e.target.isLocked == true) {
                    e.target.gotoAndStop("Lock");
                MovieClip(this.parent).nameDisplay.gotoAndStop(PuzzleGlobals.chosenPu zzle);
                e.target.removeEventListener(TouchEvent.TOUCH_END, geoPuzzleEnd);
    You  can see that each piece (whether it's already locked on the stage or  movable) reacts differently to different touch events. However, this is  the code that Adobe gave me as a workaround:
    this.stage.addEventListener(TouchEvent.TOUCH_BEGIN, onTouchEvent);
    this.stage.addEventListener(TouchEvent.TOUCH_MOVE, onTouchEvent);
    this.stage.addEventListener(TouchEvent.TOUCH_END, onTouchEvent);
    var beginCount:uint=0;
    var moveCount:uint=0;
    var endCount:uint=0;
    function onTouchEvent(event:TouchEvent):void{
         switch (event.type){
              case TouchEvent.TOUCH_BEGIN:
               &nbs p;           &n bsp; trace("BEGIN")
               &nbs p;           &n bsp; beginCount++;
               &nbs p;           &n bsp; square.x = event.stageX;
               &nbs p;           &n bsp; square.y = event.stageY;
               &nbs p;           &n bsp; square.startTouchDrag(event.touchPointID, false);
               &nbs p;           &n bsp; break;
              case TouchEvent.TOUCH_MOVE:
               &nbs p;           &n bsp; trace("MOVE")
               &nbs p;           &n bsp; moveCount++;
               &nbs p;           &n bsp; break;
              case TouchEvent.TOUCH_END:
               &nbs p;           &n bsp; trace("END")
               &nbs p;           &n bsp; endCount++;
               &nbs p;           &n bsp; square.stopTouchDrag(event.touchPointID);
               &nbs p;           &n bsp; break;
         trace("begin: "+beginCount+" move: "+moveCount+" end: "+endCount);
    //     countText.text = "begin: "+beginCount+" move: "+moveCount+" end: "+endCount;
    This  doesn't make any sense to me because it seems that it would only work  if touching the stage had to react in just a single way. I have multiple  pieces that need to each react differently.
    1. The pieces that are locked to the stage need to highlight when touched and display their name.
    2.  These pieces also need to keep themselves highlighted and their names  displayed when the touch is dragged off of them instead of just removed.
    3.  Each piece needs to be created when touching the Puzzle Piece button  the stage. As these pieces are dragged, they need to highlight the  pieces underneath them and unhighlight them when they are dragged off.  They also need to display their own names, and lock into place when they  are dragged over the correct piece.
    My questions are:
    1. Why don't touch events work in the compiler?
    2. How can I translate my current working code's touch events to all be directly linked to the stage instead of their objects?
    Thanks so much!
    Amber

    Sure!
    I haven't changed much. I've been playing around and I think I know where the problem is coming from now. I just can't figure out how to fix it.
    This it the only code I've modified:
            public function interactionBegin () {
                trace ("Current: " + currentObjOver);
                trace ("Last: " + lastObjOver);
                if (this.dropTarget != null && this.dropTarget.parent is GeoPuzzle) { //check to make sure it's over a puzzle piece
                    currentObjOver = GeoPuzzle(this.dropTarget.parent); //make "currentObjOver" assigned to the puzzle piece the finger is currently touching
                    currentObjOver.gotoAndStop("Over"); //highlight the current piece
                    if (currentObjOver != lastObjOver) { //if your finger moves and you're now touching a different state
                        if (lastObjOver != null && lastObjOver.isLocked == true) { //if the previous state you were touching has been solved
                            lastObjOver.gotoAndStop("Lock"); //lock this state into place
                        else if (lastObjOver != null && lastObjOver.isLocked == false) { //if the previous state you were touching wasn't solved
                            lastObjOver.gotoAndStop("Off"); //unhighlight that state
                        lastObjOver = currentObjOver; //assign the current state to be the last state you were touching
    lastObjOver and currentObjOver are always assigned the same object. I can't figure out why, I've run it line by line but I can't figure out where I'm going wrong.

  • Switching Loops

    Hello all,
    I had a weird issue that I had to deal with today.  I was in the process of running a capture of the traffic to the inside interface of our ASAs.  Our ASAs are in an active-standby failover and each is connected to a 6506.  On our cores we have RSPAN configured (VLAN 400).  I wasn't sure which switch the active ASA was connected to which is why I decided to monitor both devices.  I ran the following commands on both 6506s:
    monitor session 10 source interface <Physical Interface>
    monitor session 10 destination remote vlan 400
    I then configured the following command on my local switch (3560) at my desk where my PC with 2 NICs is located:
    monitor session 10 source remote vlan 400
    monitor session 10 destination interface Fa0/1
    I put my PC's Fa0/1 interface in VLAN 400 and began running my capture.  After a few minutes, our network came to a crawl and halted.  Could capturing traffic from these ASAs cause my network to crash?  Considering that our firewall is hit by a lot of traffic on both the inside and outside interfaces, I would think that this is possible.
    Thanks!
    Regards,
    Terence

    You can register for events dynamically. This way it is possible to create conditions for events and to use event structures in subVI, but I would advice you to avoid this kind of solution. If two subVIs use event structures, your application can stuck.
    I used the attached VI sometime ago. It worked, but at the end I preferred to transfer the event structure to the main VI and use subVIs to make the job of each event.
    Search the LV User Guide for Event Strucutures. It will be helpful.
    Regards,
    Rasputin
    LV7.1 <> W2K
    Attachments:
    Get parameters dynEvent.vi ‏127 KB

  • Error when starting a SWITCH branch (8987)

    Hi,
    I am testing my workflow which starting with a multiple condition (switch). The workflow process is stopped with the error:
    Error when starting a SWITCH branch (8987).
    The workflow check shows no warnings or errors. What could be the problem?
    Thank you in advance.
    /Elvez

    Check the workflow container (of the started workflow instance) and see if you spot a problem with one of the container objects used in your switch conditions.

Maybe you are looking for