Reassign class variable to a blank instance of its class

When I declare a class variable
private var myVar:MyClass = new MyClass();
It creates a new instance of that class that will trace as [Object MyClass].
However, as soon as I assign it to something
myVar = thisOtherVar;
It will now trace as [Object thisOtherVar].
I need to get it back to where it's just an "empty" blank class instance, if that makes any sense at all.
How do I go about doing that? Thanks!

I'm brand new to OOP - I've been watching iTunes U videos and reading books but it's still all pretty abstract in my mind and it's difficult for me to pin point how all that stuff translates to actually writing good code.
Basically, it's an open ended kid's dictionary. You drag the lettes to drop boxes, touch the check to see if it's a word, and then a picture representing the word pops up on the screen.
All of it works except if you try to remove a letter that's already been placed. Originally, I wanted the check button to do a sweep of the dropped letters and see if they had formed a word - but I couldn't figure out a way to do that. So then I started tracking movements of letters in real time, and that's when it got really confusing. I think I just need to start over and try to make the code a bit cleaner. Right now this is what I've got:
if (currentUsedBlank is BlankSquare) {  //if they have removed a letter that has already been dropped
                if (currentUsedBlank != currentBlank) { //and it's been placed back on a different square
                    currentUsedBlank.letter = null;
            else {
                currentUsedBlank.letter = null;
            if (this.dropTarget.parent is BlankSquare && currentBlank.letter == null) {
                SpellingGlobals.lettersInBlanks[SpellingGlobals.lettersInBlanks.length] = this;
                this.x = this.dropTarget.parent.x + 10;
                this.y = this.dropTarget.parent.y - 10;
                var myClass:Class = getDefinitionByName(getQualifiedClassName(MovieClip(this))) as Class;
                var newLetter:MovieClip = new myClass();
                newLetter.x = currentLetter.startPoint.x;   
                newLetter.y = currentLetter.startPoint.y;
                newLetter.letter = currentLetter.letter;
                newLetter.reference = currentLetter.reference;
                newLetter.startPoint.x = currentLetter.startPoint.x;
                newLetter.startPoint.y = currentLetter.startPoint.y;
                newLetter.isVowel = currentLetter.isVowel;
                currentBlank.letter = currentLetter.letter;
                if (SpellingGlobals.isCaps == true) {
                    newLetter.txt.text.toUpperCase();
                    if (SpellingGlobals.isColor == true) {
                        if (newLetter.isVowel) {
                            newLetter.txt.textColor = SpellingGlobals.colorVowel;
                        else {
                            newLetter.txt.textColor = SpellingGlobals.colorCon;
                MovieClip(root).addChild(newLetter);
                SpellingGlobals.copiedLetters[SpellingGlobals.copiedLetters.length] = newLetter;
                currentBlank.alpha = 0;
            else {
                this.x = MovieClip(this).startPoint.x;
                this.y = MovieClip(this).startPoint.y;
            this.stopDrag();

Similar Messages

  • Firefox freezes then opens multiple blank instances, can't stop it

    ver 4.01, Win 7. Freezes then opens 20-30 blank instances of firefox. Have to restart computer . Has done it 3 times in 2 days

    See if this helps you - [[Firefox keeps opening many tabs or windows]]

  • Variable text is blank in emails when using Scheduled Task to email event log notifications

    I am trying to use powershell to email notification when a user account gets locked.  I am running the script from a server 2008 domain controller.
    I have tried multiple scripts and I have the same issue every time.  The script works fine when I run it directly from the powershell command line window.
    However whenever I try running the exact same scripts from an event-triggered scheduled task, the script runs, however any content that generated from a variable is not added to the email.  It is just left blank and ignored.
    I have tried adding lots of permissions including domain administrator group membership to the account  runs the task from and it doesn't include all the expected text unless I run it from the built-in domain administrator account.
    The task runs and the email is sent, but the email is missing all the content generated by variables.
    How can this be fixed?
    Here is an example script.
    $AccountLockOutEvent = Get-EventLog -LogName "Security" -InstanceID 4740 -Newest 1
    $LockedAccount = $($AccountLockOutEvent.ReplacementStrings[0])
    $AccountLockOutEventTime = $AccountLockOutEvent.TimeGenerated
    $AccountLockOutEventMessage = $AccountLockOutEvent.Message
    $messageParameters = @{ 
    Subject = "Account Locked Out: $LockedAccount" 
    Body = "Account $LockedAccount was locked out on $AccountLockOutEventTime.`n`nEvent Details:`n`n$AccountLockOutEventMessage"
    From = "[email protected]
    To = "[email protected]
    SmtpServer = "exch2010.domain.local" 
    Send-MailMessage @messageParameters
    =================================================
    Here is an example of task settings.
    <?xml version="1.0" encoding="UTF-16"?>
    <Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
      <RegistrationInfo>
        <Date>2015-03-25T21:40:28.8095226</Date>
        <Author>DOMAIN\administrator</Author>
      </RegistrationInfo>
      <Triggers>
        <EventTrigger>
          <Enabled>true</Enabled>
          <Subscription>&lt;QueryList&gt;&lt;Query Id="0" Path="Security"&gt;&lt;Select Path="Security"&gt;*[System[Provider[@Name='Microsoft-Windows-Security-Auditing'] and EventID=4740]]&lt;/Select&gt;&lt;/Query&gt;&lt;/QueryList&gt;</Subscription>
        </EventTrigger>
      </Triggers>
      <Principals>
        <Principal id="Author">
          <UserId>DOMAIN\WilliamsD</UserId>
          <LogonType>Password</LogonType>
          <RunLevel>LeastPrivilege</RunLevel>
        </Principal>
      </Principals>
      <Settings>
        <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
        <DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
        <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
        <AllowHardTerminate>true</AllowHardTerminate>
        <StartWhenAvailable>false</StartWhenAvailable>
        <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
        <IdleSettings>
          <StopOnIdleEnd>true</StopOnIdleEnd>
          <RestartOnIdle>false</RestartOnIdle>
        </IdleSettings>
        <AllowStartOnDemand>true</AllowStartOnDemand>
        <Enabled>true</Enabled>
        <Hidden>false</Hidden>
        <RunOnlyIfIdle>false</RunOnlyIfIdle>
        <WakeToRun>false</WakeToRun>
        <ExecutionTimeLimit>P3D</ExecutionTimeLimit>
        <Priority>7</Priority>
      </Settings>
      <Actions Context="Author">
        <Exec>
          <Command>powershell.exe</Command>
          <Arguments>-nologo -File "C:\powershell\l2.ps1"</Arguments>
        </Exec>
      </Actions>
    </Task>

    By variable text I mean everything that it generates by using a variable such as the user's name ($LockedAccount)
    and everything else such as $AccountLockOutEventTime and everything else that is generated from
    a variable.
    Nothing like that appears in the email only hard coded text.
    I am not running it remotely.  I am logged directly onto the domain controller and I tried giving
    the account that is used to run the task more and more permissions including domain administrator group membership with the same result.
    When I run the exact same script on the same domain controller locally via the powershell CLI all of the info appears.
    This is the info when the email is generated by running the script directly from the powershell CLI:
    ================================================
    ================================================
    Account BondJ was locked out on 03/26/2015 20:42:18.
    Event Details:
    A user account was locked out.
    Subject:
                    Security ID:                         S-1-5-18
                    Account Name:                 DC1$
                    Account Domain:                            
    DOMAIN
                    Logon ID:                            
    0x3e7
    Account That Was Locked Out:
                    Security ID:                         S-1-5-21-3440879815-2193117124-1719501250-1154
                    Account Name:                 BondJ
    Additional Information:
                    Caller Computer Name:                DC1
    ===================================================
    ====================================================
    Below is the contents of the email when the same script runs via scheduled task trigger using any account I try other than the built-in domain Administrator account.
    =======================================================
    ======================================================
    Account  was locked out on .
    Event Details:
    ===================================================
    Just mostly blank email body with the info above.  All the important information text is missing from the email.

  • Instantiate an instance inside its class

    I always read codes like following:
    Class A {
    A a = new A( );
    Could anybody tell me why a class is able to instantiate its instance inside itself.
    Another example:
    Class A {
    B b = new B( );
    Class B{
    A a = new A( )
    When Class A is running, it calls Class B, but when Class B is instantiated
    , it needs to call Class A. I am always puzzled about this kind of codes.

    Everything in the world is an object - not only the building, but also the blueprint for this building is some kind of sheet of paper.
    In Java, the Class Objects are loaded as soon as you go into runtime. The VM recognizes all necessary classes, and creates one single instance of them. So, static attributes are indeed a singleton pattern on class level...
    A class even has an own constructor. This constructor looks like this:
    class ClassA{
          // Insert Class Constructor input here
    }All static attributes are implicitly constructed in this class constructor.
    However, what you have written, is just a simple Form of:
    class ClassA{
       ClassA a;
       public ClassA(){
         a = new ClassA();
    }This is indeed a neverending loop, so this doesn't make sense. But it isn't unusual to hold a reference to another object of the same type.

  • Accessing a variable from different application instance in fmis

    Hello everyone i like to know how to declare a global variable in FMS, so that i can access it from different application instance of a same application.
    Thank.

    Hi,
    In such a use case you can use persistent shared object to keep track of all connected users and the instances they are connected to. then when a user connects in application.xml you can check whether that user name and password is valid for a instance. This doc should help you get this achieved http://help.adobe.com/en_US/FlashMediaServer/3.5_Deving/WS5b3ccc516d4fbf351e63e3d11a0773d3 7a-7fff.html
    Thanks,
    Abhishek

  • Simple math and a variable in an mc instance name

    i have several movie clips with instance names in the format
    of screened1, screened2, screened3, and so on. i am trying to
    reference a movie clip as shown below, but it's not working. what
    am i doing wrong? how do i fix it?
    this.screened[numOfItems-8].transform.matrix = F1toP0;
    the transform, matrix and all of that works fine. but when i
    add the information between [ ] to make reference to the movie clip
    instance name, no go. numOfItems is a number, and when run trace on
    it.... it does return a value in the output.

    right on. my favorite flash genius. thanks again!

  • Oracle environment variable setting for mulit instances

    Dear experts,
    I am doing CRM_ABAP, CRM_JAVA,ERP installation based on Oracle in a laptop for SAP Best Practise.
    The CRM_ABAP installation have done, and start to install CRM_JAVA named CRJ.
    In CRM_ABAP installation, I set Oracle environment variable as below:(/etc/profile.d/oracle.sh)
    ・CRACLE_SID=u201DCRMu201D
    ・CRACLE_HOME=u201Doracle/CRMu201D
    ・PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/bin/oPatch:$PATH:
    ・export CRACLE_SID CRACLE_HOME PATH
    My question is that how do I set environment variable for CRM_JAVA(CRJ) in oracle.sh,?
    I tried e.g. CRACLE_SID=u201DCRMu201D:u201DCRJu201D, CRACLE_HOME=u201Doracle/CRMu201D:u201Doracle/CRJ/102_64u201D
    or CRACLE_SID=u201DCRJu201D CRACLE_HOME=oracle/CRJ/102_64u201D export CRACLE_SID CRACLE_HOME
    in addition
    but got an error message in SAPinst (Task Progress: configure Oracle server network)
    said u201CAssertion failed:lsnrctl:Parameter dbHOME has to be a valid ORACLE_HOME).u201D
    kindly help me to reslove the issue.
    Thanks.
    regards.
    Li.etsuhin

    Setting a Linux environment variable like ORACLE_SID to multiple values will not work.
    Use another oracle.sh, and maybe also another Linux user.
    I am not familiar with the details, but what does your installation guide say?
    Or you may have to use the same values for Java. The installation guide will tell you.

  • Setting bind variable to a different value if its null

    Hi,
    I have a report page which displays a table. One of the parameters of the sql query that generates this table is an apex bind variable.
    I want the page to to run a different sql query depending on whether the bind variable is blank or not.
    How can I do this in Apex without having to do use a function?
    It would be good if I good reset the bind variable to another value (generated from a different sql statement) when the page loads.
    Thanks
    Edited by: sam on 17-Feb-2011 07:43

    Hi,
    Thanks, that's really helpful.
    I'm passing a value (:P1_VAR1) as null from page 1 to page 2. On page 2 I have a table with the first column showing primary keys that have links.
    When the user clicks on the link, it refreshes page 2 and sets the value on session :P1_VAR1 to the value of the primary key of the record clicked.
    However, the problem is that when the user goes from page 1 to page 2, I want the :P1_VAR1 to be initialised to the first primary key record from the first record on my table.
    I have a function that gets the id of the first record on my table but I don't know how to set the :P1_VAR1 to this value by modifying the item settings in APEX.
    Please can someone help and give me an example on how this is done?
    Thanks
    Edited by: sam on 17-Feb-2011 07:49

  • Since the last update, you have open your websites and they used to show a pic or website marker at the beginning of each website so you knew what it was, not its just a blank letter and its says something other than the website being viewed, annoying. So

    Please fix the missing website detail pics in the tab bar.
    == This happened ==
    Every time Firefox opened
    == Last update a few days ago

    mikeporter wrote:
    I'm sorry I'm not aware of any "cumbersome" subpanels - unless of course you don't know what you're doing. There is this wonderful invention called a "subVI" that can be used to organize and simplify your code, or are they too "cumbersome" as well? You should really learn a bit about what you are pontificating over before you start running off at the mouth.
    Mike...
    I didn't want to step on your toes. No need to get personal.
    Subpanels make some additional code necessary that hasn't got to do anything with the actual program. And I AM using subIVs as I wrote in my first post, which is exactly the root of the problem.
    Nevertheless I now solved it in a way that comes close to what I wanted. I don't know if some of you meant your suggestions to be understood that way (at least I didn't ). The subVIs will now "insert" themselves (via invoke node) into a subpanel on the main vi, which they are given a reference of at call. This adds minimal aditional code, especially on the main VI which I want to keep as clean as possible. By clustering the panel reference into the parameters the subVIs are already given (not used in the example I attached below), there isn't even a change on the terminals of the subVIs.
    I got to check now if this works well with event structures within the subVIs or if it can create the same problems like multiple event structures within a single VI.
    So no global variables anymore and no writing values by property node. I don't know if this just wasn't possible in previous Labview versions I had a try at that (I guess it was 8.6 and/or 2009) or I just didn't come up with the idea back then.
    And if the text wasn't that helpful, here are two screens:
    Parent VI:
    SubVI:
    Attachments:
    main.png ‏2 KB
    subvi.png ‏5 KB

  • Why is my iphone sending blank texts on its own?

    I keep getting texts back from friends saying that I have sent them blank text messages, and some of them recieved multiple blank texts. Why is my phone doing this on its own?

    Did you find an answer?

  • Macbook screen goes blank depending on its angle?

    My macbooks screen goes blank unless it is at a specific angle, is this a cable problem and how much to get repaired?

    While it's impossible to diagnose a hardware problem online it is more than likely a bad inverter cable. Go to www.ifixit.com and look up the repair tutorial to see if you'd rather do it yourself.

  • How do you assign an InDesign server instance to its own drive?

    I am working on optimizing the performance of our InDesign server and read about the possibility of assigning drives to the individual instances in the performance guide. Is there a configuration file or command-line argument for configuring the working drive for each server instance?

    I am not sure about that. Do you mean that all I have to do is provide the interface <cc:attribute name="value" type="lvl1.lvl2.someClass"/> and when I run the method, the returned result will be written into the expression provided in "value"?

  • Blank web page- its full in dreamweaver..honest.

    I posted two question last week and recieved all sorts of very helpful answers in the back. Nancy O even wrote me a code. I'm in the process of implementing them/ making sense of it all and all of a sudden I cannot preview my dreamweaver sites. Also www.sbrownarchitects is a grey blank screen. I'm perplexed. What the heck did I do? This is related to the previous question, and I haven't changed my keyboard, am using Internet Explorer...
    Thanks.

    When this happens, it's almost always a code error.  Either an opened division, or too many closed </div> tags in your document. Use the W3C's online validation tools to check your HTML and CSS code as you work.   HINT: If you use Firefox, get the Web Developer Toolbar add-on.
    HTML Validation errors:
    http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.sbrownarchitects.com%2F
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb
    HTML Validator - http://validator.w3.org
    CSS  Validator - http://jigsaw.w3.org/css-validator/ 
    HTML & CSS Tutorials - http://w3schools.com/

  • Message says blank DVD but its not

    Hello...I have a mac pro running 10.5.8 and have successfully burned many DVDs thru iDVD...they play properly when I watch them on a DVD player thru my TV but when I put them in the computer it says that I've inserted a blank DVD...whats going on?

    Rentals are a one-time only download - if you downloaded it on your iPad then from here :
    If you download a rented movie on your computer: You can transfer it to a device such as your Apple TV (1st generation), iPhone, iPad, or iPod if it’s a standard-definition film (movies in HD can only be watched on your computer, iPad, iPhone 4 or later, iPod touch (4th generation or later), or Apple TV). Once you move the movie from your computer to a device, the movie will disappear from your computer's iTunes library. You can move the movie between devices as many times as you wish during the rental period, but the movie can only exist on one device at a time.
    If you download a rented movie on your iPhone 4 or later, iPad, iPod touch (4th generation or later), or Apple TV: It is not transferable to any other device or computer.

  • IPhone 4s blank screen but its on and keeps vibrating every 6 secs while connected to the charge. Please help

    I was pranking my friend that doesn't like other people taking pictures of him.
    He thought I was really taking a photo so he slapped the iphone out of my
    hand and it fell on  and turned off. I ran home I tried turning it on but nothing worked
    so I opened the cause I thought it was the screen because I just put on a new screen
    3 weeks ago. So I opened all the screws and took everything out then put everything back
    in and closed the screws. I put the phone on charge and it was nothing but blank except
    it kept vibrating. I restored it to factory settings. but that didnt work. I tried holding down
    the Lock/Home button but nothing worked. I am phone-less. please I need a solution fast
    - iPhone 4s

    Well, since you decided to take the phone apart, and you have already tried the normal troubleshooting measures we would suggest (like resetting the device), you are pretty much up a creek. There is no telling what may or may not be wrong with the device, since it has been taken apart.
    Sorry, there is nothing we can do here to help you....
    GB

Maybe you are looking for

  • Gaming (Bootcamp) iGPU temp

    Hey guys, I just installed Win8 on bootcamp for the first time to try some games what I cannot play under Mavericks. So I downloaded AIDA64 app for monitoring temperatures to test how it goes with playing. There is one item I don't recognize from iSt

  • Viewing Targa video files

    Hi everyone, The other week we were going through our old files here in our office & discovered a large number of video files that were done with the old Truevision Targa board. We no longer have the computer or the Targa board and Pinnacle was of no

  • Clearing & Populating a Hierarchical Tree

    Hi Forms 10.1.0.2. I have a canvas with two blocks on it, one being a multirow base table block (BLOCK1) for arguments sake) and the next being a tree block (TREE_BLK). The tree is populated using query text and not a record group. On a WHEN-NEW_RECO

  • Another Deploy problems

    when i deploy the sample of convetor,occur such errors: there was a deployment error java.rmi.ServerException:RemoteException occurred in server thread;nested exception is: java.rmi.RemoteException : An error was encountered while loading a web compo

  • Distributed clustered environment

    Hi , Distributed clustered environment: I am going to configure Clustered environment of BO 3.1 , I have some doubt hence I have less experience in clustering. Configuration details : 1) 2 CMS on 2 diffrent unix box 2) Report servers will be installe