How to instantiate MovieClips with sequence names

Hi all,
I'm rewriting a game that came from AS2, and passing it to
AS3.
The problem is that I have several different MovieClips in
the Library, with a sequence name ("s_0", "s_1,...).
The question is... how can I use the addChild to instantiate
these movieclips, using these names, sequencially, using a FOR
loop?
I'm trying to get a way, that I don't have the remake all
movieclips, or else I'll be stuck on the desk for a week :P
Thanks

I found the answer on other blog.
You have to dinamically make new MovieClips, with a name that
can be a dynamic String.
So the result is the following code.
Make sure you import the wright class to to this
import flash.utils.getDefinitionByName;

Similar Messages

  • How to send file with original name through Mail adapter

    I have to send file with original name as attachment through Mail Adapter. I am picking the file from FTP server through File Adapter. I am not using message mapping because files do not have any standard format.

    Hi,
    Have you solve your problem ?...
    I have exactly the same scenario : pik up a file (file adapter) and send it in attachment by mail adapter without mapping (no IR)...
    I activated Adapter specific paramters properties in the File adapter sender and i can see the FileName tag in DynamicConfiguration section of SoapHeader in SXMB_MONI...
    I want to use MessageTransformationBean... BUT, how can i 'access' to FileName tag ???...
    Thanks...
    I setup modules like this :
    AF_Modules/DynamicConfigurationBean 1
    AF_Modules/MessageTransformBean rename
    sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean mail
    1 key.0 write http://sap.com/xi/XI/System/File FileName
    1 value.0 message.FileName
    rename Transform.ContentDisposition attachment;filename=message.FileName
    rename Transform.ContentDescription message.FileName
    rename Transform.ContentType application/csv-tab-delimited-table;name=message.FileName
    But my file name attachment is message.FileName....
    Edited by: Emmanuel JORAND on Sep 29, 2008 9:23 PM
    Edited by: Emmanuel JORAND on Sep 29, 2008 10:25 PM

  • Topic: How to refer columns with same name in jdbc

    I have a join statement :
    Select a.col1, a.col2, b.col3, b.col2 from TABLE1 a, TABLE2 b where a.col1 = b.col1
    how do I refer with same column name suppose I want to get b.col2
    I get error when I try rs.getString("b.col2") or
    rs.getString("TABLE2.COL2")..
    note I donot want positional retrieval i.e rs.getString(x) , where x is column number.
    can you suggest how to refer the b.col2 uniquely.

    Select a.col1, a.col2, b.col3, b.col2 from TABLE1 a,
    TABLE2 b where a.col1 = b.col1You can use a column alias, like below. They "as" keyword isn't always necessary, depends on your database.
    Select
        a.col1 as a_col1,
        a.col2 as a_col2,
        b.col3 as b_col3,
        b.col2 as b_col2
    from
        TABLE1 a,
        TABLE2 b
    where
        a.col1 = b.col1

  • How to instantiate OADataBoundValueFireActionURL with encrypted parameter

    I have found in the Developer guide that to set a fire action on a webbean programmatically we need to use the below SPEL.
    Could anyone suggest what would be the syntax to instantiate OADataBoundValueFireActionURL with an encrypted parameter ?
    Declarative:
    ${oa<viewInstanceName>.<viewAttributeName>}
    Programmatic:
    new OADataBoundValueFireActionURL(webBean, "{$Sequence}"));
    Declarative:
    ${oa.encrypt.<ViewInstanceName>.<ViewAttributeName>}
    Programmatic:
    Appreciate you help !!
    Thanks

    The custom requirement is to enable/disable update icon in Qualifications Summary page in Self service based on the qualification type. I have tried to include a switcher programmatically to show the enabled and disabled update icon. To add the fire action for the enabled update icon I am using the OADataBoundValueFireActionURL as below.
    OAImageBean UpdEnabledIconBean = (OAImageBean)createWebBean(pageContext, OAWebBeanConstants.IMAGE_BEAN, null, "UpdEnabledIcon");
    UpdEnabledIconBean.setSource(OAWebBeanConstants.APPS_MEDIA_DIRECTORY + "updateicon_enabled.gif");
    Hashtable hashtableParams = new Hashtable(1);
    hashtableParams.put ("_SSHRFORMEVENT","Edit");
    Hashtable hashtableParamsWithBinds = new Hashtable(1);
    hashtableParamsWithBinds.put ("HrQuaDummyTextSs",new OADataBoundValueFireActionURL(UpdEnabledIconBean, "{$QualificationId}"));
    UpdEnabledIconBean.setFireActionForSubmit("update", hashtableParams, hashtableParamsWithBinds, false,false);
    The seeded controller which is having the event handler code is using pageContext.getDecryptedParameter() to read the parameter and throwing an error.
    So need to encrypt the parameter whiie instantiating OADataBoundValueFireActionURL.
    For this, I am looking at the programmatic approach for ${oa.encrypt.<ViewInstanceName>.<ViewAttributeName>}
    I have tried to use pageContext.encrypt as workaround but pageContext.getDecryptedParameter() is returing blank.
    Appreciate any help !
    Thanks

  • How do I watermark with my name

    how do I water mark with my name

    eloisekay wrote:
    how do I water mark with my name
    Use the text tool to type your name. It will be on a separate layer.
    This allows you to position it with the move tool.
    If you want your name on several picture files, go to File>Process multiple files. Look for "watermark" under "labels" in the drop-down.

  • How to authenticate LDAP with account name?

    Hi,
    In my ADS server for all the users common name and account name are differently assigned , In LADP application which is developed using JNDI APIs it is able to authenticate the users with display name/ CN value(common Name ) only, but I need to authenticate users with account name.
    Please give the solution for this.
    Thanks
    Raghava

    If you search through posts in this forum, you will find out what credential formats can be used to authenticate a user.
    Just to make it easy for you, here is a search string.
    http://www.google.com/search?hl=en&q=active+directory+jndi+account+name+site%3Aforums.sun.com&meta=

  • How to send File with Same name to Receiver

    HI Frnds,
    In my peoject i have one scenario,
    I have to access Orders is the name of file , available in FTP Server, i have to send same file to Receiver side with same name Orders
    Is it possible with same name dynamically??
    Regards,
    Raj

    hi,
    You have to go for variable substitution option available in receiver file adapter,but for that you have to get the file name in receiver payload.
    http://help.sap.com/saphelp_NW04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/frameset.htm
    these links are  also helpful
    /people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i
    /people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii
    /people/sriram.vasudevan3/blog/2005/11/21/effective-xsl-for-multimapping-getting-source-filenames-in-legacy-legacy-scenarios
    regards,
    ujjwal kumar

  • How to create directories with same name in different schemas

    I have two schemas on the same database.
    I am trying to create directories with same name, but different paths in both the schemas.
    When i created the directories in second schema, the directory paths of the first schema are automatically changed to the second path.
    Is there any solution to create directories with same name, but different path in two different schemas on the same database.
    Thanks,
    Sridhar.

    Hi,
    >>When i created the directories in second schema, the directory paths of the first schema are automatically changed to the second path.
    If you have removed the REPLACE clause of your create statement, then you would see that is not possible.
    SYSTEM> connect scott/tiger
    Connected.
    SCOTT> create directory mydir as '/tmp';
    Directory created.
    SCOTT> connect legatti/pwd
    Connected.
    LEGATTI> create directory mydir as '/tmp';
    create directory mydir as '/tmp'
    ERROR at line 1:
    ORA-00955: name is already used by an existing object
    LEGATTI> select owner,object_name,object_type,created
      2  from dba_objects where object_name='MYDIR';
    OWNER     OBJECT_NAME    OBJECT_TYPE         CREATED
    SYS       MYDIR          DIRECTORY           19/12/2007Cheers
    Legatti

  • How to import MP3 with file name into library, rather than tag?

    I've been given a CD with about 200 MP3s of lectures. They are to be listened to in order, and the file names reflect the order number, like "lecture 1", "lecture 2", etc. However, when I drag them all into iTunes, the names in the iTunes library don't include the file names - they are simply "lecture", which I guess must come from a tag in the MP3 file. So iTunes is ignoring the file name and thus I end up with 200 entries in my iTunes library that can't be ordered properly. How can I get it to use the file name when importing?
    Mike

    If you have your iTunes preferences set to keep your iTunes Music folder organized, it's possible that even the file names have changed according to the files' tags. In that case, you'll need to (at least temporarily) disable this option and import the files from your CD again.
    Once you're sure the files have been successfully added to your iTunes library and the file names kept intact, you can use the Filenames to Song Names script from Doug's AppleScripts for iTunes.
    This should get everything sorted out.

  • How to swap movieclip with other content, in a movieclip loaded external

    Hi! I'm getting desperated.
    I started about 3 days ago trying to solve this problem,
    maybe i'm very noob!
    I have a main movie. Inside this, i load various externals
    swf's. One swf for a menu, another for a image presentation, etc.
    In the menu, i load various instances of another swf file...
    a button swf, and witch one has to have a different image as
    button.
    So inside the button, i have a layer with a button, but no
    shape or nothing, and in another layer, i have a movieclip to can
    swap by an image.
    So, the struct is like this:
    Main Movie
    . image_presentation
    . contact
    . menu
    . . button1
    . . . button
    . . . image
    . . button2
    . . . button
    . . . image
    . . button3
    . . . button
    . . . image
    . . button4
    . . . button
    . . . image
    So, button is only a swf file, with various instances.
    "button" inside the buttons, make the button efect, with a white
    border apearing on mouse over button. "image" is a movieclip
    created only for change with an image (button 1 = image 1, button 2
    = image 2, etc).
    How can i do this, controlling the images url's from the main
    movie?? I had tried a lot of ways, but i could do it.
    Please help.
    Thanks.

    sorry there but this system seems convoluted and unecessary.
    You should be able to achieve nearly any 'effect' using either a
    single button instance, or a movieclip instance used as a button,
    but should not need multiple instances to do so, or multiple swf
    files Each button symbol has three 'states' that you can apply
    different 'images' to to achieve an 'effect'. You can even put
    movieclips in a button state to animate something during the
    triggering of that state. It seems that you should be able to at
    least place all of the buttons within the 'menu' in a single swf
    (not to mention that they could all be within the main swf) instead
    of 'loading' them as individual swf files.
    What is it that you're trying to control? the 'images'? what
    do you want them to do, and how are you wanting them to be
    controled?

  • How to save draft with new name

    How do I save a draft with a new name? I want multiple
    versions of the same page.

    1. start Contribute, connect to your site, browse to the page
    you want to duplicate
    2. in the main menu go to >File>New
    3. choose the opstion 'Copy of current page' and enter a
    title for the page
    4. edit amnd publish the page, enter a new filename if you
    want

  • How i validate textbox with dynamic name?.

    My form got a dynamic textbox, it may be 0 or 1 or ....10 in
    the form based on user action.
    Before submitting the form, i want to make sure user enter
    value for all textboxs.
    How can i validate the text box?.
    textbox name item_val_#i#
    item_val_1
    item_val_n
    item_val_ may not be present if user is not adding item_val_
    textbox.
    Please send me validation javascript.

    @javagene:
    there are so many things wrong with your code that i am not
    even going
    to bother with listing the errors, especially since Grizzly
    has already
    done such a nice job of it
    just some advice:
    learn the basics, man/woman!
    the code works fine if - just re-write it correctly! i have
    tested it.
    fix all the syntax and logic errors you have in your code and
    it will work.
    tip: learn the syntax/rules of javascript and how call js
    functions from
    element events
    and learn how to nest quotes properly
    and also learn some cf basics, especially the
    <cfoutput> tag...
    and fix your cfif/cfelse logic if you want to see any text
    boxes on the
    page, never mind in increased numbers...
    and while we are at it, learn to read and try out the replies
    to your
    posts instead of just repeating your question / pleading for
    help again
    and again in hope of someone getting tired of it and posting
    the whole
    complete code for you...
    @ian:
    totally agree with your point. now, where do i send my
    invoice to?..

  • How to reference objects with same name?

    Probably another easy one, but again, couldn't find the answer in old discussions...
    I have some objects with the same name on my form. Designer has made them unique by making an array out of them...object[0], object[1], object[2] etc. How can I reference the individual objects in javascript?  I tried the obvious by referencing them as an array, but to no avail.  I suppose it'd be just as easy, if not better, to just have unique names, but in this case, the objects are related and having them in an array would be handy.

    You can try like below.
         var oObject = xfa.resolveNode("Object[1]");
         xfa.host.messageBox("" + oObject.rawValue);
    Thanks
    Srini

  • How to export images with Project Name to be visable by Photo Mechanic.

    Hello all,
    I am trying to create another complete set of my images, that can be edited by outside programs (Photo Mechanic and/or Lightroom). I am doing this by exporting the images out of a managed library. I want the Aperture "*Project name*" and Rating fields to be passed to Photo Mechanic. And then I want PM to be able to do queries on the Metadata fields containing the Aperture Project Name and Rating. My intention is to use Photo Mechanic to rename the images and relocate the images but still keep track of the Rating and Project Name.
    In Aperture, when I add a custom metadata item under IPTC and export the image, that custom metadata item does not show up in PM or Bridge for that matter.
    How can I export images and have the Rating and *Project Name* be exported and visible in PM or LR or Bridge?
    Thanks in advance,
    Dick B.

    There is not an easy way but Ian Wood's tool might help you out.
    Personally I would just use the "subfolder format" drop down options available in all of the export and relocate dialogs to sort them into directories that are based on Aperture project name - easy enough considering those other tools use file system based folders for there organization structure anyway.
    RB

  • Newbee: How to access fields with duplicated names?

    How can i access fields where the name already exists (Like FieldName[0], FieldName[2],...) - and where else can i get answers to simple questions like this one?
    Fieldname[n].thisValue does not work.
    Thanks for help.

    xfa.resolveNode("FieldName["0"]") etc.. I think should work

Maybe you are looking for