Suspending event firing

Hi Everyone....
I have a series of segmented controls on my panel. I have set the default to be all segment 2 to be the value at design time.
Now when i populate the controls with the value from the database, the event for segment changed gets fired.
I would like to suspend the segment changed event until after i load the form with data.
Is this possible and how do i do it?
thanks
tony

Hi Tony -
Based on some of your recent posts, I'm assuming your question is about UISegmentedControl in the iPhone SDK. Though the corresponding AppKit control is similar in many ways, I haven't considered NSSegmentedControl in this response.
alt-088 wrote:
... when i populate the controls with the value from the database, the event for segment changed gets fired.
I'm not sure I know what you mean by "populate the controls". Do you mean setting the title of each segment? I don't think a programmatic change in the title should be generating a UIControlEventValueChanged event. In general, controls only send action messages in response to a user action--in this case a tap on one of the segments.
Do you mean the user is tapping one or more segments before the data is finished loading? In that case it might be best to disable all the controls until the program is ready to handle a touch event. If the data load takes a noticeable amount of time, I think the user might be confused if the response to a tap were delayed.
I would like to suspend the segment changed event until after i load the form with data.
Is this possible and how do i do it?
Yes, there are lots of ways you could do that. For example, you could maintain a boolean ivar to indicate whether a new data load was required or in progress. Each action method could test that ivar and if the data wasn't ready, the method would set an actionPending ivar instead of completing the action. When the data was ready, any pending actions would be handled. If necessary, 'actionPending' could be an array containing the address of each UISegmentControl which had fired before or during the load. E.g.:
- (IBAction)segmentChanged:(id)sender {
if (self.dataReady == NO) {
[self.actionPending addObject:sender];
else {
UISegmentedControl *control = sender;
int tag = control.tag;
int segment = control.selectedSegmentIndex;
// do something based on tag and segment
- (void)dataIsReady {
self.dataReady = YES;
for (UISegmentControl *control in actionPending) {
[self segmentChanged:control];
[actionPending removeAllObjects];
Note if any of the segment controls is momentary, you'll need to store more data in actionPending since control.selectedSegmentIndex is only valid during the event cycle started by a segment tap.
Once again, I question the need for a delayed response to segment taps. But if that's what you really want, something like the above example should work for you.
- Ray

Similar Messages

  • How to Disable Event firing while updating a list item using poweshell

    Hi All,
    I am working on a powershell code which updates most of the list items in the entire web application. I am using SystemUpdate($false) to update the items so that 'modified' and 'modified By' and versions are not changed.
    However event receivers gets fired which is now a problem. I want to disable the Event receivers before update and enable it after update. I want powershell code for this. I am using SharePoint 2010.
    Your help would be much appreciated. Thank you in anticipation.
    Regards
    Karthik R.

    hi
    check this thread:
    How to disable event firing outside an event. It contains example on C#, but it is not difficult to convert it to PowerShell.
    Blog - http://sadomovalex.blogspot.com
    Dynamic CAML queries via C# - http://camlex.codeplex.com

  • Event Fired when a mxml component is shown on screen

    hello,
    I have following application structure nested up to 2/3 level.
    Application
         linkbar connected to viewstack
         viewstack
              NavigatorContent
                   mxml Component
              NavigatorContent
                   mxml Component
    mxml componet in turn has similar structure
    componet
         linkbar connected to viewstack
         viewstack
              NavigatorContent
                   mxml Component
              NavigatorContent
                   mxml Component
    and end component is form which is shown and actions performed
    I want to execute specific code when the form is first time shown
    which will collect data from server and will show for further actions.
    User will edit/delete/update data with various button clicks.
    I tried activate event on end component but it seems that it wont get
    fired at all. End components are enclosed in BorderContainer or Group.
    To test activate event I have used Alert.show only but popup is not shown
    when I select link button on penutimate linkbar.
    If I am doing something wrong please let me know as well please
    guide me which event shall I use so that whenever linkbutton is
    pressed on linkbar it will fire that event. In that event I can check
    whether it has been called earlier by checking some variable which
    will be null in creation complete and set in event fired when linkbutton is pressed.
    Thanks and regards
    Raja

    I think 'creationComplete' is the closest event to what you are looking for.

  • First event fired to event structure

    Hi all,
       Does anyone know what's the first event being fired to the event structure on VI startup? I set a breakpoint on the event structure and it breaks. However i wasn't able to capture whats the event.
    My intention was simple; i have a table which list all the IO names and values. So during VI startup, i wan to populate the IO names first. Then in a timed-loop, the values are updated respectively. In this case, i don't need to "refresh" the table every time which waste time and resources.
    It something like the OnLoad event.
    Another way out is to register an user event, and have this event fired during application startup. But i wonder if anyone has a better way?
    Many thanks!

    j3r3mi wrote:
    My intention was simple; i have a table which list all the IO names and values. So during VI startup, i wan to populate the IO names first. Then in a timed-loop, the values are updated respectively. In this case, i don't need to "refresh" the table every time which waste time and resources.
    Why don't you show us some code.
    Are the IO name static for the duration of the program? Are you using a regular table column or the "row header strings []" property for the IO names?
    If you want to write the row headers at the start of the program, place the code before the main loop containing the event structure. No event case needed. If you have a specific event to update the table headers if needed, fire the event once at startup using a signaling value property, again with the property node placed before the main loop.
    LabVIEW Champion . Do more with less code and in less time .

  • QT in html, events fired and movie internals doc

    Hi,
    The Javascript Scripting Guide says under "Executing JavaScript Functions From QuickTime", page 11:
    Wired actions can be triggered by user interaction, as a result of a frame in the movie being displayed, or as the
    result of arbitrary wired calculations.
    It also briefly describes (page 23) the matrix and rectangle properties, saying "You can use a movie’s transformation matrix to scale, translate, and rotate the movie image. For details on the transformation matrix, see Movie Internals."
    And the Rectangle is defined as "void SetRectangle(string rect)"
    Where can I find the reference to the events fired by QT automatically ?
    Where can I find this Movie Internals description ?
    I'm not very familiar with javascript... That's not a QT issue, but where can I find a description of the rect ?
    Many thanks
    Jean-Pierre
      Windows XP Pro  

    Yes, you can navigate to other pages using buttons/code in an swf file.  And you can trigger an event as well, though I don't know if that's what you intended to say if navigating to another page is what you are really after.
    In AS3, to make a button work with code, you need to add an event listener and event handler function for it.  You might need to add a few (for different events, like rollover, rollout, clicking it, but for now we'll just say you want to be able to click it to get a web page to open.  In the timeline that holds that button, in a separate actions layer that you create, in a frame numbered the same as where that button exists, you would add the event listener:
    btn1.addEventListener(MouseEvent.CLICK, btn1Click);
    The name of the unique function for processing the clicking of that button is specified at the end of the event listener assignment, so now you just have to write that function out:
    function btn1Click(evt:MouseEvent):void {
       var url:String = "http://www.awebsite.com/awebpage.html";
       var req:URLRequest = new URLRequest(url);
       navigateToURL(req);

  • Disable event firing while updating list item in custom timer job

    Hi
    I am adding new items in the list usign custom timer job.
    While adding the items in the list event receiver of another list (which is not related to list which is updating) is getiing fired due to which I am getting data wrongly updated and exceptions are comming.
    why the another lists event recevier is executing while updating my list?
    How can I disable event firing from timer job code?
    please suggest any solution

    Hello,
    It seems you have deployed your event receiver globally and it is applied to all the lists. I can suggest two ways:
    1. Either you update your event receiver feature.xml file and attached to specific list, wherever you want. You can follow below link to attach event with specific list via code:
    http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.speventreceiverdefinition.aspx
    Or instead of code you can also pass ListUrl in feature.xml file:
    http://msdn.microsoft.com/en-us/library/ff398052.aspx
    2. OR delete event receiver from the list: You can use below code in your timer job to delete event receiver
    http://sarangasl.blogspot.in/2009/11/remove-event-receiver-in-sharepoint.html
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • [svn:osmf:] 11159: Updating unit test with a check to all expected events firing properly.

    Revision: 11159
    Author:   [email protected]
    Date:     2009-10-26 12:12:10 -0700 (Mon, 26 Oct 2009)
    Log Message:
    Updating unit test with a check to all expected events firing properly.
    Modified Paths:
        osmf/trunk/framework/MediaFrameworkIntegrationTest/org/osmf/content/TestContentElementInt egration.as

    camickr wrote:
    Do you really expect us to read all that code to try and understand what you are attempting to do?
    If you need further help then you need to create a "Short, Self Contained, Compilable and Executable, Example Program (SSCCE)", that demonstrates the incorrect behaviour.
    http://homepage1.nifty.com/algafield/sscce.html
    Absolutely not, I wouldn't post such a large amount of code expecting people to read it. I indicated that I believe my error only lies within one of two classes, and that I highlighted the two methods with comments.
    I was told to create an SSCCE as you have mentioned, but I believe all of this code is necessary for the program to run properly, so I only provided it all for compilation purposes.
    I'll check the examples posted, and if I need to I'll see if I can change my methods to use the swing timer class as the first reply mentions, but I did not think this would be necessary.
    Edited by: Drew___ on Nov 29, 2007 3:28 AM
    I have just figured out what my problem was, sorry it was quite a simple mistake. When checking for user input, I was immediately resetting the eventFlag or something afterwards. This meant the object would stop moving as it couldn't remember my last keypress. Thanks for your help, those tutorials are really good.

  • Event firing multiple times (et_Got_Focus)

    Hi,
    I just noticed while debugging my Add On code that the et_Got_Focus event which I have added to my event filters is triggered 64 times when I change a field value and then move to a different field.  This not only happens in the matrix when changing field values and tabbing through but also in the header fields.
    This has got to be a bug and it is not only slowing down the A/P Invoice form but it is potentially very dangerous to have an event firing 64 times when it should only be fired once. 
    To test this all one needs to do is add the et_Got_Focus event to the event filter with the A/P Invoice form, then add a debug statement to write out the itemvalue properties and you will see once you edit a value and tab you will get 64 statements that are the et_Got_Focus event, BeforeAction false for the same field or column when it should only occur once.
    I have a very digrunted client that is very frustrated due to the amount this slows down data entry in the A/P Invoice.  I cannot get rid of this event because there is a particular field I am monitoring for the got focus event so I can stop it under certain circumstances.
    If anyone else has experienced this or knows how to resolve this please let me know.  I guess if I don't find out why this is happening I will post a CSN to SAP.
    Thanks very much,
    David Wall
    Here is a sample of my debug output messages for one update of a single field and then tabbing out:
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False
    et_GOT_FOCUS -  - False

    Hi David,
    We at Self Informatique France have the same problem of getfocus firing many times at one of our customers in Algeria although wae are not using formated search.Any solution ?
    Best Rgds.
    Antoine Egeileh
    President
    Self Informatique
    [email protected]

  • Qt_ended Event firing in IE

    I want to add image at end of quicktime movie,for that i m firing qt_ended and its working alright in Firefox,for IE im getting confused abt what change i have to made.Read the tutorial here http://developer.apple.com/library/safari/#documentation/QuickTime/Conceptual/QT ScriptingJavaScript/bQTScripting_JavaScri_Document/QuickTimeandJavaScri.html#//appleref/doc/uid/TP40001526-CH001-SW6 But unable to make it work.If someone can please give me some example for making me do above functionality in IE.Below is my code
    <script src="AC_QuickTime.js" language="JavaScript" type="text/javascript">
    </script>
    <script language="JavaScript" type="text/javascript">
    <!--
    /* define function that shows percentage of movie 1 loaded */
    function showProgress()
    var percentLoaded = 0 ;
    percentLoaded = parseInt((document.movie1.GetMaxTimeLoaded() / document.movie1.GetDuration()) * 100);
    document.getElementById("loadStatus1").innerHTML = 'Movie loading: ' + percentLoaded + '% complete...';
    /* define function that executes when movie1 loading is complete */
    function movieLoaded()
    document.getElementById("loadStatus1").innerHTML = "Movie Loaded" ;
    /* define function that shows percentage of movie 2 loaded */
    function showProgress2()
    var percentLoaded = 0 ;
    percentLoaded = parseInt((document.movie2.GetMaxTimeLoaded() / document.movie2.GetDuration()) * 100);
    document.getElementById("loadStatus2").innerHTML = 'Movie loading: ' + percentLoaded + '% complete...';
    /* define function that executes when movie2 loading is complete */
    function movieLoaded2()
    document.getElementById("loadStatus2").innerHTML = "Movie Loaded" ;
    /* define function that adds another function as a listener for a DOM event */
    function myAddListener(obj, evt, handler, captures)
    if ( document.addEventListener )
    obj.addEventListener(evt, handler, captures);
    else
    // IE
    alert("IN IE");
    obj.attachEvent('on' + evt, handler);
    /* define functions that register each listener */
    function RegisterListener(eventName, objID, embedID, listenerFcn)
    var obj = document.getElementById(objID);
    if ( !obj )
    obj = document.getElementById(embedID);
    if ( obj )
    myAddListener(obj, eventName, listenerFcn, false);
    function alertonend()
    //document.getElementById("loadStatus2").innerHTML = "Movie Loaded" ;
    alert("HEREEE");
    /* define a single function that registers all listeners to call onload */
    function RegisterListeners()
    RegisterListener('qt_progress', 'movie1', 'qtmovie_embed', showProgress);
    RegisterListener('qt_load', 'movie1', 'qtmovie_embed', movieLoaded);
    RegisterListener('qt_progress', 'movie2', 'qtmovie_embed2', showProgress2);
    RegisterListener('qt_load', 'movie2', 'qtmovie_embed2', movieLoaded2);
    RegisterListener('qt_ended', 'movie1', 'qtmovie_embed', alertonend);
    //-->
    </script>
    Two Movies with JavaScript Play/Stop Controls
    and Progress/Load Monitors
    <script language="javascript" type="text/javascript">
    QT_WriteOBJECT('b.mp4', '760','416', '', 'obj#id', 'movie1', 'emb#id', 'qtmovie_embed', 'emb#name', 'movie1', 'postdomevents', 'true', 'enablejavascript', 'true');
    </script>   
    <!--<script language="javascript" type="text/javascript">
    QTWriteOBJECT('samplesorenson.mov', '360','256', '', 'obj#id', 'movie2', 'emb#id', 'qtmovie_embed2', 'emb#name', 'movie2', 'postdomevents', 'true', 'enablejavascript', 'true');
    </script>-->
    <table width="100%">
    <tr>
    <td align="center">
    MOVIE LOADING...
    </td>
    <td align="center">
    MOVIE LOADING...
    </td>
    </tr>
    <tr>
    <td align="center">
    Play 1
    </td>
    <td align="center">
    Play 2
    </td>
    </tr>
    <tr>
    <td align="center">
    Stop 1
    </td>
    <td align="center">
    Stop 2
    </td>
    </tr>
    </table>

    Very curious to see answers to this post — I'm not getting a 'qt_ended' event in either Safari or Firefox (3.5.2). Nor were some of the other events firing (qt_timechanged comes to mind). Have noticed numerous messages on boards regarding troubles with the QT events, so I may just keep using my workarounds -- setInterval() monitoring loops.
    N

  • Capturing events fired by ACtiveX control

    How can i capture events fired by ACtiveX control. i am using RegEventCallback vi, but that controls user driven events. i have an activeX control that fires events at unspecified time, now i want to know how to handle such events in LabView.
    Rubina

    Hi InformaticsComplex,
    Using the Register Event Callback VI is the correct method to capture events generated by an ActiveX control. Register Event Callback registers a VI to be called when the event occurs. I suggest checking out the LabVIEW Help articles Using ActiveX with LabVIEW and Register Event Callback as well as the following examples. I hope this helps!
    Examples (all found in NI Example Finder):
    ActiveX Event Callback for Excel VI: labview\examples\comm\axevent.llb
    ActiveX Event Callback for IE VI: labview\examples\comm\axevent.llb
    NET Event Callback for Calendar Control VI: labview\examples\comm\dotnet\Events.llb
    NET Event Callback for DataWatcher VI: labview\examples\comm\dotnet\Events.llb
    Mike Lyons
    National Instruments
    http://www.ni.com/devzone

  • Item added & item updated events fired twice.

    Hello everyone, 
    I have item added and item updated events and both sends e-mails twice cos they are fired twice. 
    I tried the below method but the problem still continues. Any suggessions?
    base.EventFiringEnabled=false;
    base.EventFiringEnabled=true;
    note: my list is custom list. (not document lib)

    If you have required checkout enabled the events can be triggered twice. See this post for more information and how to bypass it:
    Managing ItemUpdating and ItemUpdated Events Firing Twice in a SharePoint Item Event Receiver

  • Background Behavior for iOS - the Suspend event and executeInBackground

    It looks like suspend is not being defined in airglobal.swc. It just says (line 836 of flash.events.Event.as):
    public static const SUSPEND : String;
    Also, when attempting to compile in, ah, Flash CS<NDA> with "AIR 3.3.0.3230 for iOS" as the target, adding <executeInBackground>true</executeInBackground> to the app xml's <iPhone> node results in an alert:
    Unexpected or unknown element or attribute in the application descriptor file.
      application.iPhone.executeInBackground is an unexpected element/attribute
    Is there any way to test these things with this beta?

    It happens to me as well. I did try to put this variable in flash coding, but I need try {} catch to be able to test in flash builder otherwise it crash with no error appear.
    try {
        NativeApplication.nativeApplication.executeInBackground = true;
    } catch (e:Error) {
    } //Without try catch.. Flash builder crash at this line with no error notification. But in iPhone4 without try catch it runs fine
    However, when I test my application in iPhone4 iOS 5.01, I got nothing when the app is in background (I tested by firing post variable via url loader to server with enterframe event 40-50 frame once, and  by add location update event listener to Geo object also).
    I think the problem is <executeInBackground>true</executeInBackground> which is added to <iPhone> tag in app.xml can't be compile by flash builder.
    note: I've also changed application description to air 3.3
    <application xmlns="http://ns.adobe.com/air/application/3.3">
    and added location service in
    <InfoAdditions><![CDATA[
                                  <key>UIDeviceFamily</key>
                                  <array>
                                            <string>1</string>
                                            <string>2</string>
                                  </array>
                                  <key>UIBackgroundModes</key>
                                  <array>
                                            <string>location</string>
                                  </array>
      ]]></InfoAdditions>

  • How to find out the source of an event fired by button in a table in WD?

    Hi experts,
    I'm new to Web Dynpro and I need to know how to find out the source of an event (IWDCustomEvent) fired by a button in a table? I need to know which one is the clicked button (on which row)?
    Help will be appreciated
    Regards

    Hi GLM,
    thanks for your reply. Yes I know about that but when a round trip to the server is made the lead selection is at the first row of the table and when i click the button on, for example, the 3rd row the getLeadSelection method returns 1 and the color marker for the current row stays on the first row. So I need to click first somewhere else on the 3rd row and then on the button in order to update the value of lead selection and it's not very nice. So if you have some other idea it would be very helpful. Or perhaps some workaround.
    Regards

  • REMOVED_FROM_STAGE event firing when it shouldn't...

    Hello everyone,
    Wondering if someone has seen this before. I have an application that has a few navigation points on the main timeline. The document class stops the movie at the first frame, and the "home" movieclip's class has Event.ADDED_TO_STAGE and Event.REMOVED_FROM_STAGE listeners on it. Funny thing is, it is calling the ADDED function as normal, then firing the REMOVED function immediately after. However, when I run it, it doesn't actually remove the movieclip from the stage. It is still there. When I navigate to a different section ("remote" or "assist") and navigate back to "home", it doesn't fire a second time, everything works properly after the first time.
    So I guess my question is, what would fire the REMOVED_FROM_STAGE event without actually removing the object from the stage? And why would it only happen once?
    Thanks for looking!
    -Nick
    Here is some code as well as a screen shot of my main timeline:
    package src.modules {
        import flash.display.MovieClip;
        import flash.events.Event;
        import flash.events.MouseEvent;
        import src.utils.greensock.TweenLite;
        import src.utils.greensock.easing.*;
        public class ModHome extends MovieClip {
            private static const DISTANCE:int = 700;
            private static const TWEEN_DURATION:Number = 1.0;
            private var _currentPage:int = 1;
            private var _isDone:Boolean = true;
            public function ModHome() {
                super();
    //            trace("home initialized");
                addEventListener(Event.ADDED_TO_STAGE, onAddedToStage, false, 0, true);
            private function onAddedToStage(evt:Event):void {
                trace("home added to stage");
                removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
                addEventListener(Event.REMOVED_FROM_STAGE, onRemovedFromStage, false, 0, true);
                // BUTTONS
                pageLeft_btn.addEventListener(MouseEvent.CLICK, onMouseClick, false, 0, true);
                pageRight_btn.addEventListener(MouseEvent.CLICK, onMouseClick, false, 0, true);
            private function onRemovedFromStage(evt:Event):void {
                removeEventListener(Event.REMOVED_FROM_STAGE, onRemovedFromStage);
                // BUTTONS
                pageLeft_btn.removeEventListener(MouseEvent.CLICK, onMouseClick);
                pageRight_btn.removeEventListener(MouseEvent.CLICK, onMouseClick);
    //            trace("home removed from stage");
            private function onMouseClick(evt:MouseEvent):void {
                if(_isDone) {
                    switch (evt.target.name) {
                        case "pageLeft_btn" :
                            movePages("left");
                            break;
                        case "pageRight_btn" :
                            movePages("right");
                            break;
                        default :
    //                        trace("home -- nothing");
                            break;
            // SCROLLING WINDOW
            private function movePages(thedirection:String):void {
                _isDone = false;
                var x1:int;
                switch (thedirection) {
                    case "right" :
                        if (_currentPage > 1) {
                            _currentPage = _currentPage - 1;
                            x1 = pages_mc.x + DISTANCE;
                            TweenLite.to(pages_mc, TWEEN_DURATION, {x:x1, ease:Quint.easeInOut, onComplete:onTweenComplete});
                        } else {
                            _isDone = true;
                        break;
                    case "left" :
                        if (_currentPage < 3) {
                            _currentPage = _currentPage + 1;
                            x1 = pages_mc.x - DISTANCE;
                            TweenLite.to(pages_mc, TWEEN_DURATION, {x:x1, ease:Quint.easeInOut, onComplete:onTweenComplete});
                        } else {
                            _isDone = true;
                        break;                   
            private function onTweenComplete():void {
                _isDone = true;
                pageMarker_mc.gotoAndStop(_currentPage);
    //            trace("complete");

    No reason in particular, when I created the class, FlashBuilder put it in there (I'm using Flash Pro CS5 + Flash Builder 4). I read that it calls it by default when the class is constructed, so having it in or out didn't really matter. I did comment it out with no luck, but I ended up shifting around the timeline quite a bit today and the problem has gone away. It seemed to only do it when it was in the first frame.
    Thanks for your help, I'm going to investigate it further when I have time just for reference, I'll post anything I find here.
    -Nick

  • Event firing when XML data is imported via Acrobat

    When a user in Acrobat imports xml data into a form, what event gets fired? I have a couple of actions that occur on change, but when I import xml into the form (to fill in values, etc), this event doesn't fire. Is it on initialize?

    Yea, I dug a little deeper and ended up using the initialize event. What I did was on the initialize event I execute the exit script. So it's the same as the user physically putting the value in. Plus, I dont have to have the same code in two places.
    In the initialize event code:
    myThingie.execEvent("exit");
    Pretty cool little function if you find it useful. Thanks for the reply.

Maybe you are looking for

  • India Localization Patch for HRMS

    Hi , we are going to implement India localization for our client.Can anybody suggest me how can i download the India Localization Patch and details. Thanks in advance, Prasanna.

  • Exchange rate to be the copied from order to  billing

    Hi Friends I have a scenario I am doing an export sale...and have taken the exchange rate type as G which is coming from the customer master with value as ( 1EUR = 54 INR). When I do the billing the g is picked up for the pricing data but for the acc

  • Transfer from iPad to MacBook Air

    I'd like to transfer some songs from my iPad to my MacBook Air.  I understand this is possible but when I follow the steps I don't see a choice to transfer SELECTED items - only ALL the items I've purchases on my iPad will transfer.  Is there a way t

  • Can i reinstall Adobe CS6 Master collection ( Students and Teachers Version) after graduation ?

    Suppose i have bought Adobe CS6 Master collection ( Students and Teachers Version ) and that after my graduation i encounter a problem whereby i have to reinstall windows and as a consequence reinstall Adobe CS6 Master collection ( Students and Teach

  • Recording Captivate 4 with WPF windows applications

    Is anyone having issues recording captivate sessions using a WPF windows application. Specifically, I lose my ability to view data in any drop down control, although the data is there as I can retrieve it using the keypad. I have also had issues with