Never Ending Function?

I made this function for a submenu to change a textbox in a whitespace movieclip (called white).
The problem is the onMouseDown function never turns off even if the cursor isn't in contact with a menu option. I wouldn't have noticed if I didn't have an htmltext with a jpg file in it that clearly "refreshed" every time I clicked the screen. As far as I know, something like Void or Break might work, but I don't have luck with guessing how those commands work.
    function react(menu_item, textFile){   
        if(menu_item.hitTest(_root._xmouse, _root._ymouse, true)){
            onMouseDown = function(){
        asFile = new LoadVars();
asFile.onLoad = function(){white.myText_txt.htmlText = this.content; menu_item._parent.gotoAndStop(1);}
asFile.load(textFile);}

the onPress would interfere with this list that controls the main menu:
function ck(movie, scene){movie.onPress = function(){movie.gotoAndStop(2); pl.gotoAndStop(scene);}
function uk(movie){movie.onDragOut = movie.onRelease = function(){movie.gotoAndStop(1);}
function pk(movie){movie.onRollOver = function(){movie.gotoAndStop(2);}
function rk(movie){movie.onDragOut = movie.onRollOut = function(){movie.gotoAndStop(1);}
Basically, I've got three dimensions:
tab1
|
+--- Menu1
|+submenu1
|+submenu2
|
+--- Menu2
|+submenu1
|+submenu2
|
+--- Menu3
|+submenu1
|+submenu2
|
tab2
|
+--- Menu1
|+submenu1
|+submenu2
|
+--- Menu2
|+submenu1
|+submenu2
|
+--- Menu3
|+submenu1
|+submenu2
I've got 7 tabs with an average of 5-6 menu options each, and many of the Menus have submenus. The problem I ran into was the onPress not working on the submenus, because they are embedded in the menus. That's why I went with onMouseDown and tried to use a "hit test" to filter it. The problem is once the hit test is switched "on" it doesn't switch back off; only another hit test detection for another button will switch it.
It's like I created an unseen variable that remembers the last button I moused over, but it never clears that variable. If there was a way to clear that variable when the menu screen closes (what happens when the parent goes back to frame 1) then the whole problem would be solved.
There's probably some alternative way to detect my submenus, or rewrite the menu detection that I'm missing.

Similar Messages

  • SQL Server Multiple JOINS with Table Value Function - query never ends

    I have a query with 4 joins using a table value function to get the data and when I execute it the query never ends.
    Issue Details 
    - Table value function 
        CREATE FUNCTION [dbo].[GetIndicator] 
          @indicator varchar(50),
          @refDate datetime
    RETURNS 
    TABLE
    AS
    RETURN
    SELECT
    T1.Id ,T1.ColINT_1, T1.ColNVARCHAR_1 collate DATABASE_DEFAULT as ColNVARCHAR_1 ,T1.ColNVARCHAR_2 ,T1.ColSMALLDATETIME_1, T1.ColDECIMAL_1, T1.ColDECIMAL_1
    FROM TABLE2 T2
    JOIN TABLE3 T3
    ON T2.COLFKT3 = T3.Id
    AND T3.ReferenceDate = @RefDate
    AND T3.State != 'Deleted'
    JOIN TABLE4 T4
    ON T2.COLFKT4 = T4.Id AND T4.Name=@indicator
    JOIN TABLE1 T1
    ON T2.COLFKT1=T1.Id
    - Query
        DECLARE @RefDate datetime
    SET @RefDate = '30 April 2014 23:59:59'
    SELECT DISTINCT OTHERTABLE.Id As Id
    FROM 
    GetIndicator('ID#1_0#INDICATOR_X',@RefDate) AS OTHERTABLE
    JOIN GetIndicator('ID#1_0#INDICATOR_Y',@RefDate) AS YTABLE  
    ON OTHERTABLE.SomeId=YTABLE.SomeId
    AND OTHERTABLE.DateOfEntry=YTABLE.DateOfEntry
    JOIN GetIndicator('ID#1_0#INDICATOR_Z',@RefDate) AS ZTABLE
    ON OTHERTABLE.SomeId=ZTABLE.SomeId
    AND OTHERTABLE.DateOfEntry=ZTABLE.DateOfEntry
    JOIN GetIndicator('ID#1_0#INDICATOR_W',@RefDate) AS WTABLE 
    ON OTHERTABLE.SomeId=WTABLE.SomeId
    AND OTHERTABLE.DateOfEntry=WTABLE.DateOfEntry
    JOIN GetIndicator('ID#1_0#INDICATOR_A',@RefDate) AS ATABLE  
    ON OTHERTABLE.SomeId=ATABLE.SomeId
    AND OTHERTABLE.DateOfEntry=ATABLE.DateOfEntry
    Other details:
    - SQL server version: 2008 R2
    - If I execute the table function code outside the query, with the same args, the execution time is less the 1s.
    - Each table function call return between 250 and 500 rows.

    Hi,
    Calling function in general is a costly query. And definitely joining with a function 5 times in not an efficient one.
    1. You can populate the results for all parameters in a CTE or table variable or temporary table and join (instead of funtion) for different parameters
    2. Looks like you want fetch the IDs falling to different indicators for the same @Refdate. You can try something like this
    WITH CTE
    AS
    SELECT
    T1.Id ,T1.ColINT_1, T1.ColNVARCHAR_1 collate DATABASE_DEFAULT as ColNVARCHAR_1 ,T1.ColNVARCHAR_2 ,T1.ColSMALLDATETIME_1, T1.ColDECIMAL_1, T1.ColDECIMAL_1, T4.Name
    FROM TABLE2 T2
    JOIN TABLE3 T3
    ON T2.COLFKT3 = T3.Id
    AND T3.ReferenceDate = @RefDate
    AND T3.State != 'Deleted'
    JOIN TABLE4 T4
    ON T2.COLFKT4 = T4.Id AND T4.Name=@indicator
    JOIN TABLE1 T1
    ON T2.COLFKT1=T1.Id
    SELECT * FROM CTE WHERE Name = 'ID#1_0#INDICATOR_X' AND Name = 'ID#1_0#INDICATOR_Y' AND Name = 'ID#1_0#INDICATOR_Z' AND Name = 'ID#1_0#INDICATOR_W' AND Name = 'ID#1_0#INDICATOR_A' AND ReferenceDate = @RefDate.
    Or you can even simplify more depends on your requirement.
    Regards,
    Brindha.

  • Hello, all of a sudden without apparent reason I can't get "MAIL" to function. It starts up but I get the color wheel turning like crazy and never ends. I've tried restarting and I still can't get it to work. PLEASE HEEELP!?

    hello, all of a sudden without apparent reason I can't get "MAIL" to function. It starts up but I get the color wheel turning like crazy and never ends. I've tried restarting and I still can't get it to work. PLEASE HEEELP!?

    In the Desktop Manager > Sync > Configuration, make sure the calendar options are set to override Outlook.
    Set it also to notify you of the changes, so you will have to approve any changes.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Scene never ends

    hello,
    my scene only contains 2 images.
    the 1st: a layer with the script "stop;", and,on another, a
    movie clip with the scrip:
    onClipEvent(load){
    Calculate approximate kbps after test swf loads
    function getkbps(startTime,sizeInBytes) {
    elapsedTimeMS = getTimer() - startTime; // time elapsed
    since start loading swf
    elapsedTime = elapsedTimeMS/1000; //convert to seconds
    sizeInBits = sizeInBytes * 8; // convert Bytes to bits,
    sizeInKBits = sizeInBits/1024; // convert bits to kbits
    kbps = (sizeInKBits/elapsedTime) * 0.93 ; // IP packet
    header overhead around 7%
    return Math.floor(kbps); // return user friendly number
    Load test.swf with a unique time to work around browser
    caching.
    Browser will always load a new copy of SWF because url is
    different each time.
    now = new Date(); // create date object
    nocacheStr = "?" + now.getTime();
    this.loadMovie("test.swf"/*+ nocacheStr*/);
    onClipEvent(enterFrame){
    // do not execute code until SWF begins to load
    if(this._url != _root._url){
    if(typeof start == "undefined") {start = getTimer();} // set
    start time once
    if(this.getBytesLoaded() < this.getBytesTotal()){ /* not
    yet loaded*/}
    if(this.getBytesLoaded() == this.getBytesTotal()){ // swf
    loaded call getkbps()
    _level0.bandwith = getkbps(start,this.getBytesTotal());
    _root.gotoAndStop(2);
    in th second image the only script is:
    //Ouvre une connexion locale qui vous permet de lire les
    fichiers vidéo (FLV) depuis une adresse HTTP ou depuis un
    système de fichiers local.
    // on crée l'objet de connexion (objet NetConnection)
    maConnexion = new NetConnection();
    // Connexion à la source de donnée
    // quand il s'agit de charger une video externe sans utiliser
    FlashComm
    // il faut transmettre le paramètre null à la
    méthode connect
    //on se connecte
    maConnexion.connect(null);
    //on crée un objet NetStrean pour pouvoir utiliser les
    méthodes et prpopriétés permettant de lire des
    vidéos en local ou depuis une adressse http
    // Création d'une occurence de l'objet NetStream
    monFluxVideo = new NetStream(maConnexion);
    // attachement du flux video à une occurence de l'objet
    Video
    ici.ecran.attachVideo(monFluxVideo);
    //on définis le nombre d'images par secondes:
    fps=12;
    function essai(){
    if (bandwith != Infinity) {
    temps_chargement = (monFluxVideo.bytesTotal / bandwith) -
    (monFluxVideo.bytesTotal/fps);
    if (temps_chargement>=0){
    monFluxVideo.setBufferTime(temps_chargement);
    }else{
    monFluxVideo.setBufferTime(20);
    essai();
    // lancement de la lecture
    monFluxVideo.play("eveque_moins_oiseaux.flv");
    //permet de lisser la video lorsqu'elle est
    redimensionnée
    monFluxVideo.smoothing;
    //bouton play
    bt_joue.onRelease = function() {
    monFluxVideo.play("eveque_moins_oiseaux.flv");
    //bouton pause
    bt_pause.onRelease = function() {
    monFluxVideo.pause();
    //bouton stop
    bt_stop.onRelease = function() {
    monFluxVideo.pause();
    monFluxVideo.seek(0);
    //bouton avance
    bt_avance.onRelease = function() {
    monFluxVideo.seek(monFluxVideo.time+10);
    //bouton recule
    bt_recule.onRelease = function() {
    monFluxVideo.seek(monFluxVideo.time+10);
    //----son
    //ici.ecran.attachAudio(monFluxVideo);
    var monson = new Sound(ecran);
    var i = 100;
    moins.onPress = function() {
    monson.setVolume(i -= 5);
    son = i add " %";
    plus.onPress = function() {
    son = i add " %";
    if (i>=100) {
    i = 100;
    } else {
    monson.setVolume(i += 5);
    //fonction de démarrage en fonction de ce qui est
    chargé
    //Spécifie la durée de la mise en mémoire
    tampon des données avant le démarrage de l'affichage du
    flux vidéo.
    //monFluxVideo.setBufferTime(4000);
    monFluxVideo.seek(info);
    function verif() {
    // info prend pour valeur la position dans le temps en
    seconde (tete de lecture)
    info = Math.round(monFluxVideo.time) add " sec";
    setInterval(verif, 100);
    function charg() {
    pourcentage = "Chargement : " add
    Math.round((monFluxVideo.bytesLoaded/monFluxVideo.bytesTotal)*100)
    add " %";
    setInterval(charg, 100);
    When i play the scene the loop never ends. even with the
    "gotoAndStop(2)"...
    Please help me...

    You should read up on Garage Band, I figured it out in 2 minutes and I don't really use that program.
    You need to create a new software instrument and then use a midi keyboard or the software one provided. Hit record and hit your note, holding it down as long as you want.
    Andy

  • Is there a Session End function in Cold Fusion?

    In .net there's a session end function that allows you to
    perform functions when a users session ends, does Cold Fusion have
    anything like this? The reason I ask is I have a user who generates
    multiple xml files with data and stores them to the hard drive
    while they visit the site, but once they leave, I submit all those
    xml files to a database and I'm trying to figure out the best way
    to do this. It would be for multple users on the site. Anyone have
    any ideas?

    Thanks, I suppose I can do that. I've never done a scheduled
    job before, but it doesn't look too difficult to setup.
    Thanks.

  • [Help]: Web-Report is refreshed never end.

    Dear Collegues.
    Hi guys ...
    In the web-report,,, i intend to make the report can extend some Info Object automatically & programmatically.
    Hence, i use web-API & javascript to make it happened. How ??
    In the web-designer; especially in HTML part, i create javascript & web-API code:
    <script>
    function test() {
      SAPBWOpenURL("<SAP_BW_URL DATA_PROVIDER='ZCVP_CON' CMD='EXPAND' IOBJNM='ZBRSLSPR' AXIS='Y'>");
    test();
    </script>
    I add this before the row of code : </BODY>
    Virtually, this line of code worked (It can expand the InfoObject/Characteristi/Key Figure that i want to) .. But..
    The report Web-Report is Refreshed never ending.
    <b>Could somebody tell me how to make some function is run only once ??</b>
    Should i check the session/something?? For Example the catche.
    Could somebody give me the clues how to make it happened ??
    If any of you little bit don't understand with my explanation & questions, p/s don't hesitate to ask me to make it clear.
    Kind Regards,
    Niel

    Hi Deepu,
    Basically, we're gonna make the process automatically run therefore i didn't use button/link to make it.
    Do you have any idea how to make the function run once???
    Because if we refer on ASP programming, it has condition to make sure some function is run only once.
    Many Tks Deepu.
    Kind regards,
    Niel.

  • Retraction for Capitals wbs keep running never end..

    Hi all;
    While running a retraction for capital wbs using this 'UPR_COST_PLAN_EXEC' FM, the job keeps running for hours never end, I can see the messages at the task bar 'Data summarized...' , 'data transfered..' etc..I don't get any error message or anything.
    This is not a new function, it has been running well in the past and I never had any issue. We run this every month to retract monthly updates into R/3, The only thing I have changed between last month and this month are
    On the planning level Version = 5 (I had 4 last month) this is the version this data gets stored in R/3.
    Also the parameter grp version = 5.
    Those should not cause this issue...Did anyone had this issue earlier? Pls write to me...as this is a production issue..I will assign good points.
    thanks.
    BK

    Got it figured out guys...thanks.
    Buddhi R Kalakheti

  • Front-end functions cannot be executed in the background in SM37

    Hi ,
    I have developed a BDC program for Tcode HRUSER . The program is working fine in Frontend but when Executed in Background through SM37 gives a error -:
    "Front-end functions cannot be executed in the background".
    I am not using any function like GUI_DOWNLOAD or anything like that .
    Thanks
    Nikhil Arya.

    Hi ,
    No , the program is not taking any inputs from the user .
    when i am executing the program in background mode it is just showing the messages at the end which i am writing in the program for eg:
    "creating a user for employee 2306328".
    So , only the list of messages comes at the end .
    Thanks
    Nikhil Arya.

  • Updated my iPhone 5 to ios7, in the App store after installing updates I now have a never ending list of the Apps I've updated.  How do I get rid of the list after they've been updated?  In the previous version I did not have an annoying permanent list.

    Updated my iPhone 5 to ios7, in the App store after installing updates I now have a never ending list of the Apps I've updated.  How do I get rid of the list after they've been updated?  In the previous version I did not have an annoying permanent list.

    iOS 7 allows you to have your apps update automatically. Therefore, the list of what has been updated stays so that you can see what was updated, when and what the release notes say. It has been suggested that they list has a limit, much like Recents. Currently, there is no way for the user to delete the entries manually. Just try not to look at them.

  • Loading plsql_proxy.jar takes so long..never ends

    Hello people,
    I´m deploying a proxy cliente using command,
    jpub -u SCOTT/SCOTT -sysuser SCOTT/SCOTT -proxywsdl=any_wsdl -endpoint=any
    then the executing process stay in Load plsql_proxy.jar for a long time. it looks like never ends.
    plsql_wrapper.sql
    plsql_dropper.sql
    plsql_grant.sql
    plsql_revoke.sql
    Executing plsql_dropper.sql
    Executing plsql_wrapper.sql
    loading sqlj/lib/dbwsclient.jar (about 5 minutes)...
    Loading plsql_proxy.jar......................
    the execution process looks like stopped at this here and doesn´t throw any exception.
    I´ll be grateful the soon answer.
    Rodius
    anybody knows how long takes the proxy client generation process?

    I have this issue also, with images from my D70 (~6 megapixels) ... no solution, except that when it happens, quitting and re-launching Aperture seems to clear it up for a while, at least until it happens again.
    Given that you have almost twice the RAM and four times the CPU cores that I have, I suspect this is a software issue, and not one of insufficient hardware resources.  :-)

  • I printed a 'preview' document and now it continues to print a never ending set of copies.  I have re-installed the printer software, but it still continues to print more copies.  What do I need to do to stop the document printing?

    I printed a 'preview' document and now it continues to print a never ending set of copies.  I have re-installed the printer software, but it still continues to print more copies.  What do I need to do to stop the document printing?

    Try resetting the printing system.
    1. Open System Preferences > Print & Fax
    2. Move your mouse over the Printers list
    3. Hold down the Control button and click the mouse
    4. Click the "Reset printing system ..." popup
    5. Restart your Mac
    This will remove your print queues but not your printer drivers. So you will only need to add your printer queues again.

  • I created a new administrator USER account. I deleted the original one but the process never ends. It's been 3 days now.

    I created a new administrator USER account. I deleted the original one but the process never ends. It's been 3 days now. And I can't close preferences window or turn off the computer.
    It's stays in the "deleting" but I can't cancel it or close the window.
    What can I do?

    Here are two screen shots to show you what I am seeing.  The first screen shot shows it allowing me to select (highlighted in blue) my admin user (which is what I am locced in as).  The second screen shot shows it allowing me to select the "Guest" user (highlighted in blue).  However when I click on the user "Orion" nothing happens.  It will not change to highlight that user.

  • Initial Time Machine Backup never ends

    Hi all folks,
    I try to backup my PB12 Disc (120 GB) to a external 500 GB Disc, connected via FW400, but the backup never ends, I think.
    The backup starts with 100MB/min but after 20h (80GB are store to a external Disc) it slow down to 1MB/min.
    With the "Activity Monitor" I see only some disc activities and a "mds" and "mdworker" process use some cpu time only (more than 10%).
    Where can I get some detail information, a log file, about the Time Machine activity from.
    Thanks for any help,
    Lutz

    Hi all folks,
    the initial Backup ends after 2 days (nice to to see, :-(),
    but on the boot volume I can go the time walk only.
    I split my disc into two partitions, sorry.
    Bye, Lutz
    p.s.
    With CCC I spend 4-6 hours to back up my disks only (100GB).

  • Mappings never ends

    Dear All,
    We are using 10.2 version of OWB and we have around 80 mappings in one module daily we are running the mappings parallel through control center for the time consuming (manually). but one mapping still running normally it takes 1:30 to 2:00 hrs time to finish but some times it is taken almost 5 to 6 hrs some times it never end. at that situation we stopped the mapping.but while we check the target table data is coming perfect.
    Let me know the cause of this and how to salve it.
    Thanks,

    Hi,
    When you kill the mapping from the Control Center the DB session which was triggered by mapping won't kill , you may see the session still running from Session Browser or any other way. This may be the reason you see the data in the Target table. to test this you may start regular running mapping and kill it from CC and observe the session from Database and you may see the data in the target table too.
    This may be one possibility. I am not saying what others say is wrong . I had experienced this issue before and i had to tune my code to get the mapping run consistent.
    Suresh

  • My icalendar data is on a never ending importing how do I get it to stop?

    My icalendar is on a never ending importing how do I get it to stop!

    Items purchased in an account a permanently associated with that account.  You cannot split accounts nor merge them.  You can log in with your family account and download items that way.  In the long run though, especially if you are using other Apple devices, you may encounter problems with authorization.  You should look into making new purchases with your own ID.

Maybe you are looking for

  • Decimal Places in qty fields

    Hi Experts, I'd like to know is it possible to set 4 decimal places in Qty fields, when I make GI for Sales Order. Regards

  • How to delete masterdata via process-chain

    Hi Specialists, I need to delete masterdata which is not used in any cube/osd on a daily base. But I cannot find a possibility to do that via the process-chain. There seems only to be the option to delete the content of cubes and ods-object, but not

  • Add-on version

    Hello all, Do you know which feature/function in the SEM-BCS 6.0 BW based replaces the functionality of the Add-on version in the BCS R3 based? Please advice. Regards, Shelly

  • Defining SLD Target Systems for DEV, QAS & PRD

    In a 3 tier XI landscape (DEV, QAS, PRD) which of the following two scenarios is best? 1. In the SLD define each DEV Business System with a target of the corresponding QAS Business System and define each QAS Business System with a target of the corre

  • Anyone else notice 'purchase only" titles appearing on tv?

    I have noticed a strange behavior that only has appeared on my tv "Rented Movies" page... As it normally does, tv lists eight movie covers along the bottom of the screen as, "Viewers like you also rented." The odd thing is that on my "Rented Movies