Debug a small piece of code

I'm working on a few scroll arrows that move a Clip up and down before they reached their maximum length. It works to move the clip to the top, but it does not stop at the maximum height, but retains the right to go. Here is the code from the image:

topspan = - 560;
bottomspan = 7.8;
ValeurDeplacement = 10;



Here is the code for the button:

on {(overview)
If (_root.predes._y > topspan) {}
onEnterFrame = function () {}
_root. PREDES._y = _root.predes._y - ValeurDeplacement;
trace ("PREDES Y:" + _root.predes._y + "is superior to" + topspan);
}
} else {}
onEnterFrame = null;
}
}

(deployment, dragOut, releaseOutside) {}
onEnterFrame = null;
}


The trace command shows me what is happening. _root. PREDES._y gets lower and lower, until finally she is less than topspan. At this point, it should make the statement "else" and onEnterFrame set to null. But it is not that. Instead, I get a trace statement that says "PREDES Y:-662.2 is greater than-560.

Dragout/deployment/releaseoutside code works very well.

Thank you, Craig. (The temptation to hit my forehead and scream "duh" is overwhelming).

Tags: Adobe Animate

Similar Questions

  • Why this small piece of code work

    A small piece of code, but get an error. What I'm missing here.

    Here is the error message:
    Invalid CFML construction found on line 27 in column 67.
    ColdFusion has been looking at the following:

    LTE

    The CFML compiler treated:

    * an expression starting with "#", on line 27, column 11. This message is usually caused by a problem in the structure of expressions.
    * The body at the beginning of on line 24, column 2 cfoutput tag.

    who did it, thanks

  • Repeat the small piece of code 1-100 hundred times with each code with a different instance name?

    Hi, here is a part of my code:

    player_mc.onEnterFrame = function() {}

    If (enemy0.hitTest (this)) {}

    enemy0. Speed = 0;

    } else {}

    enemy0. Speed = 1;

    }

    If (enemy1.hitTest (this)) { }

    enemy1. Speed = 0;

    } else {}

    enemy1. Speed = 1;

    }

    };

    Note the Red code, I need to repeat an unknown quantity still, but with the number on the end of the enemy incremented by 1 each time. It starts with 0 as you can see the code just above the red. I've heard for loops using 'i' but I'm not sure how to use. Please help and explain if possible. Thanks for reading and/or you answer.

    Edit: ah, this forum is not to let me highlight red. This editor is also a failure. Well, when I say code red this code:

    If (enemy1.hitTest (this)) {}

    enemy1. Speed = 0;

    } else {}

    enemy1. Speed = 1;

    }

    You can use a for loop but you should have the number of enemies available somehow.   To be able to target the many enemies by using the same code in a loop, the notation vracket is used as a string value is interpreted as an object...

    player_mc.onEnterFrame = function() {}

    for (i = 0; i

    If (_root ["enemy" + i] .hitTest (this)) {}

    _root ["enemy" + i] .speed = 0;

    } else {}

    _root ["enemy" + i] .speed = 1;

    }

    }

    }

    This code assumes that the enemies are on the main timeline.  Will they live elsewhere then you need to adjust the targeting

  • Divide a large TDMS file into smaller pieces

    Hello

    I'm dealing with a large dataset (5.6 GB) TDMS and wish to perform analyses on this subject in MATLAB. Of course, dealing with this large dataset at once would be impossible in MATLAB, so I need to divide it into smaller pieces.

    I started playing with Diadem to achieve this. I would like to create an automated script that I may need to do this several times in the future. I'm new to VBS but have managed to extract a small amount of data from the data portal and store it in a table. I was wondering how I can then write this data in a file separate from PDM. My amateur code is attached!

    Thanks in advance for any help,

    Matt

    Hi Matt,

    The best way to do is to apply the filter lines you want during the import process, so that you get only the elements of the array that you are interested in as new channels in the data portal - you can do it with the DataFileLoadRed() command.  Then, you can simply save the subset values you wanted (all the content of each channel) to the new export file, which could be a much smaller file of PDM or even a *.mat file if you downloaded and installed the MATLAB use we post free at www.ni.com/dataplugins.

    Brad Turpin

    Tiara Product Support Engineer
    National Instruments

  • T520: Small piece of paper stuck

    The print paper at the end of the roller got stuck on the last 2 inches of paper, the printer has kept trying to print on this small amount until the paper was distroyed and wedged between the heads of the printer. I can not pull paper backwards because there is nothing to grab the hand on, and this really hangs in the rollers. I'm down to the last 3 reels but can't get out the paper.

    Help, please.

    Hello
    Please turn off the printer and remove the paper tray for A4/A3 in the rear, there is a locking systems. Then try to remove the paper from the paper path. Now please carefully remove the transport aircraft with printhead with ink cartridges (from left to right) unit, then try to remove the paper from small pieces of printer paper.

    If the problem resolves, please air flow inside the printer, then there remove it automatically.

    Thank you
    Rashed

    I'm not an employee of HP, but I am an engineer @ HP Partner and I share my knowledge of my own time.
    If your problem is resolved please click the button "accept as a Solution.
    If my answer was helpful, please click the 'Thumbs Up' to say 'thank you '.

  • Download El Capitan into small pieces?

    My data plan allows only 800 MB per day.

    Can I download El Capitan into small pieces for several days, or need to download in a 6 GB file?

    N ° Apple does not split files into small pieces, you can go back. Why not visit the local Apple retailer/dealer and ask them to allow you to make a copy of the file. Don't forget to put a 16 GB USB stick with you that has been partitioned and formatted for Mac. Or you can ask a friend with a best data plan.

  • Satellite U500-00 x small piece is broken from plastic LCD frame

    Hey

    I U500 and there is a strip of plastic silver around the LCD screen and the left down corner, a small piece is broken...
    Can someone tell me how to solve this problem and it does not in the warranty?

    > Can someone tell me how to fix it
    For me, it looks like something is broken and in my opinion just a replacement part would be useful.

    > covers in warranty?
    I doubt that these issues are covered by the warranty because it s a broken part and a part can break without external impact

    But for more details that I recommend you to contact a technician of the ASP maybe they could provide more details and how to manage these cases

    Good luck

  • How to split the signal into small pieces (which have different lengths)

    I have a long waveform which is just a combination of a waveform, waveform 0 + one another + 0 +... I would like to have small pieces of the long wave form.  The problem is that I can't think at least detect the 0 value to separate them.  Any advice would be appreciated.

    How are generated segments of zero? They are exactly zero or zero average but with a bit of noise? You know the length of the segments of zero? Is it still the same? One of the waveforms have segments where real values are zero, and, if so, how long these segments is possible?

    My first thought is to use in range & force with limits just a little above and below zero. Verification of the length of a set of samples not in Range.

    Lynn

  • RE: Adding several pieces of code to head Adobe Muse tags

    I would like to install a custom Facebook public pixel code to place in the head tag of website and also Google analytic, is - this easy to do? I can just copy and paste the two pieces of code, one over the other? Y at - it traps? You can place several pieces of code in the head of meta tags data? Thank you

    In this case, I suggest you place the code in the metadata section if your master page.

    the codes will have an effect on all the pages on which the respective master has been applied.

    And Yes you can at any time place codes more than once in the metadata.

    Kind regards

    Ankush

  • Why this piece of code does not work?

    Hello everyone, I am new to HTML and web design, and I'm doing a website. I created this piece of code so that when the user mouse over one of the links (jpg image) it will change the colors (I have the same image in different colors saved in the same folder).

    < ! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional / / IN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > ""
    " < html xmlns =" http://www.w3.org/1999/xhtml ">
    < head >
    < meta http-equiv = "Content-Type" content = text/html"; charset = utf-8 "/ >"
    < title > < /title > XXXXXXXXXX
    < / head >

    < body bgcolor = "#000000" >
    < table width = "1050" border = "0" align = "center" cellpadding = "0" cellspacing = "0" >
    < b >
    < td > < table width = "1050" border = "0" cellspacing = "0" cellpadding = "0" >
    < b >
    < td > < img src = "_images/XXXXbanner.jpg" width = "1050" height = "311" alt = "banner" / > < table > "
    < /tr >
    < /table >
    < table width = "901" border = "0" align = "center" cellpadding = "0" cellspacing = "0" >
    < b >
    < td width = "150" > < a href = "index.html" Mm_swapimgrestore"onMouseOver =" MM_swapImage ('ButtonOne' ", ' _images/home_on.jpg', 1)" > "
    < img name = "ButtonOne" border = "0" src = "_images/home.jpg" width = "150" height = alt "75" = "home" / > < /a > < table > "
    < td width = "150" > < a href = "gallery.html" Mm_swapimgrestore"onMouseOver =" MM_swapImage ('ButtonTwo' ", ' _images/gallery_on.jpg', 1)" > "
    < img name = "ButtonTwo" border = "0" src = "_images/gallery.jpg" width = "150" height = "75" alt = "Gallery" / > < /a > < table > "
    < td width = "150" > < a href = "products.html" Mm_swapimgrestore"onMouseOver =" MM_swapImage ('ButtonThree' ", ' _images/product_on.jpg', 1)" > "
    < img name = "ButtonThree" border = "0" src = "_images/product.jpg" width = "150" height = "75" alt = "products" / > < / a > < table > "
    < td width = "150" > < a href = "store.html" Mm_swapimgrestore"onMouseOver =" MM_swapImage ('ButtonFour', ", ' _images/shop_on.jpg', 1)" > "
    < img name = "ButtonFour" border = "0" src = "_images/shop.jpg" width = "150" height = "75" alt = "store" / > < /a > < table > "
    < td width = "150" > < a href = "profile.html" Mm_swapimgrestore"onMouseOver =" MM_swapImage ('ButtonFive' ", ' _images/profile_on.jpg', 1)" > "
    < img name = "ButtonFive" border = "0" src = "_images/profile.jpg" width = "150" height = "75" alt = "profile" / > < / a > < table > "
    < td width = "151" > < a href = "contactus.html' Mm_swapimgrestore" onMouseOver ="MM_swapImage ('ButtonSix',", ' _images/contact_us_on.jpg', 1) ">"
    < img name = "ButtonSix" border = "0" src = "_images/contact_us.jpg" width = "150" height = "75" alt = "contact" / > < /a > < table > "
    < /tr >
    < /table >
    < table width = "1050" border = "0" cellspacing = "0" cellpadding = "0" >
    < b >
    < td > < table >
    < td > < table >
    < td > < table >
    < /tr >
    < /table >
    < p > < / p >
    < p > < /p > < table >
    < /tr >
    < /table >
    < / body >
    < / html >

    images and the banner appear thin and I do not have mistpyed one of the names of places/file. Why the icon does not change the colors (show image 'on') when you pass the mouse over it? Please help thanks in advance.

    * I use Adobe Dreamweaver CS4

    The head of your page contains no MM_swapImgRestore() or MM_swapImage() functions that are called by your code.

    Not sure how you have added the Beahviors yoru page.  If you have used the window of behaviours, DW should have added scripts to yoru page for you.  If you have added the code manually, then you will need to add the scripts manually.  But the easiest thing would be to simply add the behaviors of another link on the page, even a dummy, you can remove later.  This should get the scripts in the head for you.

    --

    E. Michael Brandt

    www.divaHTML.com
    www.divahtml.com/Products/scripts_dreamweaver_extensions.php
    According to the standard scripts and the Dreamweaver Extensions

    www.valleywebdesigns.com/vwd_Vdw.asp
    JustSo PictureWindow
    JustSo PhotoAlbum, and alia

    --

  • Do remote debugging in production with encapsulated code db

    Hello

    Assuming that we have the following scenario:

    -database out of production where all the code is unwrapped and compiled with debugging options.

    -database of production which has wrapped up the code and compiled without the debug option. It is necessary that the code should be wrapped on this environment. In addition, it is necessary that the pl/sql code is compiled without the debug option.

    -pl/sql code out of production and production environment on the same revision number, that is all the code on the production db is shrouded in code which is on non-production db.

    Assuming that one of the units of pl/sql call dbms_debug_jdwp.connect_tcp with the ip address and the port that points to my Sql developer, I'll be able to debug the production environment (which has enveloped the code and is compiled without the debug option) using Sql Developer?

    Thank you

    KS

    N °

  • Is it possible to save pieces of code html for easy insertion

    I have used arachnophilia for my html for many years

    It allows me to record pieces of commonly used html and simply click to insert in a page if necessary

    However it is therefore more appropriate to arachnophilia

    Edge code has no way to save commonly used for fast inclusion code blocks

    Here is an example that I use all the time. Much easier to save this and simply click rather than rewrite whenever I want to use

    < META NAME = "robots" content = "follow, index" >

    < META NAME = 'distribution' CONTENT 'Global' = >

    < META NAME = "revisit-after" CONTENT = "1 day" >

    < name meta = "googlebot" content = "all" / >

    < name meta = "msnbot" content = "all" / >

    < name meta = "yahoobot" content = "all" / >

    < META http-EQUIV = "Author" CONTENT = Inc. CanLaw ">"

    < name meta = "copyright" content = "canlaw.com" >

    < name meta = "Robots" content = "ALL" >

    < = happy ' rating' meta name = "Général" >

    Edge code is a re-branding of media (http://brackets.io), so that you can install any extension brackets (https://brackets-registry.aboutweb.com/) in the edge Code. Use file > extension manager... to install the extensions.

    I think that the extension of excerpts from media makes you want.

    Randy

  • Can this piece of code be improved?

    DB version: 11.2


    I'm not an expert in PL/SQL.

    Since then, we treat (an UPDATE) about 7 million records per batch run, our developer has decided to put this in a loop that will process 1 million per iteration (rownum < 1000001).

    -excerpt from our stored procedure in question
    while var_cnt != 0
     
              loop
                    select count(1) into var_cnt from shp_dtl a where  
                     a.region_code = p_rgn_code
                     and a.shp_date = p_date
                     and exists (select 1 from shp_status_dtl b where b.map_no = a.cd_map_no and a.region_code = b.country_code
                     and b.ema_revise_date != p_date);
    
                begin
    
    
                  update shp_status_dtl a set
                               .
                               .
                               .
                               ;
    
                commit;
    
                exception
                when others then
                raise;
                end;
    end loop;
    I know you gurus dislike engages in a loop. But we're COMMITin that each million documents.

    No room for improvement for the piece above the code?

    If the update is short of UNDO, accordingly increase the UNDO tablespace.

    In addition, this update could be rewritten as a merger, something like:

    merge into shp_status_dtl a
    using (select cd_contact_person
           from   shp_dtl
           where  region_code = p_rgn_code
           and    shp_date = p_date) b
      on (a.country_cod = b.region_code
          and a.map_no = b.cd_map_no)
    when matched then
    update a.ema_revise_date = p_date,
           a.contact_person = b.cd_contact_person
    where  a.ema_revise_date != p_date;
    

    NB. No test!

  • Pls. do the bottom of piece of code as a common function in JS?

    Hello

    (I'm new JS & LC)

    I have a my_subform to page-2, and I have a lot of drop-down fields in my_subform. To maintain dependency / filtring uses the list box, the piece of JS code below (in fact, this code does not work for some reason, but I'll try to understand what went wrong in this code by using / putting instruction MESSAGE for after each and every statement so that I can follow the stream) ,

    (In fact I got it another expert in my thread of == > http://forums.adobe.com/message/5724054 ( )

    var = itemList [];

    for (var I = 0; i < Hidden_Area_Field.length; I++)

    {

    displayItem var = Hidden_Area_Field.getDisplayItem (i);

    var displayItemArray = displayItem.split (' $');

    if (displayItemArray [0] == Zone.rawValue)

    {

    itemList.push(displayItemArray[1]);

    }

    }

    See the URL provided, 29 Sep Pls chk Bruce, 2013 21:05 reply

    As I mentioned, I hv lot of drop-down fields in my_subform, I need to hv this JS on each field dropd-wn, but I want to make it so simple for maintenece, accordingly to avoid code redenncy pls provide me service JS for the above said JS

    Thank you

    Adobe Help files are a good reference when you try to do something http://help.adobe.com/en_US/livecycle/9.0/designerHelp/index.htm?content=000818.html

  • How to optimize the speed of execution of a specific piece of code?

    Is there a structure that can encapsulate the code to make the code have absolute priority when the code is executed?

    Thank you

    Set property "reporter Panel" updates on the front panel of the VI true before the beginning of your code, and set it to false afterwards. This should stop the table blinking when you disable and change the color and will considerably speed up updates.

    Here is an example:

Maybe you are looking for

  • MacBook pro error message - 3001F

    I had some probelsm with my Macbook Pro for a week or two, it started ok and then everything was frozen - mouse has been active, however I couldn't click on anything that it is - what happens now more regularly but I managed to backup everything. I'm

  • What is Malware?

    I went to a site that I had used in the past with no problems: Keepvid Today, there was a notice that says I could no longer use the site as a guest and create an account.  Yes, I did.  Thus, whip me, beat me, make me write cheques, but it turns out

  • Which button could I hit to make the font size of the email if small, that you can't read the email?

    I was typing an email to a friend and then press a key on the keyboard, causing the police or lettering enamel to be so small, that now I can't read any of my emails, they are so small. EC which could I touched or did to cause this?

  • Is there a quick way to numbers iTunes album titles?

    I'm in a band and have simply copied a load of our demos to iTunes as an album, with works of art, etc.. Is there a quick way to request a track number to each song, so the album is in the right order? Or do I have to do a "Get Info" for each song in

  • NC helmet will work on this bluetooth headset?

    SBH54 Bluetooth® stereo headset Noice cancelling and the functions of these headphones: High resolution headphone Audio MDR-NC750 work with the headset?