I don't even know if this is possible much less what to call it

I have no idea what to search for to see if this has already been answered because I don't know what this is called. Sorry!
I have a picture of a dog. If either the word "dog" or "dogs" or "puppy" or "puppies" etc is chosen, I want to display the same image of the dog which is an instantiated object of custom class Dict.
var dog:Dict = new Dict();
So I create my array:
SpellingGlobals.dictArray = ["dog", "dogs", "puppy", "puppies"];
If one of those words is chosen, it is the "key" to the object that has been instantiated.
dict["dog"] = dog;
dict["dogs"] = dog;
dict["puppy"] = dog;
dict["puppies"] = dog;
So
dictArray[2] = "puppy" and dict["puppy"] = dog, so dictArray[dict["puppy"]] = dog.
This all checks out. The problem comes when I want to actually add the object dog to the display list (basically, I want to display an image of a dog if "puppy" is chosen).
I tried instantiating another Dict object
var displayObj:Dict = new Dict();
and then assigning it to the list an displaying it.
displayObj = dict[dictArray[i]];
bmc.addChild(displayObj);
but it doesn't do anything. It doesn't throw an error, it just doesn't work. And trace ("dict[dictArray[i]]") gives me [object Dict] not the specific object.
Does that make sense?
Is what I'm trying to do even possible?

Yes! The class is Dict. dog is an extension of Dict. So is cat and flower and tree...etc. Each one is linked through actionscript to the Dict class into it's own custom class (dog, flower, cat, tree, etc).
The Dict class could not possibly be any simpler. It's just this:
package com.freerangeeggheads.spellwhiz {
    import flash.display.MovieClip;
    public class Dict extends MovieClip {
        public function Dict(): void {
Dog is declared like this:
var dog:Dict = new Dict();
And this:
bmc.addChild(dog);
Doesn't work.
It's linked properly, I checked the little box next to the link in the properties menu.
Dog is just a movie clip with a picture inside it.

Similar Messages

Maybe you are looking for

  • Issue in packing Weblogic portal domain

    Hi Guys, I am trying to pack my domain from HOST A using command : pack -managed=true -domain=C:\Oracle\Middleware\user_projects\domains\Edlink -template=C:\Oracle\edlink.jar -log=c:\oracle\edlink.log -template_name="template_name" and wants to unpac

  • Problem with People/Person in Photoshop Organizer 11

    I had this tag yesterday - now the places, events, other categories show, but the People one now has a little house tag - not the colored tag that the others do, and my persons are gone (they are still with the pictures, but I can't add or change the

  • Non-ASCII Characters Appear In Path Name

    I've had this happen before over SSH via PuTTY on a Windows Host but now it's happening just in Linux. I'm testing out my first attempt at remastering the Arch Live CD and my home directory never got created while running rc.local, when I tried to ex

  • How do I get back the McAffe secure search box?

    When the format changed to the new format, the secure search box was gone. I went back to the traditional format and it was there again. Now it is once more not on my screen.

  • N97 and Realplayer probelms + Maps loader

    Hi Guys, I have done a very unproductive google search and come up none the wiser so hoping someone here can shed some light. I transfer video's to my N97 in mass media mode - I originally put them in sounds folder (copied all my itunes library there