Multiple copies of a component?

Is there a way to take a single .mxml component and make multiple copies of it?
I've got an app where the user can page through various screens.  Each screen should fade out and slide away while the next one slides in.  There has to be two copies active at any given time because the user should see both the old and new animating simultaneously.  I've got it working with an ActionScript class but positioning elements, setting properties, etc, is much harder than with an MXML component.
For example, I've got an Image object, but I can't set the horizontalAlign, verticalAlign properties like you can in MXML.  They just don't seem to be exposed in ActionScript.  Or maybe I'm doing it wrong?
What's the best/simplest way to achieve what I want?

horizontalAlign, verticalAlign etc. are style properties, so in AS you need setStyle()
myObj.setStyle("horizontalAlign", "center");
If this post answers your question or helps, please mark it as such.
Greg Lafrance - Flex 2 and 3 ACE certified
www.ChikaraDev.com
Flex / AIR Development, Training, and Support Services

Similar Messages

  • Multiple instances of same component become non-editable

    I have created a simple component for authors to add links. They enter anchor text, link destination, title attribute, via textfield. They set the target attribute via a dropdown list, xtype=selection. The issue we run into, is that if the author has entered multiple instances of the same component on a page, the dropdowns become non-editable after they are set the first time. They cannot be edited changed until the page edit view/content finder is closed and reopened.
    Scenario:
    1. User drag/drops component
    2. User makes selection from dropdown xtype=selection
    3. User drag/drops same component again to allowed parent
    4. User make selection from dropdown xtype=selection in second instance of component
    5. User can no longer change the selection in either instance of the component without closing and reopening edit view/content finder.
    6. User closes and reopens edit view/content finder.
    7. Again, both instances of the dropdown xtype=selection become non-editable after first selection of an option until the edit view/content finder is closed and reopened.
    When there is only one instance of the component on the page, the drop downs/xtype=select remain editable at all times.
    In addition to this particular scenario, I've had to work around some other issues of multiple instances of a component, where only one instance on a page works at all, the data gets crossed/jumbled between instances of the same component, etc.
    My question is first, how might I solve for the scenario fully called out in this question? Secondly, is there some methodology to making multiple instances of the same component track themselves individually, work together on the same page, play nicely with each other?
    Any assistance is appreciated.

    Using request scope would be a workaround.
    I'm looking for view distinct state for the associated component tree for the session (i.e. managed bean state, whether its separate instances of the bean or copies of serialized state I don't care)
    My views require conversational-like state handling that I don't want stored on the client.

  • Receiving multiple copies of text messages

    i have an iPhone 6 plus and have been receiving multiple copies of the same text message (up to 4x) from various contacts across various carriers. This has been an issue throughout having an iPhone 5s and 6 plus, and only occurs with regular messages, not iMessage. It also does not occur for automated text messages sent to me (e.g. Redbox). While I have unlimited messages it is frustrating because they are sent to me multiple times, and not necessarily in the same order each time. It is also inconsistent. I might get a single copy of one text and four of another. I have reset the phone, changed phones, and every other thing possible. This seems to be an issue not on my end. Assistance would be much appreciate.  Thanks.

    Great information Kashume42! Let's make sure that your messaging application is not the culprit. Please download and install Verizon Messages http://bit.ly/1mTrHaQ from the App store. Make it your default messaging application and test. Keep us posted.
    AntonioC_VZW
    Follow us on Twitter @VZWSupport
    If my response answered your question please click the "Correct Answer" button under my response. This ensures others can benefit from our conversation. Thanks in advance for your help with this!!

  • Hp deskjet 1510 multiple copies

    My HP Deskjet 1510 keeps making multiple copies of itself in my devices on windows 7. I've tried deleting the copies but they keep coming back can anyone help please for some reason its stopped letting me print.

    Hi kieranraikes,
    Welcome to the HP Forums! I see that your HP Deskjet 1510 is making multiple copies. I am happy to help you! I would recommend the following:
    Run the HP Print and Scan Doctor, and let me know what happens.
    Powercycle the printer. (With the printer turned on, unplug the power cable from the back of the printer, and the wall outlet. Then wait 30 seconds, then plug the cable back in, wall outlet first. The printer will turn on automatically).
    Hope this information helps you, and have a great day!
    RnRMusicMan
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" to say “Thanks” for helping!

  • I am unable to print multiple copies on 1 page

    I have a macbook and I used to be able to print multiple copies on 1 page. It had a selection on the bottom right. Now something has changed with the format. It allows me to select multiple copies, but only prints one.

    Hi,
    In order to print multiple documents on one page, you may follow the steps mentioned below:-
    Press Command+p- Select multiple pages or booklet
    If you are not getting these options, please send us a screenshot to better understand the issue.
    Regards,
    Nakul

  • Printing multiple copies of 3 page BOL in Duplex mode-

    Hi Gurus!
    I have created a smartform to print the BOL on front side and terms and conditions on back side. I used the duplex mode to print and it works perfectly fine. When I have a BOL with 3 pages of information , it prints the items on the front side and terms and conditions on the second side and it does everything absolutely correctly.
    At our organization we always print 5 copies of any BOL and that is when the problem arises. When we do a printing of the BOL form with number of copies set to 5 , it prints very akwardly with the settings. First it prints page 1 front and same thing on the back, then  again the first page on the first and its back and then front on the third side , then similarly 5 sides of terms and conditions and then followed by 5 sides of page 2 items and followed by 5 sides of terms and conditions, which is very akward. Actually it should print first set with page 1 and TC on back of it , then Page 2 and TC on its back and page 3 and TC on its side like it does when I make a single copy.
    Is there any settings that I am missing thats making the above happen when I print multiple copies of the BOL?
    Please suggest.

    Hi!
    Thanks for the reply. I changed the settings of the printer to 'Pass Copies as Separate Output Request(in SAP System)' and re-tried printing 5 copies of the BOL and it again seems to print the first page 5 sides then Terms and conditions on 5 sides, then again 5 sides of page 2 and followed by 5 sides of T&C.
    My settings on the smartforms is front page "D' and the back and the Last page is blank setting. This runs well when I just have to print one copy of my BOL , it prints the front page and then T&C on its back side , then again the second page and T&C on its back . This only messes when its more than one copy of the set of BOL.
    Please suggest as to what to do next to make it print in proper sets.
    Thanks and Regards
    Aarav

  • Print Multiple copies of report, and resetting Page number for each copy.

    Dear frnds!
    i am using developer 6i reports i have a problem.
    i want to Print Multiple copies of report, and resetting Page number for each copy" that is 4 copies of an invoice is required
    1 - for user copy
    2- gate copy
    3- accounts office
    4- office copy
    any body please tell me the solution "i am using oracle 9i and developer 6i"
    Thanx
    Ibrar

    Hi,
    I was wondering if you were able to get your multiple copies working? Below is what I have so far, just trying to get it to work before changing the actual template.
    <?for-each-group@section:R5542520/Pick_Slips_Detail_Lines_S3;PickSlipNumber_ID260?>
    <?variable@incontext:G1;R5542520/Pick_Slips_Detail_Lines_S3;PickSlipNumber_ID260?>
    <?for-each@section:xdoxslt:foreach_number($_XDOCTX,1,3,1)?>
    HEADER
    PSN: <?$G1/Pick_Slip_Number_Display_ID54?>
    PSN Detail: <?$G1/PickSlipNumber_ID260?>
    Page 1 of 3
    <?start:body?>
    BODY
    <?$G1/LineNumber_ID6?>
    <?end body?>
    FOOTER
    <?end for-each?>
    <?end for-each-group?>
    XML:
    <R5542520>
    <Pick_Slips_Detail_Lines_S24>
    <Header_Custom_Section_S24>
    <Pick_Slip_Number_Display_ID54>123456</Pick_Slip_Number_Display_ID54>
    <PickSlipNumber_ID260>123456</PickSlipNumber_ID260>

  • We have a large family, 5 kids and two adults all with iPads, iPhones, Mac Books, Servers....  How can we combine our purchases to use on all our devices.  We have two Apple ID's and sometimes buy multiple copies because of how we are limited...

    We have a large family, 5 kids and two adults all with iPads, iPhones, Mac Books, Servers....  How can we combine our purchases to use on all our devices.  We have two Apple ID's and sometimes buy multiple copies because of how we are limited...

    Hello Halfback71,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at:
    Frequently asked questions about Apple ID
    http://support.apple.com/kb/ht5622
    I have multiple Apple IDs. Is there a way for me to merge them into a single Apple ID?
    Apple IDs cannot be merged. You should use your preferred Apple ID from now on, but you can still access your purchased items such as music, movies, or software using your other Apple IDs.
    If you are wondering how using multiple Apple IDs relate to iCloud, see Apple IDs and iCloud.
    Best of luck,
    Mario

  • How can you delete multiple copies of the same songs without deleting one at a time?

    I have multiple copies of most of the songes in Itunes. How can I delete multiple copies without doing it one at a time?

    Select/highlight more than one at a time followed by selecting Delete.

  • How can I gather multiple copies of photos on various devices into one central repository?

    Various episodes over the years of making albums, assembling collections for export or import, migrating between machines, etc have resulted in multiple copies of images to be scattered, in some cases, in unexpected combinations on a couple of separate iPhoto libraries.  Does the latest iPhoto (or Aperture, or ??) have means to identify and gather copies?
    Any help in this direction would be greatly appreciated.

    The paid version of  iPhoto Library Manager can merge multiple libraries into one library while excluding duplicate image files.
    OT

  • How do I delete multiple copies of songs on my iPhone when my laptop's iTunes only has one copy of each?

    Hi, everyone.
    I've seen many versions of this question, but mine has some key differences.
    The problem is that my iPhone 4S has multiple copies of almost every song that I've selected to copy from iTunes. The easy answer is to delete all the music from the phone and then re-sync from the iTunes library, except that I don't sync, I manually manage, because I have a 9000 song iTunes library. According to iTunes on my laptop, I have 835 songs on my phone, but there are actually over 2000 on the phone due to the duplicates. The fact that the duplicates do not show up in the iTunes library means I also cannot use the "Show Duplicate Items" tool.
    I'm thinking that the only two solutions are:
    1. Manually slide and delete all 1200+ dupes on the phone
    2. Delete all music from the phone and then go back through the library and cherry pick what I want on the phone. This seems okay, but I don't know why this happened, so I'm afraid it will happen again.
    I'd be thankful for any advice!

    The cause was probably a USB glitch during a sync or when copying. The music resides on the phone in separate files. A master file contains a database with an index to the music, an entry for each track and a "pointer" to the file containing the track. Somehow the index got corrupted with duplicate entries. It's likely that the music itself wasn't duplicated, but some tracks had more than one entry in the database. I've seen this happen when syncing (rather than manually managing) also. In my case deleting the track from the Music tab in iTunes, syncing, then adding it back fixed it.
    A related problem I've seen is an album may be split, with some tracks in each of 2 or more album entries in the listing. Fixed the same way.

  • Multiple Copies of Songs on Iphone

    I searched the boards and couldn't find a solution.  I recently got an Iphone 4S and have several playlists set to automatically sync to my phone.  When they sync a copy of the same song that is on multiple playlist is copied there for each playlist that the song is found on.  I've tried to remove all playlist then set the automatically sync but it still copies the songs multiple times taking up unnececcary space on my phone. Any tips that or links that can help would be appreciated.

    I don't know what happens but it stopped putting multiple copies on the iphone.  Yesterday when i expanded the iphone and clicked on music and looked at the songs only one copy of the songs where on there instead of it being 3 or 4.

  • Multiple copies of JPEG on ePub export

    I'm making copies of a JPEG image and using this image in multiple places in my inDesign document. In the links panel, I see the disclosure triangle that shows all the pages that I'm using that link. So, all good so far.
    When I export the document to ePub, I would have expected there to be a single version of the JPEG file in the resulting ePub file. However, I have multiple copies of the JPEG file, all the same size, but with different names.
    So, if my original JPEG file is 1234.jpg, I'll have the following derivatives of that file in the "images" folder of the ePub:
    1234.jpg
    12341.jpg
    12342.jpg
    12343.jpg
    Then in the CSS and XHTML pages, the different uses of 1234.jpg will each reference their own version of the file, so:
    Page 1 will reference 1234.jpg
    Page 2 will reference 12341.jpg
    Page 8 will reference 12343.jpg
    etc...
    This seems very wasteful to me, as my ePub is now much larger because it has all of the duplicated JPEG files. Is there any way to avoid this, or is this expected behaviour?
    Thanks
    William

    I have ID CC 2014, 10.1.0.71
    I am exporting to Fixed Layout ePub.
    According to a previous post, this issue was addressed with the 10.1.0.70 release but that's not my experience, so wondering if there is any other solution than going through and editing the CSS generated code?

  • Multiple copies of music on iPad, and some songs play as a different song

    Hi,
    I've been having this weird problem that I have been looking into for many times and never have found a straight answer. 
    I've been finding that I have multiple copies of the same song on my Music (built-in) app on the iPad 2.  I don't know why it's been doing this.  Yesterday, I finally got a chance to restore my iPad 2.  After the restore, the same problem consisted.  Not only has that been happening, but I also have been having another weird problem with the music app too.  I have a song that I want to play , but it ends up playing a different song.   For example,  choose the song "we are the champions" or some song, and then it plays a different song like "We will rock you" or some other song. (it's not these songs, I don't have them in my library.  They are just examples) but it keeps the name.  So when the iPad "says" it's playing "we are the champions" it is actually playing "we will rock you" or any other song.
    Sorry if I haven't made this clear enough.  I tried the best I could.  I have never had this problem until I updated to iOS 5.  I am currently running iOS 5.0.1
    Is there any way I can fix this problem I have been having?  I already tried the restore.  I don't know what else to do.

    I'm not sure about the playing a different song when you choose a nother, but I Just figured out the multiple copies issue.I had been having the same problem and realize that some of the songs in that album were marked as "part of a compilation." SO i went to each individual song in that album and unchecked the box (when you go to th e"get info" screen) Hope that helps.

  • Multiple copies of songs on iPod

    I have several playlists in iTunes. Many songs are present in multiple playlists. When I copy the playlists to the iPod I end with multiple copies of the same songs. Is there any way to avoid this? It would seem that it should be smart enough to index a song already present so that only one physical copy would be needed. Is there some setting I'm missing?

    Yes, it is the same song in different playlists. I was expecting the iPod to behave like iTunes and the hard-drive. The song is included in multiple playlists in iTunes but it is only stored once on the hard-drive. However, when I copy the playlists from iTunes to the iPod I end up with an actual copy of the song for each playlist it is in. So if I have the same song in three playlists there are three copies of the song on the iPod.

Maybe you are looking for

  • How can I have multiple accounts and only one library

    How can I have multiple accounts and only one library that all the purchased items feed into?

  • T60 Windows 7 Installation BlueScreen (BSOD)

    I've been using this laptop as a school configured laptop w/ Win XP SP2 on it for over 2 years.  I just recenly bought it out, and rather than continuing to use Win XP on it, I've decided I wanted to install Win 7 RC on it. I have yet to purchase a c

  • FM Radio + Livepause??

    will iphones get this feature soon??!? i think we should. its not fair that a dang ipod gets fm radio but iphones DONT! idk if it's just me or not, but the iphone is getting to be alot less exclusive.

  • Jar runs from Dos prompt, but not when double clicked.

    Hello everyone, My executable jar file will run fine when called from the Dos prompt like so: java -jar myJarFile.jar But not when I double click it. I've associated *.jar files with java.exe as suggested here on the forums but all that happens when

  • IPhone won't let me update Apps

    Can't update apps, says I need to switch to the Canadian store before purchasing. Sure, but how??