AttachMovie(); and stage mc names

I'm attempting to create a portfolio page to house some of my
movie work. I thought
this would be a good chance to work on my understanding of
XML and Flash. I created
a XML file with three child nodes. The code is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<projects>
<project title="Trans/mission" link="#" thumb="" />
<project title="Once We Were..." link="#" thumb="" />
<project title="Televirus Glow" link="#" thumb="" />
</projects>
I then used attachMovie(), a for loop with
childNodes[].length, and a number
variable to make some movie clips with string + number
instance names (i.e. box0, box1, box2).
Here is the AS (in 2.0):
// VARIABLES
boxN = 0;
// FUNCTIONS
createBox = function () {
attachMovie("projectBox","box"+boxN,boxN+1);
boxN++;
projects = new XML();
projects.ignoreWhite = true;
projects.onLoad = parse;
projects.load("xml/films.xml");
function parse(success) {
if (success) {
for (i=0; i<=projects.firstChild.childNodes.length-1;
i++) {
createBox();
What is the best way to refer to all of these movie clips
regaurdless of how long the
childNodes[] array is? So far I can move individual boxes (ie
changing ._y), but not
more than one at a time. Thanks.

no this is a dynamic method and will generate as many
instances as there are nodes in the xml.
the reason that the variable is not working for you, is that
the way you have it declared it is a String, not a MovieClip - and
you do not need to reassign the instance name of the clip to a
variable. additionally, you can set the position of the clip at the
time of attachment by including an Init Object reference parameter
in the attachMovie method.
also, it's never a bad idea to store the instance in an array
for batch processing if needed, but you can still do so by
referencing the instance of the clip as its genereated rather than
using an unneeded variable reference.
all of these items would look something more like this:

Similar Messages

  • Buttons null; losing stage instance names

    Hello, I apologize if this question has already been asked but as the title states I'm having problems with the instance names of my buttons. I am using Actionscript 3 with Flash CS5. I apologize in advance for being verbose but it'd be best if I explained my problem in detail.
    I have my project set up so that everything occurs in one MovieClip and buttons within the MovieClip are clicked to navigate through the MovieClip. The MovieClip contains several frames which are all unique and contain a variety of textboxes, MovieClips, buttons, classes and other custom classes. All of these components are created directly in Flash Professional by dragging them from the library onto the stage inside of the MovieClip.
    I then name these components using Flash Professional and use these instance names to work with the components. Usually this works without a problem. However, now that I am using a nested MovieClip for my project many problems are occuring. I have it so that when buttons are clicked, the MovieClip goes to a certain frame via the gotoAndStop(x); command. This works fine but I am having problems accessing the buttons that I have named earlier. It gives a null object reference error and when I trace the button it traces as "null".
    Originally I thought that this problem was because the MovieClip had not yet initialized but I had used the ADDED and RENDER event listeners, Timeline scripting, and other methods but the button was still null, leading me to believe that the problem was more than that.
    So I used a click event listener that traced the instance names of the components that I was clicking (trace(e.target.name)). I have a total of 8 buttons on the specific frame of my MovieClip so I clicked on them all. 6/8 of the buttons traced the correct instance name that I had given them whereas the other two buttons traced "instance 169" and "instance 177" instead of the instance name.
    With all this strangeness, I commented out the code for these 2 specific buttons to see if it would work without them. Sure enough it did.
    I believe that my buttons have lost their stage instance names and I do not know how to fix this problem. I have tried deleting the buttons and creating them again but to no avail. It does work, however, if I use the Button component that Flash has but I do not want to do that because I'd like to use my own custom buttons (I know the Button component is customizeable, but I'd like to use my own anyways).
    If anyone could help, please how can I fix this problem? If my .fla or specific code needs to be provided, I can do so.

    Without looking at your code I can't say 100% what is going on. However, I suspect what is happening is that you're doing the following:
    Your button is on stage in frame 1
    You add an event listener to that button
    At some point, you go to a frame where the button does not exist.
    When you come back to frame 1, your listener doesn't work anymore
    Or some variation of above, where an instance was on the stage, is removed, and even though it appears to have been added back you can't reference it anymore.  I've discussed fixes for this issue in depth in this article, but it all boils down to the fact that when the object is removed from the stage the variable that contained the instance the first time will go to null, and then when you go back to the frame with the instance on it, the variable will be populated with an instance which is probably not the same as the first one.
    If the problem is what Ned Murphy speculated, you can easily fix it by setting mouseChildren to false on the buttons.

  • Difference sym.getSymbol("name"); and sym.$("name");

    Hej all,
    where is the difference between these two ways in calling a symbol.
    sym.getSymbol("name");
    and
    sym.$("name");
    I now that I use the first one for .play() stuff and the second one for .hide(), .show(), etc.
    But is there a definition, when to use which one?
    Thanks.

    Hi there,
    In addition to what Feloxor mentions, the biggest difference between them is that the sym.getSymbol() method allows you to address the symbol timeline and access any child elements within the symbol (i.e., sym.getSymbol("symbolName").$("childElementName")), whereas sym.$("symbolName") addresses only the element that the symbol instance represents, allowing you to change element properties such as x/y position, width, height, etc. of the symbol instance on the Stage.
    hth,
    Joe

  • My lock screen just shows a black background and a User Name/Password dialog after opening the screen from sleep. How do I get it back to where it blurs my desktop image with the dialog and my account image displayed?

    I'm not sure when it began, but now my Macbook Air only shows a black background and a User Name and Password dialog box when I wake it from sleep. It used to show my desktop background blurred with my user name and icon displayed with only a text field for entering my password. I'm currently using Yosemite (OS X 10.10.1) and all updates have been done. Any help or suggestions would be greatly appreciated as I know this isn't a real problem, just an annoyance since I couldn't find how to change it back in the System Preferences.

    I just have to point out that after looking at a related post (https://discussions.apple.com/message/22661092#22661092), it brought to memory that my issue most certainly began happening after I added some DoD certificates to the keychain. This obviously has something to do with it, but it still leaves me wondering what actually causes this to happen. :/

  • One account and two user names??? HOW??

    Hi,
    First of all, I own 5 Macs in my company, from iMac 24" to Macmini, the entire line. Use Macs since Classic model, so I'm not totally dumb... or may be I am
    It started with a problem syncing iCal and Contacts. The database files became corrupted. Checked the logs and it seemed an permissions problem. try to fixed but the problem returned.
    Of course I deleted iCal and contact files at Library, create new one and imported from backup - the same problem happened.
    Then I started to dig the problema and when I looked at my keychains I found that I have two user names "sharing" the same user account...how?? one is marcio and other is Marcio Esteves.
    I can't find any reference to this second user name apart from keychain. Tryied to delete the keychain and create a new one but the same... When trying to fix the keychain it show me this:
    Verification started
    Checking keychain configuration for marcio (user ID=502)
    Home directory is /Users/marcio
    Checked login keychain
    Checked default keychain
    Checked contents of ~/Library/Keychains/login.keychain
    No problems found
    Verification completed
    Verification started
    Checking keychain configuration for Marcio Esteves (user ID=502)
    Home directory is /Users/marcio
    Checked login keychain
    Checked default keychain
    Checked contents of ~/Library/Keychains/login.keychain
    No problems found
    Verification completed
    Of course I can format the HD and re-install from the scratch but I'm curious because, as far as I know, user names and accounts can not be duplicated.
    The only thing that occurs to me is when I bought this machine - MB pro 2.4 - I imported the account from my previous MB pro AFTER change user name from "marcio" to "Marcio Esteves", keeping the same home directory name as "marcio" (as still today).
    So, how can I fix it without formatting and installing everything again??

    Every account on a Mac has two names. These names are called different things depending on the version of the OS and whether you are looking at the System Preferences|Accounts panel or the Workgroup Manager on a server. The "Name" or "Full Name" and the "Short Name" or "Account Name". The short name is the typical unix username. and the full name is just that, your full name. The Mac allows you to use either of these in any of the GUI dialog boxes that ask for your user name and password. At the command line I think you can only use your short name. I see that in OS X 10.6, once you create an account, you cannot see the short name in the System Preferences|Accounts panel any longer.
    At a command line (in the Terminal application for example) you can type id or whoami to see your short name.
    I think it is probably normal for entries in your keychain to refer to both or either of these names.
    As for creating new accounts and copying files I think you should be able to do most of that when logged in as an admin user (which you don't normally do, right?).
    Does that help?

  • Reference to database and/or server name in '' is not supported in this version of SQL Server

    Hello all
    I am using C# and ADO.NET (native) - Visual Studio 2013.
    I am always using full qualified queries like "SELECT * FROM [database].[schema].[table]"
    Obviously there is a problem when doing this against SQL Azure,
    I get the following error: "Reference to database and/or server name in '' is not supported in this version of SQL Server"
    Interesting fact: With SQL Management Studio, the same query works.
    I need to know if this error is really a true one or not.
    If yes, I can quit using SQL Azure. I would need a SQL Server and not a partial SQL Server :-)
    Thanks and best regards
    Frank

    Hi,
    Here are my suggestions:
    1. Use partially qualified queries, because:
    a. from a security standpoint, you'd want to limit your login's access across the server instance
    b. in order to achieve a even better, you should specify your database as the Initial Catalog directly in the SQL Connection.
    If you take into account these practices, SQL Database doesn't come with any limitation from that point of view.
    However, in regard to 'With SQL Management Studio, the same query works', this is actually only partially true because if you run that query agains ADO.NET, you'll actually end up in switching databases along the query which is obviously not permitted in
    SQL Database since you're running in a hosted black-box version of SQL you're not managing. It's just like running the USE <dbname> command which obviously doesn't work.
    Alex

  • What is the difference between an apple id and a .mac name?

    I already have an Apple id that I set up when registering my macbook and for my itunes account. My Apple id is not an email address, it is just a word. I now want to get a .mac account but am not sure whether I am supposed to use the same id for this, or can I choose another name? Would this then be my menber name and my email name? I would prefer a combination of letters and numbers.

    Supposedly they've merged... although I do find from time-to-time, that sometimes you need to enter just <userid>, and other times <[email protected]> to login to a particular service.
    Here's two tech articles from Apple explaining the merge:
    http://docs.info.apple.com/article.html?artnum=86308
    http://docs.info.apple.com/article.html?artnum=86334
    Regards,
    ML

  • I have a 2nd generation Ipod. I have it connected to my computer and see (my name) ipod on my screen. Everytime I try to add a new song to the Ipod, this message comes up and I am not sure what to do:   The Ipod, (my name) is synced with another ITunes li

    I have a 2nd generation Ipod.
    I have it connected to my computer and see (my name) ipod on my screen.
    Everytime I try to add a new song to the Ipod, this message comes up and I am not sure what to do:
    The Ipod, (my name) is synced with another ITunes library on A74F65. Do you want to erase this Ipod and sync with this ITunes Library?
    An Ipod can be synced with only one ITunes library at a time.  Erasing and syncing replaces the contents of this IPod with the contents of this ITunes library.
    Then it asks me if I want to delete and sync.
    I am not sure what to do for fear of erasing everything I have put on my Ipod.
    I would appreciate if someone could help me out. 

    If I understand you correctly, you are trying to use iTunes to play the Music in your iPod but which is not in your itunes library. I don't think Apple design iTunes for use in your way. As to put and play music in iPod, the music has to be in iTunes first, so you play music in the iTunes music Library. the window with Ipod music is just to show you which music are already in the Ipod, in case you want to Manually Manage your huge music library.
    Here is the iPod/iTunes manual from the Apple Support Site.
    http://manuals.info.apple.com/en_US/iPod_Features_Guide.pdf
    Have A NICE DAY!

  • PROBLEMS SETTING UP EMAILS AS DEVICE REFUSES TO RECOGNISE PASSWORD AND/OR USER NAME

    PROBLEMS SETTING UP EMAILS AS DEVICE REFUSES TO RECOGNISE PASSWORD AND/OR USER NAME
    My 9800 ( I have 2 - one spare )  is driving me nuts- will not let me set up email accounts from my other Curve model.
    Repeatedly told that either user name or details are wrong, yet they are RIGHT on website.
    Exasperated 
    Help please??
    Fair winds and kind landfalls

    Thank you- I have read through that thread and can see some resonance with my issue.
    My AOL emails work VERY fast with BB, in fact almost simultaneously received on PC & Torch " ping ping!"
    This issue only raised its ugly head when I had 2 Torches replaced by my insurers. 
    Whilst the claim was in process I used a new Curve, loaded from backup on PC to keep emails going and of course phone & web facilities. ( I use the BB to power internet via bluetooth to my PC / laptop when living on a remote island with no phone lines or power supplies)  All was fine. Swapping email accounts took a few minutes with the usual password confirmations for each AOL screenname etc. 
    Then the new Torches came back from insurers, and I tried to swap devices. Phoning & texting is fine. Al data and contacts swap over fine.
    SETUP email accounts.............stymied every time. It says repeatedly that my user name/password is invalid etc etc etc
    Have tried security wipes. Have tried setting up new BB ID & passwords on PC website. All is OK until I try to setup emails on the Torches.  This has used up ridiculous amounts of time- all wasted.
    I love the BB phones and the fast email push......in fact I recently bought a new Sony Xperia Z1 but sent it back because of wifi coverage meant no emails on that superb phone for lots of the time.
    Good old BB I said..........I always get emails wherever I am. ( Rural Scotland has very patchy radio & wifi coverage)  
    Was about to purchase new Z10s just to get a bigger screen, but now I am averse to buying ANY BB phone again because this present mess means I may never get emails set up again.  How nuts is that?
    Many thanks for all help & suggestions..........boy do I need them!!
    Kind wishes from West of Scotland 
    Fair winds and kind landfalls

  • Problem with Calendar and drag and drop a name to a Time spot with palm desktop. Full name does not appear only last name.

    Im having a problem with the palm desktop. When in “Contacts” and I list (LastName,First name) and then I move to the Calendar and drag and drop a name to a Time spot Only the LAST name of the Person appears. How can I fix this so that I can see there full name ?
    Also when If list (Company,Last Name) then go to calendar Some of my contacts are out of order but if I drag and drop them into the calendar day the full name appears. Is there any why of fixing this ? Or having it work properly ?
    Im running  XP pro
    Palm Desktop Version 4.1.4
    Post relates to: Treo 680 (Rogers)
    Message Edited by corrado on 07-21-2008 08:55 AM

    Any Idea how to fix the problem that I am getting when using the (Company,Last Name) and the contacts being out of order in the calander ? I have some last names starting with A then it goes to D then a B then a stack more A and none of then have a Company field filled out in them in them...
    Thanks for looking into that for me but it seems really stange to offer the option but not put in the first name in the calander when you drage the name over. I hope this is fixed in the future. Can anyony sugest another desktop platform I can use if I cant fix my problem with the   (Company,Last Name) problem?
    Post relates to: Treo 680 (Rogers)

  • Timeouts while using LDAP and TNSNAMES for names resolving

    I use an OID for Oracle Names resolving at the client-side.
    I tested some errorcases because there are no HA-features implemented for the OID.
    So i have an LDAP.ORA with the adress and the ports of the OID.
    My SQLNET.ORA has this content:
    NAMES.DEFAULT_DOMAIN = <my_company_domian>
    SQLNET.AUTHENTICATION_SERVICES= (NTS)
    NAMES.DIRECTORY_PATH= (LDAP, TNSNAMES)So actually there is no problem. But when i turn off the OID-Server there iss a timeout of about 20 second to resolve the name.
    So my problem is not the resolving. I only want to know if there is a possibility to minimize the timeout to switch between LDAP-name-resolving to tnsnames.ora-name-resolving?

    thanks Oviwan but i think this problem couldn't be solved with a parameter.
    @rgoogld:
    I already feared that i have to live with that timeout.
    But your options are interesting. In the future i will have 2 OIDs and in the first time the TNSNAMES.ORA-names-resolving as backup.
    I already can test this because i have a productive OID and one for test-purposes. So at the moment i have two OIDs listet in my LDAP.ORA.
    example:
    DIRECTORY_SERVERS = (<server_name_oid1>:<Port1>:<Port2>, <server_name_oid2>:<Port1>:<Port2>)
    DEFAULT_ADMIN_CONTEXT = ""
    DIRECTORY_SERVER_TYPE = OIDThere is already a (about 20 seconds) timeout, when the OID1 is powered down or the services are stopped. The client honestly ask the second OID after the "timeout" and resolve the name.
    2 OIDs+TNSNAMS or 1 OID+TNSNAMES in both cases your options could perhaps prevent the timeout. I'm not really a system administrator, but i can discuss it with my colleagues here.
    Do you know a smart way to remove or repoint an DNS-entry in a windows enviroment. For such actions i have also to monitor the status of the OID-services or the servers and make the dns-changes if something is crashed.
    At this moment i have no idea how to do this but perhaps you or someone else here have some tips for me.

  • HT1386 How do I create one Apple ID and iTunes user name and password for all of my Apple products: iPad, iPhone, and iPod plus iTunes on my PC?

    How do I create one Apple ID and iTunes user name and password for all of my Apple products: iPad, iPhone, and iPod plus iTunes on my PC?

    Yes, I do have multiple devices and it appeared to me that every time I tried to sync or log onto iTunes, the password was incorrect.  Consequently, I was and am constantly changing it.  Wouldn't it be nice if Apple would simply say that you only need one Apple ID and one password regardless of the number of Apple devices you intend to sync via iTunes. 
    Barring the above, how about a way to merge all of the Apple IDs and passwords into one.

  • I can not transfer date from one hard drive to another, I keep getting an error because I have two of the same file names and one file name is in caps and I cant change the file name

    can not transfer date from one hard drive to another, I keep getting an error because I have two of the same file names and one file name is in caps and I cant change the file name. My original external has an error and needs to be reformatted but I dont want to lose this informations its my entire Itunes library.

    Sounds like the source drive is formatted as case sensitive and the destination drive is not. The preferred format for OS X is case insensitive unless there is a compelling reason to go case sensitive.
    Why can't you change the filename? Is it because the source drive is having problems?  If so is this happening with only one or two or a few files? If so the best thing would be to copy those over individually and then rename them on the destination drive.
    If it is more then you can do manually and you can't change the name on the source you will have to reformat the destination as case sensitive.
    Btw this group is for discussion of the Support Communities itself, you;d do better posting to Lion group. I'll see if a host will move it.

  • I update my iCloud storage today but I paid with my wife's credit card and now anytime that I sended an email appears the name of her instead of mine to all my contacts ??? how can I change and put my name in my emails ??

    hi please I need help , I paid with my wifes credit card the upgrade in my icloud storage today but now any time I send an email appears ....from: my wifes name instead of my name ....how can I change this ,thank you

    You might want to make sure your credit card is listed in the billing information associated with your Apple ID (see http://support.apple.com/kb/ht1918).
    Also, to change the From name that appears when you address emails on and iOS device, go to Settings>Mail,Contacts,Calendars...tap your iCloud email account, tap you iCloud account at the top, tap Mail at the bottom, then enter the name you want to use in the Name field at the top.
    To change the From name on your Mac Mail, go to icloud.com, sign into your account, open Mail, click the gear shaped icon on the bottom left and choose Preferences, go to the Accounts tab and enter the name you want to use in the Full Name field and click Done.  Then quit Mail on your Mac and re-open it.  Your new From name should now appear in the drop-down list when you compose a new email.

  • When I import new home videos into my iTunes and edit the names it creates duplicate Library's on my Apple Tv. How can I stop this from happening each time I edit a name in iTunes home videos??

    I am having an issue with duplicate Libraries showing up in my Home Sharing "Home Videos".  It happens when I import home videos into iTunes and change the names of the files. How do I avoid this from happening and delete the duplicate libraries?

    The sort fields should generally be empty unless you've putting in custom values to sort solo artists by their surnames. You can apply common changes to thousands of tracks at once, just don't apply the wrong change because there is no undo.
    It is a good idea to backup before undertaking large scale changes. See this backup tip for a suggested approach.
    tt2
    Message was edited by: turingtest2

Maybe you are looking for