How do I set a variable within a 'for' loop grid array

I'm afraid I'm stuck again!
The next stage in the animation that I'm working on,  is to set up a boolean, 'drilled = false', so that all instances of the attachMovie ('openCircle') have a boolean 'drilled = false' associated with them. Then when someone clicks on one of the instances of the attachMovie ('openCircle'), the boolean becomes 'drilled = true', but only for that instance that has been clicked.
What I've done is to set the variable (boolean)(highlighted in bold below) within both 'for' loops within the grid array, but it just returns an undefined value. Do I need to setup a separate array? (see code below):-
//set up grid for solid array
var spacing:Number = 5.75;
var cols:Number = 20; // number of columns in grid
var rows:Number = 20; // number of rows in grid
var leftMargin:Number = 154;
var topMargin:Number = 169;
var depth:Number = 100; // starting point for depth
var drilled:Boolean;
for (i=1; i<=rows; i++) {                                                                                                         
for (j=1; j<=cols; j++) {                                                                                                                              
          drilled[rows,cols]=false;
                    trace(drilled);
          current = attachMovie("openCircle_mc", "openCircle_mc"+i+"_"+j, depth++);
          current._x = leftMargin + ((i-1) * (spacing + current._width));
          current._y = topMargin + ((j-1) * (spacing + current._height));
          current.row=i;
          current.col=j;
//          current.oil = Math.floor(Math.random()*1.1);  // about 1/10 objects have oil=1, 9/10 oil=0
          //open circle initially invisible, visible on rollOver
          current._alpha = 0;
          current.onRelease=function(){
                    trace(this.row+" "+this.col);
   current.drilled = true;
          current.onRollOver = function() {
                                 this._alpha = 100;
          current.onRollOut = function() {
                                 this._alpha = 0;
I'd be grateful for any help. Thanks.

I'm sorry for asking this question again, but I really need to have the 'drilled' variable to be available at all times outside the openCircle_mc, so if I can set up the 'drilled' variable as an array that would be good. Below is the code that isn't working:
/*  set all values of 'drilled' to false  */
var col:Number = 20; // number of columns in grid
var row:Number = 20; // number of rows in grid
for (g=1; g<=row; g++) {
          for (h=1; h<=col; h++){
                      drilled[g,h] = false;
Very many thanks

Similar Messages

  • Set file position within a for loop, error 1

    Hi, I'm reading from a .sxm file consisting of a large chunk of text followed by binary data for 512x512 images with 4 bytes per pixel
    I’ve managed to successfully identify the start of the binary and read the first image from the file and view it using  "flatten pixmap.vi", so I’m doing something right, however when i try to read the next chunk of image data in the .sxm file using a for loop, set file position keeps churning out ERR (1).
    im at a loss as to whats causing this
    Solved!
    Go to Solution.
    Attachments:
    binaryread3d trouble.vi ‏22 KB
    back panel screenshot.png ‏27 KB

     I closed the file in the loop, doh! ... another morning well spent

  • How do I set a variable on the main timeline from within a symbol?

    Just getting started with Animate and coming to it from Flash, as may be apparent from my question. How do you set a variable to the main timeline from within a symbol?
    I have 24 pairs of clickable elements, each in their own symbols, and all 24 of those symbols sit inside another symbol. I want all 24 to be able to set the same global variable when clicked. I can't find that this question is addressed anywhere, which makes me think I may be stuck in a Flash mindset and approaching the task in the wrong way. (There are however MANY discussions of how to address objects at different levels in the hierarchy. That's well covered.)
    Relatedly, how do you access a function on the main timeline from within a symbol?
    Adobe should consider putting together a support page (or pages) just for folks migrating form Flash. In the materials I've encountered so far there seems to be a studied effort to refrain from mentioning Flash in any way. I imagine there are a lot of people out there like me who have a deep background in Flash coding, but are just getting started with Animate. We don't need help with most of the basic concepts, but we may still have some pretty basic questions about how to accomplish some things in Animate because our Flash knowledge is getting in the way.

    Hi Bill,
    There are plenty of threads on here about scope, but here's one way to create a global variable:
    // code on Stage.compositionReady
    sym.myGlobalVar = 1;
    Then, anywhere in your project, you can check/set that var like so:
    sym.getComposition().getStage().myGlobalVar = 2;
    And here's one way to create a global function:
    // code on Stage.compositionReady
    sym.myGlobalFunction = function(){
              console.log('myGlobalFunction');
    Then, anywhere in your project, you can call that function like so:
    sym.getComposition().getStage().myGlobalFunction();

  • How can I set a variable number of values in a SQL IN clause?

    Hi,
    How can I set a variable number of values in a SQL IN clause without having to change the text of the SQL statement each time?
    I read the link http://radio.weblogs.com/0118231/2003/06/18.html. as steve wrote.
    SELECT *
    FROM EMP
    WHERE ENAME IN (?)
    But we need the steps not to create type in the system and would there be any other solution if we would like to use variable number of values in a SQL IN clause ?
    We are using JDeveloper 10.1.3.2 with Oracle Database 10.1.3.2
    Thanks
    Raj

    Hi,
    can you please explain why the solution from steve is not the right solution for you.
    regards
    Peter

  • How do I set System properties within WL6.0?

    I am setting WL6.0 up to have a startup class, but this class needs to
    read system properties which have not yet been set. How do I set these
    up within weblogic? I was able to get the startup class set up, but it
    needs these system properties to continue.
    gmo

    Correct on all points. The one advantage of doing this in java is that you can more easily do more
    complex things like accessing configuration information from a remote data store (like a database).
    Dimitri Rakitine wrote:
    These are not needed if you simply replace java ...lots of options... weblogic.Server with
    java ...lots of options... startmyWLS in the script which starts WebLogic, but, on the other
    hand, this solution is no different from simply adding -DmyProperty=myValue to the startup script
    (I think that the ultimate goal is the ability to deploy(and redeploy!) components,
    without any mods to the particular vendor's startup scripts of anything of that nature).
    Kumar Allamraju <[email protected]> wrote:
    Thanks to robert for a quick workaround..
    I tried to start the WLS with the following piece of code and actually i need to set
    some additional properties
    for successful server startup.
    Here it is
    import java.util.Properties;
    public class startmyWLS
    public static void main(String[] args)
    Properties props = System.getProperties();
    props.put("myProperty", "myValue");
    props.put("bea.home", "E:\\bea");
    props.put("weblogic.Domain", "mydomain");
    props.put("weblogic.Name", "myserver");
    props.put("java.security.policy",
    "E:\\bea\\wlserver6.0\\lib\\weblogic.policy");
    System.setProperties(props);
    weblogic.Server.main(args);
    Make sure you run this from E:\bea\wlserver6.0., as it tries to read config.xml
    config\[your-domain-name] from this
    directory.
    Kumar
    Robert Patrick wrote:
    import java.util.Properties;
    public class StartMyWebLogicServer
    public static void main(String[] args)
    Properties props = System.getProperties();
    props.put("myProperty", "myValue")
    System.setProperties(props);
    weblogic.Server.main(args);
    gmo wrote:
    That won't work since it has to be 'outside' of the code. It's a service, and
    services are started when weblogic is started up, not when I call a bean.
    And it has to be dynamic, since the properties will vary on evry installation.
    Robert Patrick wrote:
    You can also use System.setProperty() or a combination of
    System.getProperties() followed by a System.setProperties()...
    gmo wrote:
    They are not normal system properties. I'm using some open source code, and
    it requires settings to be system properties, but they are specific to the
    application, which means that they are not already in the system
    properties. I know how to get them, and after some more research, you can
    set them on the command line when starting up weblogic. However, is this
    the best way to set system properties?
    Robert Patrick wrote:
    What "system properties" are you trying to find?
    gmo wrote:
    I am setting WL6.0 up to have a startup class, but this class needs to
    read system properties which have not yet been set. How do I set these
    up within weblogic? I was able to get the startup class set up, but it
    needs these system properties to continue.
    gmo
    Dimitri

  • HT2731 How do I set up an Apple ID for a child with gift card credit

    How do I set up an Apple ID for a chld with a gift card credit, without credit card details and without using my own account?

    Go to the main iTunes Store page (within iTunes),  click on the "Redeem" link on the right side of the page, click "Create Apple ID", and enter in the code from your card when requested. You should be able to create an iTunes Store account for your child without needing a credit card. You'll just need an email address for him/her to create the ID, though it can be a "temporary" one that you don't intend to really be used. You can change the email address to which receipts are sent to an account you really wish to use.
    Regards.
    Message was edited by: varjak paw

  • How do I set-up on %ORACLE_HOME%\bin for Oracle client on Windows XP

    How do I set-up on %ORACLE_HOME%\bin for Oracle client on Windows XP?
    The Oracle bin directory is: C:\oracle\ora90\bin
    Thank you!

    If you are asking how to setup the resolution of %ORACLE_HOME%\bin to C:\oracle\ora90\bin, you must create a system environment variable called ORACLE_HOME that is set to a value of C:\oracle\ora90.
    Kind regards,
    Russ

  • How do I set up an itunes account for a minor?

    How do I set up an itunes account for a minor?

    Hello kyleaho0048,
    Thanks for using Apple Support Communities.
    If you are trying to set up a new Apple ID, please follow the instructions in the following article:
    iTunes: How to set up an Apple ID within iTunes
    http://support.apple.com/kb/HT2731
    Since this is for your young son, I also recommend taking a look a the the built-in parental controls in iTunes:
    iTunes: Using Parental Controls
    http://support.apple.com/kb/ht1904
    Take care,
    Alex H.

  • How do I set up a seperate account for my wife?

    We finally purchased a nice new iPhone for my wife. But she would like her own iTunes account. How do I set up a seperate account for her? She has her own laptop, with an iTunes account on it that I was using. Should I just un-install that iTunes package and have her download a new version? I'd rather have two versions so I don't lose the music on that old iTunes account. It's not huge, but would be a PITA.

    Apple ID
    Go to iTunes > Store > Sign Out (your apple id) and sign your wife apple id in.

  • How do I set Firefox to be usable for all users on one computer?

    How do I set Firefox to be usable for all users on one computer?

    I would think the about:config entries discussed are ex-factory set to values each user has to change individually, after the installation has run its course. The solution could be to have patched files ready to install post factum:
    [https://developer.mozilla.org/en-US/docs/Mozilla/Preferences/A_brief_guide_to_Mozilla_preferences A Brief Guide to Mozilla Preferences - MDN]

  • How do i set up a second display for my iMac desktop?  I want to use both displays at the same time.

    how do i set up a second display for my iMac desktop?  I want to use both displays at the same time.  My iMac is the 24" Late 2006 model.  I recall that there is a cord for plugging in a second monitor, but I want to make sure that i can use both monitors side-by-side at the same time.  thank you.

    If the Display supports DVI, then you will need a > Mini-DVI to DVI Adapter and a DVI cable.
    If the Display only supports VGA, then you wiil need a > Mini DVI to VGA Adapter and a VGA cable.
    Noting that the (digital) DVI is far better than the (analog) VGA connection.
    Also see > Using Dual Displays on Mac OS X: The Experience

  • How can i set up multiple user accounts for my new ipad mini?

    How can i set up multiple user accounts for my new ipad mini?

    The iPad mini is basically a one user device. There are no Accounts. You can set up restrictions so that only you can do certain things.

  • How do I set the default welcome page for PUBLIC user

    gurus,
    i'm using -
    Oracle 9i Database
    Oracle 9ias Portal Release 2
    QUESTION => how do I set the default welcome page for the PUBLIC user.
    i did the following to achieve this -
    1. logged into portal
    2. clicked on builder
    3. clicked on administer tab
    4. selected PUBLIC user in the Portal User Profile portlet
    5. went to the preferences tab
    6. in the default home page selected a custom page group
    7. logged out of portal
    8. open a new browsere session
    9. type the portal URL and i get the login page ....??
    i'm unable to understand this behavior ... shouldn't i be getting the page group that i set for the PUBLIC user in step 6 above ....
    the second QUESTION is => when the user logs out he/she should see the PUBLIC page set in step 6 above ... but, instead the user sees a page that is as follows -
    Partner Application Name Logout Status [Logout Status]
    Oracle Portal (portal) logout status
    The SSO Server (orasso) checkmark
    buzz.resva.trw.com:7778 checkmark
    infrastructure.happy.resva.trw.com checkmark
    portal1.buzz.resva.trw.com checkmark
    portal2.sylvester.resva.trw.com checkmark
    sylvester.resva.trw.com:7778 checkmark
    so, how can i set the default page for the PUBLIC user and also a page when he user logs out.
    ideas anyone ....?
    thanx a bunch.
    hero

    Hi,
    The sequence of operation you are doing to set the home page for public users is correct. You are getting the login screen as the "custom page group" selected as "home page" has not been granted to public.
    Also, while logging-out, it is normal behaviour to get the screen where it shows the list of partner applications from where user has been logged-out. When you click on "Return" button, you will get to the "home page" set above.
    Hope it clarifies the things.
    Regards,
    Ved

  • How can i set a global error page for all error cod

    how can i set a global error page for all error code?
    i don't want to leave a long list in the web.xml file.could any one help me?
    thanks

    If u have a common Error JSP named as ErrorPage.jsp
    You need to have the following piece of code in the JSP as :
    <%@ page isErrorPage ="true"%>
    This makes it as the Common Error Page for the Application. Now all you need to do is from other JSP's throw the Exception to teh container. The container will redirect to this Page and process accordingly.
    Thanks and regards,
    Pazhanikanthan. P

  • Simple/silly question: how do I set/change default font/color for outgoing mail messages?

    Simple/silly question: how do I set/change default font/color for outgoing mail messages?

    Just a suggestion..........
    Download Thunderbird.  Easier to use when it comes to what you want to do w/your emails. 

Maybe you are looking for

  • GT70 keeps powering down when plugged in

    it happens randomly but many times it happens b4 i can even sign into windows. tried restoring but it turned off while i was doing that and all restore points but one was left after that so i went back to factory install. it seems worse and now chrom

  • CMTS Issue when is write command entered

    Hi All , I found strange issue with IOS SCG6 i get this errors . Standby crash when is done write on CMTS ubr10k. Apr 11 13:52:43: %UBR10000-3-PROXY_OR_SPOOF_ARPREPLY: Interface Cable5/1/2, ARP reply is a proxyed ARP reply or spoofed attempt. IP=x.x.

  • OO4O Localization

    I'm accessing an Oracle 9i Database (US Version), NLS_TERRITORY=US from MS Visual C++ using Oracle OLE Objects (for C++). I've a real strange problem with number formats. I'm Using a German Windows XP on my client, and an english version of OO4O (are

  • Archiving PO

    Hello SRM Expert, System: SRM 5.0 Classic Scenario Problem: We create a PR in EBP, after running the report CLEAN_REQREQ_UP the Java Applet for following docs show that: + SC 100044807/1 Document create I PR 200014509/10 I PO 4500257551/10 archived+ 

  • Ubuntu-12.04.3-desktop-i386

    Hello, I want to learn Linux so have tried to create a VirtualBox vm for ubuntu...Get this error: Failed to open a session for the virtual machine ubuntu-12.04.3-desktop-i386. The VM session was aborted. Result Code: NS_ERROR_FAILURE (0x80004005) Com