Can you create a "constructor" for movie clips?

What I'm doing:
var this_array[counter] = new monster; //monster is a movie clip
init_monster(); //set's things like .name, .x, .y, etc.
What I want to do:
var this_array[counter] = new monster();
When I add a "monster"  I then call a function to "initialize" all of it's stats.
Is there a way in the creation of the object, like with a constructor, where it automatilly does it on 1 line?
I'm teaching myself and am a little stuck on this part.  If I have to create a "monster class" to do what I want just say so.
Any simple examples or links to simple examples would be great. Thanks in advance.

Ok so I've made a class Monster, and I have my movie object Red_Monster
How would I go about creating the variable so it knows it's both?
The only thing I can think of is linking them together as a .variable of the other.
Example:
var this_monster[x] = new Red_Monster();
this_monster[x].stats = new Monster();
It just seems a bit slopy, it would be nice to have this_monster know it's both.  Is there a way to do that?
(added)
I've gotten Monster to extend MovieClip, and this is working to use it as a movieclip.
Currently trying to change the image of the movie clip in code to Red_Monster. Is there a way to do that?
(added)
Found how to do it, sort of.  Change the class linkage name to Monster instead of Red_Monster.  I just have to make classes for each movie clip.
(last add, answer for anyone else)
Ok the answer is to create a Monster class that extends MovieClip.  Then for each color_Monster they all extend Monster, no other code needed inside each class other then the constructor.

Similar Messages

  • How can you create a plugin for jdev?

    Any pointers to detailed instructions appreciated... I searched OTN and couldnt find anything
    Thanks!

    If you use the 11g preview release, there is also functionality built into the product by default that will help you to build extensions (although I still recommend downloading the ESDK, since it contains the javadoc and a large number of samples).
    In 11g, you can access the new functionality using File->New->Projects->Extension Project.
    Thanks,
    Brian

  • How can you create a way for someone to download a song on your webpage?

    is there a way to make a button that offers viewers of your webpage to download the media playing?

    Add a button to your page.
    Select it.
    Open the Inspector and choose the 2nd icon from the right.
    Choose "make link to file" and choose a file.
    If the file is already on the server, choose "make link to external page".
    When using QT and the visitor has QT Pro he can download it straight away.
    It's recommened to zip the file. Then it automatically downloads instead of starting to play in the browser.
    Peek at other websites to see how they do it.

  • Can you create a CURSOR FOR loop within a FUNCTION?

    The title says it all...

    No prob...I just wondered if anybody had done it recently or at all and had a quick answer.
    No prob.

  • Can you create an index on a Map?

    I have a few questions that I can't seem to figure out nor find a viable example for. Can you create an index for a Map contained within a nested object, and if so, how would you do this? I currently have a Filter the inspects this criteria in the cache but am unable to figure out to create a usabe index for the custom filter. I'm using Coherence 3.5.2 - any help would be most appreciated. I'm not sure if/what I need to do with the SimpleMapIndex....
    Here's the basic object map below. My filter is retrieving all of the CustomerGroup objects that have a Customer in it's collection that contains the passed in Integer value in the Customer's Map. So can you create an Index on a Map (and a nested one at that) and how do you that? The index would need to be on the nested customerValues hashmap.
    class CustomerGroup
        Set<Customer> customers ;
    class Customer
        Map<Integer, CustumerValue> customerValues;
    }

    If you write a custom ValueExtractor, which you need to create an index, then you will not need a custom Filter.
    Depending on how efficient you need to be you custom extractor can use POF and not have to deserialize the entries to create the index, or it can deserialize the class, which will make the code more straight forward.
    For example, without using POF
    public class MapKeyExtractor extends EntryExtractor implements PortableObject {
        public MapKeyExtractor() {
        @Override
        public Object extractFromEntry(Map.Entry entry) {
            Set<Integer> keys = new HashSet<Integer>();
            CustomerGroup group = (CustomerGroup) entry.getValue();
            Set<Customer> customers = group.getCustomers();
            for (Customer customer : customers) {
                keys.addAll(customer.getCustomerValues().keySet());
            return keys;
        @Override
        public boolean equals(Object obj) {
            return (obj instanceof MapKeyExtractor);
        @Override
        public int hashCode() {
            return MapKeyExtractor.class.hashCode();
        @Override
        public void readExternal(PofReader in) throws IOException {
            super.readExternal(in);
        @Override
        public void writeExternal(PofWriter out) throws IOException {
            super.writeExternal(out);
    }The extractor above will return a collection of all of the Integer values in the keys of all the customerValues of all the customers in a CustomerGroup (I have guessed you might have accessor methods on the classes you posted).
    You can then use a ContainsFilter for your query. For example to get all the values from the cache where the customerValues map contains a 19 in the key...
    Set results = cache.entrySet(new ContainsFilter(new MapKeyExtractor(), 19));You could write a version of the MapKeyExtractor that uses POF and would not deserialize the values but this would be more complicated code as it would need to extract the Map from the POF stream of the value and walk down the keys and values extracting the keys. It is doable but not worth it unless you are really worried about performance of index updates.
    Discalimer I have written the code above from the top of my head so have not compiled it or tested it but it should be OK.
    JK

  • Can i create different file for my movies

    I need to create diferent file for movies, but i don't know how to do it

    i want to creat like a play list but for movies, can i do that

  • Can you create an image map hotspot for an external URL in Dreamweaver CS6?

    Can you create an image map hotspot for an external URL in Dreamweaver CS6?

    Duplicate post: http://forums.adobe.com/thread/1338701?tstart=0

  • I have sent a message to a friend. Afterwards, I created a new message. And the message I have sent a while ago appears even if I haven't type anything. Can you find a solution for my problem please? :(

    I have sent a message to a friend. Afterwards, I created a new message again. And the message I have sent a while ago appears again even if I haven't type anything. Can you find a solution for my problem please?

    You're welcome! Glad you got things sorted out.

  • Can you tell the transaction for creating the client.

    can you tell the transaction for creating the client.

    Hi,
    Please check this links.
    http://help.sap.com/saphelp_nw04/helpdata/en/69/c24c4e4ba111d189750000e8322d00/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/69/c24c0f4ba111d189750000e8322d00/frameset.htm
    http://www.sap-img.com/bc049.htm
    Cheers,
    Simha.
    Reward all the helpful answers..

  • Can I create folders (albums) for my photos and move them?

    Can I create folders (albums), for my photos and then relocate said photos to specific folders?

    These links may be helpful.
    How To Create Photo Albums http://tinyurl.com/cxm4eoq
    How to Add New Albums in the Photos App on the iPad & Add Photos to the Album
    http://tinyurl.com/7qep7fs
     Cheers, Tom

  • If you create an App for Itunes can it then be downloaded to Nano

    How could you create an App for Nano

    Apps are not yet supported by the iOS for Nano6G.
    If you want apps on your Nano, tell Apple here: Apple - iPod nano - Feedback

  • HT1657 Can you rent more than one movie at the same time?

    Can you rent more than one movie at the same time on itunes?

    I think Justin is correct and you should have statistics in place and a reasonable partition scheme so that the optimizer selects the correct partitions rather than telling it what to do. You paid a lot for partitioning after all.
    There are some, possibly misguided, examples in the manuals showing how to create a view so you can delete from a single partition without specifying the partition criteria in the delete statement. This in effect turns partitioning back into DIY partitioning i.e. separate tables, union all and pretend its a single logical table using a view. But backwards.
    So to do what you want you just assume the partitions are separate tables, and then use union all to glue the ones you want back together.
    select * from sales partition (sales_q1_2000)
    union all
    select * from sales partition (sales_q1_2001)
    union all
    select * from sales partition (sales_q1_2003)
    union all
    select * from sales partition (sales_q1_2004);It probably goes without saying that as well as making the expensive version of partitioning behave like the free alternative, there is the possibility that it will perform like it as well.

  • I have numerous music movie clips that I have not purchased through iTunes, can I stream these "home" movies to apple TV? And if this is not possible, is there another complete program available that I can purchase to have my music movie clips stream to a

    I have numerous music movie clips that I have not purchased through iTunes, Is it possible to stream these "home" movies using iTunes to apple TV?
    And if iTunes will not allow it, is there another complete program available that I can purchase to have my music movie clips stream to a TV and/or another computer?
    Any help would be appreciated. Thanks

    Thanks, Winston C, I've actually tried everything you suggested. I'm thinking now that the Home Sharing problem likely is related to Bonjour--I've seen several people mention this with similar (but not identical) problems. The solution that seems to work for some people is to uninstall and reinstall Bonjour. Frankly, I don't want to go through the trouble given that the iOS 7 release is imminent.
    One thing that I haven't tried is resetting the ATV to factory settings. I'll give that whirl.
    Thanks for your advice!

  • Formats for movie clip used in PSE 4 slide show

    Still finding it difficult to find documentation of what formats are supported for using digital camera movie clips in PSE 4 slide show.
    The movie file from my Canon camera is 640 x 480, 30 fps Motion JPEG and has a .AVI extension. I am able to use it "as is" in a PSE 4 slide show. However, sometimes I need to trim the movie clip in Windows Movie Maker 2 in order to keep only the best part.
    My question is what parameters can I specify to save my movie clip in Movie Maker 2 so that I can use it as a movie clip in a Photoshop Elements 4 slide show that will be saved as a WMV file?
    Barb O

    Karin Sue,
    >Also, are the projects saved in a folder somewhere, or only as part of the Catalog?"
    The definition of the "project", which is the "Creation" in Organizer terms is saved only in the Catalog.
    >If you publish your creation as a pdf or wmv they are saved in the folder you designate. Once published, I don't believe there is any way to edit. If you save the creation, you can go back and edit and republish if you like.
    Yes, the WMV or PDF file is saved in the folder that you designate. You are correct that if you save the Creation, you can go back and re-edit. When you Save the Creation gets a thumbnail within the Organizer photo well and you can click on the thumbnail to go back in to the Creation process make modifications and save a new WMV or PDF file.
    Note: that the Save window documents that the PDF choice does not support some options such as Pan and zoom, videos, and certain transitiions.
    Barb O

  • Create Immediate TO for movement type 344

    Hi Gurus ,
    I wanna create immediate TO for movement type 344, so i did the following configs:
    1:Go to OMLR, set field "Immed.TO " as "A" for my warehouse and movement type 344.
    Then , i called up MB1B 344, but no TO was created immediatelly.
    i checked the additional data in LU03, the movement type is 344, and immed.TO is ticked.  it seems all setting is ok, why the TO can't be created immediatelly?
    thank you in advance.
    BR,
    Dragsky

    First check which ref. movement type assigned to 344 movement type in W/H under below path
    SPRO> LE>WM>Interfaces>IM>Define movement types
    In this go to first option and check the last movement type assigned to mvt type 344 i.e. "Reference movement type for posting change in whse mgmt" (in combination with other indicator like stock category, special stock indicator etc....)
    Then got to OMLR and check whether this ref. movement type defined for your W/H,
    if yes, maintain setting for auto TO  in that specific entry (in combination with other indicator like stock category, special stock indicator etc....)
    If no, then check movement type for *** W/H and maintain specific entry (in combination with other indicator like stock category, special stock indicator etc....)
    Hope it helps.
    Regards
    Anand Misra

Maybe you are looking for