Any way to for a class instance to ask what its instance name is?

Hey. I have a class which needs to create a movie clip on the
stage. Since each instance of the class will only ever have 1 movie
clip on the stage at a time, it seems reasonable that I have the
instance create a movie clip with its own name, prefixed with "mc_"
or something of the sort.
Here's where I don't know quite what to do... How do I get at
this information? For instance, when you a dealing with an XMLNode,
you can simply use...
the_answer = xmlNodeInstance.nodeName;
...I know the analogy fails, but hopefully you know what I'm
looking for.
Thanks!

hu....
and when you create your movie clip, (assuming you don't just
build it at authoring time) you specify an instance id through the
createEmptyMovieClip function....
taking a cue from this, I'm guessing that my answer is to
change the structure of what I'm doing a little... instantiate my
object with an instance name as a parameter given to the Class
Constructor... that way the class can have it's own name on file.
I guess my only concern there is how do I keep the "name"
variable from being just completely arbitrary...?
I guess I'm getting away from application (becaust I don't
know when I'd do this...) and into theory.... but for instance,
let's say I create my class like this:
var instanceReference:mySuperCoolClass = new
mySuperCoolClass("instanceName");
So. I have my class instance... ideally, the class would
exist on the stage as "instanceName", with "instanceReference"
being another way to reference the instance. That would be ideal...
but how do I make that happen? Because in the scenario of what I've
just done, I see the class instance existing on the stage as
"instanceReference", and I've just passed it a fun, but meaningless
bit of data called "instanceName"...
I suppose I could have the class go back to "_parent" and
create it's own object.... but here again I'm getting into
territory that feels a lot like i have no idea what I'm doing...
haha!
I guess I have enough info to get back to coding for now...
But I'm deffinately open to more tips... I feel like I'm still
missing how a lot of this works.
(I'm at that awkward place where I can easily explain what
OOP is, but I'm far from experienced in how to implement it... I've
only written about half a dozen classes so far... so I still have a
lot to learn. Thanks for your patience, all of you!)

Similar Messages

  • I've received an email of an unauthorised access which states it was done in Canada, is there any way I can request Apple to inform me what the IP address that made unauthorised access was?

    I've received an email of an unauthorised access which states it was done in Canada, is there any way I can request Apple to inform me what the IP address that made unauthorised access was?
    I want to know as it possibly relates to other security issues I've had of late and it would help further my investigation. Would a subject access request possibly allow me to recieve this information? As far as I know there's no way to see a list of when and where I sign in using my Apple ID?

    Sorry but no, Apple cannot give you that information. The only way they could give anyone such an IP address would be if they received a court order to do so, if even then; I don't know what sort of tracking and logs they do.
    However, if this email claimed that someone had tried to reset your password and in any way gave you a link to click to confirm your account information, the email was almost certainly a phish. Such phishing messages have been quite common over the last two or three weeks and should be deleted without responding. You may wish to manually type in the URL for Apple's page for managing an Apple ID and change your password, just as a precaution, and make sure you've set good security questions using responses that can't just be looked up for you (they don't have to be real information; you can use any response you wish as long as you can remember what you entered).
    Regards.

  • So I am trying to copy my hard drive "Macintosh HD" to an external hard drive, i want to use Terminal and have tried many ways. For example cp -r /Volumes/"Macintosh HD" /Volumes/"NO NAME". When i do it says No such file or directory. Ideas?

    So I am trying to copy my hard drive "Macintosh HD" to an external hard drive, i want to use Terminal and have tried many ways. For example cp -r /Volumes/"Macintosh HD" /Volumes/"NO NAME". When i do it says No such file or directory. Ideas?

    The reason that threadjacking is frowned on (as mentioned in the terms use which you can read by clicking the link to the right on this page) is for the most part a practical one:
    By starting your own thread your problem can get individual attention, focussed on your particular set of circumstances.
    By joining somebody else's thread it becomes tricky to answer more than one question at the same time, and can lead to confusion for both parties.
    So if you don't mind the minor inconvenience, please start your own thread (in the correct forum) so we can get to grips with your particular problem!

  • Is there any way to access the thumbails-db, where finder stores its icons that are assigned to files?

    Is there any way to access the thumbails-db, where finder stores its icons that are assigned to files?
    Thats a SQLite-DB? Is it possible to access and export them? I´d like to use that Db to assign thumbs to files on my NAS.
    Thx!    

    Are the thumbnails & icons stored in the .DS_Store-File?
    When visible, how can I access the content stored in that file?

  • Please i nedd help my account do not let me put any credit card and said that I have some problem with a past charge bur wonr let me pay any way, so i cant down load anything please what can i do

    Please i nedd help my account do not let me put any credit card and said that I have some problem with a past charge bur wonr let me pay any way, so i cant down load anything please what can i do

    go to this page and cotact iTunes store and they can help you out with this
    https://expresslane.apple.com/Issues.action

  • For FF 3.6 on XP, what is the name of the Bookmarks file, i.e., what file is being displayed as the result of clicking 'Organize Bookmarks...' ?

    That was the whole question with all the details. (Here it is again: For FF 3.6 on XP, what is the name of the Bookmarks file, i.e., what file is being displayed as the result of clicking 'Organize Bookmarks...' ?)

    Firefox 3 stores the bookmarks and the browser history in [http://kb.mozillazine.org/places.sqlite places.sqlite] .
    See http://kb.mozillazine.org/Backing_up_and_restoring_bookmarks_-_Firefox

  • Is there is any way that multiple SSL identities out of a single DS instanc

    Hi All,
    I am facing bit challenging question:
    Is there is any way that multiple SSL identities out of a single DS6.2 instance, and DS6.2 instances cant be convinced to replicate over SSL successfully using only a single shared SSL identity across many instances.
    I am trying to find out that is there is a way to use multiple SSL identities out of one instance of DS6.2 ; and configure accordingly, with client facing service using a shared common identity and replication using distinct identities.
    Thanks
    Pramod

    You can look at the code that that page (website) uses and create an overriding rule to set the cursor in [http://kb.mozillazine.org/userContent.css userContent.css] or [https://addons.mozilla.org/firefox/addon/2108 Stylish]
    See http://kb.mozillazine.org/Editing_configuration#How_to_edit_configuration_files
    Can you post a link?

  • HT5361 Just now accidentally deleted email account. No warning appears and was deleted. Mail was not back up ed. Does exist any way how for Undo of this delete operation (need to recover mails and contacts there)

    I just accidnetally deleted email account and there wa sno warining so it went through and I lost all my emails. The email was not Back up. Is there any way how this account could be recovered?

    If the account was an IMAP account your emails should re-appear if you recreate the email account. If the account was POP you hopefully have backup (TIme Machine?) you can restore the emails from.

  • Any way to import a copy of a photo with the same name without renaming?

    I organize all my photos in my picture folder on my desktop, and I sometimes copy and paste the same photo into different folders so that I can use them for different purposes without having to hunt them down. I've never had to rename them as long as I've put them into a new folder, but when I imported my picture files into Lightroom 3, it only took the first copy of any picture and left out the other copies in subsequent folders. Is there any way to fool Lightroom into importing them without having to go back and rename all of them?
    Thanks so much for any help!

    Thanks for the tip . . . I found the checkbox and it worked just fine!
    The reason I store multiple copies of the same photo is because I edit photos for my daughter's online business. I always keep an original folder that does not get touched, then make copies of the photos I am going to edit for her in a seperate folder so that I know exactly which ones I'm working with (I don't edit ALL the photos). Once I make my edits, I store the edits in her business file (since she does not need any of the others) and delete the copies; therefore leaving my originals untouched. I was trying to pull some "edits in progress" into LR to throw a preset on them, and it wouldn't allow me to because it had already downloaded the original in a previous folder. Maybe not the best way to organize photos, but it seems to have worked so far. Especially with the volume of photos I deal with for my daughter's business as well as my personal stuff. Another reason I make copies of the same photo is when I'm downloading photos to Facebook. They are not always contained in the same folder, so I make a copy of the photos I want for FB then just edit and download that folder. When I'm done, I delete it after moving the edits. But there may come a time I'll want to pull that folder into LR just to work on those selected photos. Hence the need for duplicates.
    I just got LR3 yesterday, and my instructional book should arrive today. I plan on reading it and hopefully it will provide a better way to organize my folders if you say this is not a good idea. I have no idea what "virtual" folders are, but definitely plan on looking in to it. Thanks so much for your advice!

  • Question: is there any way to get entity class in JPQL query

    Hello, I'm using J*dev 11gR1 adn JPA with EclipceLink*.
    Let's consider such example
    @Entity
    @Table(name="ANIMALS")
    @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
    public class Animal implements Serializable {
    @Entity
    @Table(name = "CATS")
    public class Cat extends Animal implements Serializable{
    @Entity
    @Table(name = "DOGS")
    public class Dog extends Animal implements Serializable{
    }I need to build a query which will be translated to something like this SQL query:
    SELECT * FROM CATS
    UNION ALL
    SELECT * FROM DOGS
    ORDER BY ...So I need a way to query not all child entities from DB.
    P.S. Yes, I know, that I can execute query on panent entity (select a from Animal a order by ...) and then loop throught the result list and delete not needed objects OR I can execute some queries on needed child entities and then merge them into one list and sort it, BUT both ways it will be much slower than generetion of needed SQL query straight to DB.
    I know, that in Hibernate's HQL there is a way to build such query with something like this:
    select * from Animal a where a.class = Cat or a.class = Dog

    In JPA 2.0 which we are implementing right now you will be able to execute queries like:
    SELECT a FROM Animal a  WHERE TYPE(a) IN (Cat, Dog)The next draft of the specification contains a section which describes the feature in detail and provides more examples of its use:
    4.6.17.4 Entity Type Expressions
    An entity type expression can be used to restrict query polymorphism. The TYPE operator returns the
    exact type of the argument.I have also been working with some customers on similar capabilities using the current versions of EclipseLink. The examples are documented here:
    http://wiki.eclipse.org/EclipseLink/Development/JPA/QueryDownCast
    I hope this helps,
    Doug

  • Any way to turn a Class into a type?

    I have a BaseObject, which is not type parameterized, and a Reference class, which is parameterized. The Reference class is parameterized so that you can do this:
    // look, ma, no cast:
    final Building /* a BaseObject */ building = buildingReference.deref();
    // again, no cast:
    final Person person = personReference.deref();At runtime--and there I suspect is the problem--I may have a Person class that extends BaseObject.
    BaseObject contains a method that creates a Reference. This means of course that I have to supply a type parameter to the Reference. But at compile time of course I don't have the type information I might need.
    That is, if at runtime I'm creating a Person (which extends BaseObject), then I want the BaseObject code that creates the Reference to supply it with <Person>.
    I have to assume that this is impossible, but I've learned enough to ask where generics are concerned. :-)
    What that means is that I'm going to have some mighty weird object declarations, because now I want to parameterize BaseObject and its subclasses, so that the type information can "get through" to the Reference classes created by BaseObject:
    final Person<Person> p = new Person<Person>(); // oy
    final Building<Building> b = new Building<Building>(); // double oy
    // none of that would be *so* bad except you can still do this:
    final Building<Person> wtf = new Building<Person>(); // triple oyI'm going to guess that generics here is overkill.
    Thoughts? Advice?
    L

    Could you instead move the reference factory method elsewhere as a generic method, like this Reference#create(...) ?
    class Reference<T> {
         T target;
         Reference(T target) {
              this.target = target;
         T deref() {
              return this.target;
         static <U> Reference<U> create(U u) {
              return new Reference<U>(u);
    class BaseObject {}
    class Person extends BaseObject {}
    class Building extends BaseObject {}
    public class X {
         void foo(Building b, Person p) {
              Reference<Building> bRef = Reference.create(b);
              Reference<Person> pRef = Reference.create(p);
              final Building building = bRef.deref();
              final Person person = pRef.deref();
    }

  • OT: I'm in LA next month for Logic Class, first CA trip, what to do...?

    Fellow Logic Users, esp those in LA,
    I'm taking the advanced class offered by David Nahmani w/ Logic Pro Help on May 11th-13th, but I'll be in LA from the 10th -17th. I'm really trying to make the most out of my trip, especially since I've never been to California before, and won't likely be back for a long while.
    I would love to sit in on a session sometime during my trip, or tour some nice studios in the LA area. I'm a young engineer (25) with a nice little project studio outside of Dallas trying to gain as much knowledge and experience as possible. I'll be staying with a friend who attends grad school at USC, so I should have some sort of transportation. I'm not sure of the best way to spend my limited time, but I figured someone out there (LA engineer, producer, studio owner), might be able to help me out. I really appreciate it guys, I'm looking forward to my trip and would love to meet some fellow engineers/ Logic users in LA.
    -Ryan Miller

    Try the la zoo (blah) then the griffith park observatory (I have not visited since the reopening, but it was awesome before.)
    http://www.griffithobs.org/vshuttle.html
    Now get some awesome thai for dinner at sanamluang.
    http://noodlewhore.blogspot.com/2006/08/hungry-zombies-of-thai-town-sanamluang.h tml
    You have to go to the beach. Point mugu is my favorite, but you can settle for leo carillo.
    http://www.parks.ca.gov/?page_id=630
    http://www.parks.ca.gov/?page_id=616
    "Point Mugu State Park, located in the Santa Monica Mountains, features five miles of ocean shoreline, with rocky bluffs, sandy beaches, sand dunes, rugged hills and uplands, two major river canyons and wide grassy valleys dotted with sycamores, oaks and a few native walnuts. There are more than 70 miles of hiking trails. The beach also features swimming, body surfing and surf fishing. The park includes the jagged pinnacles of the Boney Mountains State Wilderness Area."
    "Welcome to Griffith Observatory, a beloved icon of Los Angeles and world leader in public astronomy. Since 1935, the Observatory has given tens of millions of visitors the opportunity to become observers. Griffith Observatory offers exciting shows in the Samuel Oschin Planetarium, public telescopes, and observing and astronomy exhibits."

  • Is there any way to get back a note you had if its been deleted?

    I have been keeping a journal of my little boy's everyday changes since the day he was born under the notes app. Recently I was typing and hit the trash button. It is gone. Is there any possible way to get it back? 20 months of memories :-(

    If it is backed up, yes,
    If not, no.
    Allan

  • IS there any way to copy all your old buddies from and old screen name

    to a new screen name?
    thanks!
    using ichat on leopard

    In case you're want to use an old AIM screen name you've not been using for a while I think it is better to just refresh your complete buddy list by sending your contacts an email with your new screen name and have them update this in their data base.
    Ask them to respond with their recent contact info and add their active screen name to your buddy list. Every now and then this can be very useful cause contact info tends to change when people move, get a new job or switch to another computer.
    Free Aim screen names that have been inactive for a certain period will become invalid, understandable because their database needs to be up to date as well.

  • HT204266 I purchased a navigational app yesterday and it is not what I was wanting.  Is there any way to get a refund from a purchase if its been less that 24 hours.  This app was $50.00!!!

    I purchased a naviational app yesterday and it is not what I was wanting.  Is there a way to get
    a refund if it's less that 24 hours ago?  The app was $50.00

    Purchases are considered final, but you can try the 'report a problem' page to contact iTunes Support and see if they will credit or refund you : http://reportaproblem.apple.com
    If the 'report a problem' link doesn't work then you can try contacting iTunes support via this page : http://www.apple.com/support/itunes/contact/- click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

Maybe you are looking for

  • Calendar popup in a PDF form

    How do you create a popup calendar in a fillable PDF form? I am running Acrobat on a Mac Air with the current OS.

  • Sending a text between JTextField controls of two JFrames

    Hi I have two classes that extends JFrame class , the first class (NewJFrame) contains JButton and a JTextField as well as the second class (NewJFrame1) contains The problem is I want to enter a text on the JTextField control of the first jframe that

  • HT201272 An error keeps popping up whenever I try to download

    An error keeps popping up whenever I try to download some of my music in my iCloud and also when I attempt to download old Purchases of Albums and TV Shows. What should I do?

  • Song won't play in iTunes

    I downloaded an album, and iTunes won't play one of the songs, saying my computer isn't authorized to play this song. It asks for my apple ID and password, but still won't play it after entering the info. Any ideas how to get the song to play?

  • Email signatures adding links

    If I want to make my web url line of my signature link to my web site I can do so by manually Control -clicking the line in my signature and use the link command. Is there a way to have this be the default for every signature so I no longer have to d