You can't put a common MC inside 5 MCs in AS3?

Simple question: In AS3 you can't do sharing of a MC between more MCs, right? In AS2, you can. How can I work around this?
Let me be specific: in ActionScript *TWO* I do something like this:
       movie.attachMovie(LargeImage, "image", 20);
LargeImage = movie clip of 400 x 480.
Now... the thing is: I do this for 20 MovieClips but they all REUSE the same original MC apparently (with no memory increase, of course). If I animate the MC, it will animate within all 20 MovieClips. I'm using a mask to show only portions of the MC, but I think that's not important.
But in ActionScript 3 this wouldn't work, right?
Because in AS3 every time we .addChild, the child is REMOVED from the parent, so the same MovieClip / Sprite couldn't be in 2 places at once.
How would you work around this without creating a separate instance of the "LargeImage" MovieClip for each object? Note that I don't want to use BitmapData & CopyPixels: the object may be animated.

AS2 does not use the same movie when you use the attachMovie method.  It creates a new instance of whatever movie is being attached from the library.
This works very similarly to what you do in AS3 when you declare a new instance of an object using its class name.  A new instance is created and then you use the addChild method to make it a child of whatever object you intend to...
var newInstance:ClassName = new ClassName();
movie1.addChild(newInstance);
you could also just use...
movie1.addChild(new ClassName());
movie2.addChild(new ClassName());
if you want to keep it to one line, though you lose the variable for targeting the object.  Still, since the object was the last added, you could target it using...
movie1.getChildAt(movie1.numChildren-1)

Similar Messages

  • How come you can't put a Tab in a Cluster?

    Hello,
    How come you can't put a Tab Control in a Cluster?
    It looks like users have been asking this question
    for years, and all the way back to LV versions 6.1.
    Someday, please, pretty please, NI.
    Please. Maybe by version 9.5 of LV?
    Kevin.

    Ben wrote:  This idea just weirds me out!
    Kevin:  Sorry Ben, but think how I must feel.
    Ben wrote:  I understand the cosmetic and GUI interaction part of it OK.  Its the "how would it code?" part that send my head spinning.
    Kevin:  We don't need to worry about that.  We'll let the NI LABview guiruis worry about that.  They know how to program for TABs and they know how to program for Clustors.  Now they just need to put them together.
    Ben wrote:  Would the tab control be available via bundle by name and unbundle?
    Kevin:  Yes.  It would simply return the value indicating which page is selected.
    Ben wrote:  If the cluster was an indicator and the tab value was "page1" would the user be able to select page2?
    Kevin:  Of course, the block diagram would simply pass the enum indicating which page to display.
    Ben wrote:  On the block diagram, would there be a relationship between the tab and the elements on each tab?
    Kevin:  None.  Or no more so than the relationship of any element on a panel or front panel.
    Ben wrote:  On the FP the tab control has a "pages" property and from those we can get an array of refs to the controls on the pages. Would we still be able to that within a cluster.
    Kevin:  Yes.  No Differrence.
    Ben wrote:  Aside from the above Q's I would guess that the tab in a cluster would only allow greater abuse of clusters i.e. "Super Clusters".
    Kevin:  It is not my intent to abuse any Super Cluster in any way shape or from.  In contrast, would help to spread out some clutter from ones front pannels and move the clutter into tabs within a cluster.  The beauty of it would be that it would come automatic, and handled by labview.
    Ben wrote:  There was also until recently, limitations on the size of the type descriptors. Very complex FP's and large clusters would be hit by the problem that the type descriptor need more than the 16 bit allocated.
    Kevin:  I would never suggest even coming close to putting more that 65535 items in a cluser in any fashion.
    Ben wrote:  I do not pretend to know why NI did or did not allow this. In the end I can only share my guess and hope somone who does know will post.
    Kevin:  Yes, somebody from NI might know something about why we can't put a Tab in a Cluster.
    Ben wrote:
    Related story:
    I had often been mystified by "Why I could not create a waveform datatype block diagram constant?". While at NI Week and talking to Jeff Kodosky I asked him (thinking that I would get a good under-the-hood explanation of the data type used blah, blah, blah... He said "I'm not sure. It ws probably an over-sight."   I noticed that in LV 8, you can now create a waveform data type constant.
    Ben
    Kevin:
    Maybe it was an oversite.  Maybe we can have Tabs in Clusters in 64bit Lab View 9.
    Kevin's Disclaimer:  The variation in case usage, while referring to LabVIEW, should not be construed as disrespect, nor should it be interpreted as an indication of Kevin's LabVIEW programming skill or experience or knowlege.

  • In the restrictions you can not put the call to voicemail?

    with the next update, in the restrictions you can not put the call to voicemail?

    so I have to delete the message?

  • How can we put attributes in aliases inside XMLForest(Oracle10g 10.2.0.1.0)

    Hi,
    I need to generate alias with attributes inside XMLForest.
    I mean I have to have generate this specific xml strucuture ( I cannot change it, I have to respect it ):
    <root>
    <Invoice>
    <InvoiceHeader>
    <InvoiceNumber>XXXXXX</InvoiceNumber>
    <InvoiceHeader>
    <LineItem>
    <LineItemNumber>1</LineItemNumber>
    <ChargeAmount Name="Weight">100</ChargeAmount>
    </LineItem>
    </Invoice>
    <Invoice>
    <InvoiceHeader>
    <InvoiceNumber>ZZZZZZZZZ</InvoiceNumber>
    <InvoiceHeader>
    <LineItem>
    <LineItemNumber>2</LineItemNumber>
    <ChargeAmount Name="Weight">200</ChargeAmount>
    </LineItem>
    </Invoice>
    </root>
    That's the query you can take to test :
    WITH OBIN AS (
    SELECT 'XXXXXX' invoice, 1line ,100 charge FROM dual
    UNION
    SELECT 'ZZZZZZZZZ',2 linen ,200 charge FROM dual
    SELECT
    XMLElement("root",
    XMLAgg(
    XMLElement("Invoice",
    XMLForest(
         XMLForest(
         invoice "InvoiceNumber"                         
         ) "InvoiceHeader",
         XMLForest(
         line "LineItemNumber",
         charge "ChargeAmount Name=""Weight"""
         )"LineItem"
    xml FROM OBIN
    I have the error ORA-0300001 unimplemented feature.
    Someone has the solution to put attribute in xmlforest aliases please ?
    Thanks a lot for your help

    Well, as you were told in {thread:id=1774529}, you can't use XMLForest to add attributes. Only XMLElement can do that and an example was provided. If you have issues with that example not meeting your needs, please follow up the post in that thread.
    Documentation:
    XMLForest - http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions221.htm#SQLRF06169
    XMLElement - http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions220.htm#SQLRF06168
    Only the XMLElement has an Attributes clause in it.

  • How to install CS6 Photoshop with a new I Mac (where you can't put a CD)

    Hello,
    I have the new I Mac and I just realise there is nothing to put the Installation CD for my Photoshop CS6...
    How can I do to install in my computer (I've the Serie Number & Product Number too).
    Thanks a lot for your help.
    You can answer in english, spanish or french.
    Emilie

    You can download the trial and use your serial number to activate it to full use.  Here is a link for downloading it thru the Adobe site:
    http://helpx.adobe.com/x-productkb/policy-pricing/cs6-product-downloads.html
    You can also download the trial version of the software thru the page linked below and then use your current serial number to activate it.  This is a direct download and does not involve the download assistant.
    Be sure to follow the steps outlined in the Note: Very Important Instructions section on the download pages at this site or else the download will not work properly.
    CS6:
    http://prodesigntools.com/adobe-cs6-direct-download-links.html

  • Is it possible to send an automated message to answer when you can't put yours hand on your phone ?

    Read this now : I would like to have an answering machine for my Message app, meaning I'd love if Messages could just answer back to any incoming message when I'm just not able to message back (i.e. : I don't have my phone with me, I'm working and not able to use my phone, etc.).
    Maybe this is already possible ? Is it ?
    Thanks for your answers.
    I know there's a feature that allows you to send a message batck to a caller when you can't answer, but, 1) you have to do something and 2) it's not automated...
    my iphone is an iphone 6 plus with IOS 8.1 and 128G°

    Oops! I hit "Correct Answer" thinking that I could edit my last reply! That wasn't the correct answer, obviously!
    iTunes has replied to me and told me that I cannot download any artwork outside of the USA, so I guess that answers my question, even though it's not what I'd wished to hear. 

  • Can we put margin for text inside available Tile Templates ?

    Hi all ,
            We are developing a windows phone silverlight 8.1 application. Using WNS as push notification service. For tile notification using the template "TileWide310x150PeekImage02" for wide tile . Text attribute with id 2 is
    appearing a little bit left as compared to text with id 1 .We need all texts inside tile should be on the same vertical line . Here is the Tile images for both square and wide tile . Also is there any way to change the square tile text to small size?
    Please tell me how to resolve it
    Thank you

    Here is a complete list of the tile templates:
    https://msdn.microsoft.com/en-us/library/windows/apps/hh761491.aspx?f=255&MSPPError=-2147217396
    You could choose a different template to get larger text.  In your case you would use TextID 2,3,4,5 and eliminate Text ID 1 to get the text to align left correctly.  The TextID 1 is indented just a bit.
    Bret Bentzinger (MSFT) @awehellyeah

  • Is there a way you can simply drop singles from downloads into itunes without disrupting layout

    Is there a way you can simply drop singles from downloads into itunes without disrupting layout, so you can say put some recently downloaded singles off the net into your own various  folder without messing up the whole neatness of all the other album covers by adding fifty plus single covers...
    ie. I just dropped a Naughty boy La la la single into my perfect looking iTune library and it does this...
    Adds it as an album cover with no pic, and even if I add a pic, it isn't an album anyways!
    I realise I can probably create and rename every single downloaded single to exactly the same info etc, but this is sooooooooo long winded!
    Please help! everything else works perfect apart from this!

    Hi Connor2525,
    Welcome to the Support Communities!
    The article below may be able to help you with this issue.
    Click on the link to see more details and screenshots. 
    Apple - iTunes - Inside iTunes - Customizing Your Album Artwork In iTunes
    http://www.apple.com/itunes/inside-itunes/2010/08/customizing-your-album-artwork -in-itunes.html
    Cheers,
    Judy

  • Can i put a larger hard drive in my mac

    running out of space on my hard drive (300gb) and just wondered if you can easily put a larger drive in?

    Yes you can put a larger hard drive in your iMac. Here's a how to video:
    http://www.ifixit.com/Guide/iMac+Intel+20-Inch+EMC+2133+and+2210+Hard+Drive+Repl acement/1008/1
    I assume you have a back up?

  • Is it possible to read the description of videos that you can see in iTunes on your iPod Touch 4th Gen or 5th Gen?

    I was wondering if it's at all possible to read the description of videos that you have on your iPod Touch 4th or 5th Generation. It's available on iTunes, but I was wondering if there was a way to see it on your actual device.
    Any answer would be a great help! Thanks

    You can omit the title altogether in the URL (together with the succeeding slash, of course). For example, my own podcast URL in the Store is
    https://itunes.apple.com/gb/podcast/the-sound-of-78s/id166389425?mt=2
    but this works perfectly well:
    https://itunes.apple.com/podcast/id166389425
    Indeed you can even put your own title:
    https://itunes.apple.com/podcast/any_old_title/id166389425
    So it's as simple as that!

  • Can't put cds on iphone

    What is says above

    I have found that if you lie the iPhone on a flat surface, like a table, and carefully balance the disc, you can indeed put a CD on the iPhone. Note, this is not an edge on configuration. YMMV.

  • Can I put OS X Yosemite on my 2010 macbook pro with current operating system 10.6.8?

    Can I put OS X Yosemite on my 2010 macbook pro with current operating system OS X10.6.8?  I just bought a new printer and it requires minimum 10.7

    You cannot get Mavericks because it has been replaced by Yosemite. Your machine will work just fine with Yosemite, but you don't have to upgrade if you prefer not to.
    You should always maintain a backup. Hard drives fail, data are lost. A backup is a security blanket for your data.
    Basic Backup
    For some people Time Machine will be more than adequate. Time Machine is part of OS X. There are two components:
    1. A Time Machine preferences panel as part of System Preferences;
    2. A Time Machine application located in the Applications folder. It is
         used to manage backups and to restore backups. Time Machine
         requires a backup drive that is at least twice the capacity of the
         drive being backed up.
    3. Time Machine requires a backup drive that is at least double the
         capacity of the drive(s) it backs up.
    Alternatively, get an external drive at least equal in size to the internal hard drive and make (and maintain) a bootable clone/backup. You can make a bootable clone using the Restore option of Disk Utility. You can also make and maintain clones with good backup software. My personal recommendations are (order is not significant):
      1. Carbon Copy Cloner
      2. Get Backup
      3. Deja Vu
      4. SuperDuper!
      5. Synk Pro
      6. Tri-Backup
    Visit The XLab FAQs and read the FAQ on backup and restore.  Also read How to Back Up and Restore Your Files. For help with using Time Machine visit Pondini's Time Machine FAQ for help with all things Time Machine.
    Although you can buy a complete external drive system, you can also put one together if you are so inclined.  It's relatively easy and only requires a Phillips head screwdriver (typically.)  You can purchase hard drives separately.  This gives you an opportunity to shop for the best prices on a hard drive of your choice.  Reliable brands include Seagate, Hitachi, Western Digital, Toshiba, and Fujitsu.  You can find reviews and benchmarks on many drives at Storage Review.
    Enclosures for FireWire and USB are readily available.  You can find only FireWire enclosures, only USB enclosures, and enclosures that feature multiple ports.  I would stress getting enclosures that use the Oxford chipsets especially for Firewire drives (911, 921, 922, for example.)  You can find enclosures at places such as;
      1. Cool Drives
      2. OWC
      3. WiebeTech
      4. Firewire Direct
      5. California Drives
      6. NewEgg
    All you need do is remove a case cover, mount the hard drive in the enclosure and connect the cables, then re-attach the case cover.  Usually the only tool required is a small or medium Phillips screwdriver.

  • Can we put iphone 3gs into  DFU mode with out power button

    My Iphone 3gs power button not working, so is there any way I can put my iphone into DFU mode..

    No - you can't put the phone in recovery mode or DFU mode without a functioning sleep/wake (power) button.
    Note that DFU mode is only useful when hacking the phone.  Recovery mode is what you want for troubleshooting.
    http://www.ihackintosh.com/2009/06/recovery-mode-and-dfu-mode/

  • Hello, I have an iPad Mini WiFi Cellular white 16Gb and I puted my sim inside it but, I cant read the text message that I recieve in the Sim. What can i do? And I can't put the sim in a cellphone coz it doesn't recognize it. Please help me! Thank you.

    Hello, I have an iPad Mini WiFi Cellular white 16Gb and I puted my sim inside it but, I cant read the text message that I recieve in the Sim. What can i do? And I can't put the sim in a cellphone coz it doesn't recognize it. Please help me! Thank you.

    iPads do not do SMS.

  • How can I put a subpanel inside another subpanel?

    Hi,
    Is it possible to put one subpanel o several subpanels inside one main subpanel?
    Thanks,
    ToNi.

    DFGray wrote:
    You can create something in LabVIEW to do this, but it won't be trivial. Here are some things to point you on your way. I have not done this, so it is pure speculation on how I would go about solving this problem.
    You will need to know ahead of time the maximum number of windows you will want. On your front panel, create that many individual subpanels. You can hide the border and make them transparent so you never see them unless something is in them.
    When you load a VI into the subpanel, all you get is the panel, not the title bar. You will need to create a title bar with buttons and any border you want on the VIs in the panel area. This is tedious, but fairly straightforward, especially if you use system colors to make it look like a real title bar/border. You won't be able to make it look like an XP title bar unless you use bitmaps/picture control. If you go that route, you can probably even mess with the color map to change the bitmap colors when the system color changes (have to poll, no event for system color change).
    You can resize and move the subpanels using property nodes. Getting the info to do this could be tricky, however, since you may be coordinating mouse events from the top level VI and the VI hosted in the subpanel. Should be doable, though.
    One other method is to use floating windows, but move them on top of your main window so it appears to the user it is an MDI. You won't get clipping, but everything else will look the same and you won't have to jump through hoops to create title bars, etc. You will have to write a position manager to maintain the window positions, but that is probably easier than the tricks I discussed above
    Good luck. One final question - do you really need an MDI? Floating windows with clear labels are a lot easier. Do some polling of your users to find out what they like best, then go for it.
    You should using windows reparenting functionality through windows api dll calls. Reparenting is documented well on microsoft.com. Reparenting is how Excel opens multiple worksheets inside the Excel "parent" window. I have done this on a few of projects and it works far better than subpanels because it allows you to drag windows around within a parent application. They are also far easier to work with once you get the reparenting vi's correct (you have to do some messing with Z position and window activation to get them to repaint properly) because unlike with subpanels you can view a VI diagram while it is reparented with no problem. With subpanels I have also had problems with GUI controls driving event structures when a vi is in a subpanel.
    -Devin
    I got 99 problems but 8.6 ain't one.

Maybe you are looking for

  • Placing a logo in PDF

    Hi All, In my application there is one print functionality which when presses opens a pop up and displays the necessary data. This will be in the PDF format. Now i need to put a logo or picture in the top of all the data. How to write code or what ar

  • UEFI/GOP Vbios Request msi N660 TF 2GD5/OC

    Looking for the latest bios for the MSI N660 TF 2GD5/OC SN: 602-V287-04SB1208179991 current bioshttp://dl.free.fr/n75Qpq508 Thanks for help

  • Real Time COFI Integration in NEW GL

    Hi , can any one tell me the logic for "Real Time COFI Integration" in NEW GL I am getting the error " Activate company code check in controlling area' thanks Gopi krishna

  • Change slide size without resizing objects?

    Is it possible to change the slide size without causing Keynote '09 to resize all the objects on each slide?

  • Copying the file in Director Lingo

    Hi! I am opening a file using the openFile command in director but what i need is to open the file as well as copy the same file to a local drive.Can it be done in director and can i get code snippet for the same.Is there any comand in director for c