too many audio files... AS3 don't worky

I created this little program to test with.  , It works perfectly for audio files or equal to 5 / for loops.  As soon as I do more while the sounds stop functioning. Everything else is fine, just no sound. My plan is to have the xml file determin how much sound to create video clips with attached files. I intend to have a ton of video clips and audio files once it is finished.  No luck so far

is there a limit to how much sound swf files can reference? Any other ideas why the sounds do not work for me?

//load xml
var xmlLoader:URLLoader = new URLLoader();
var xmlData:XML = new XML(); 
var xmlPath:String = "data.xml";
xmlLoader.load(new URLRequest(xmlPath));
trace("loading xml from: " + xmlPath);
xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
     
function LoadXML(e:Event):void {
     trace("xml loading complete");
     xmlData = new XML(e.target.data);
     //load objects
     buildScroller();
}

function buildScroller():void{
     var tl:MovieClip=this;
     for (var i:Number = 0; i < 5; i++){

        //create movie clips
        var container_mc:container = new container();
        addChild(container_mc);
        container_mc.x = 325 * i;  // set the number here to the width of the movie clip being repeated
        
        //sound info
        tl["snd"+i] = new Sound();        
        tl["snd"+i].load(new URLRequest(xmlData.sound.loc[i]));
        container_mc.snd = tl["snd"+i];
        container_mc.addEventListener(MouseEvent.CLICK, playSound, false, 0, true);

        function playSound(event:MouseEvent):void {
            event.currentTarget.snd.play();
        }
     }
} 


Here is the xml file that I use:

<DATA>
    <object_count>20</object_count>

    <sound>
        <loc>fart.mp3</loc>
        <loc>burp.mp3</loc>
        <loc>creak128.mp3</loc>
        <loc>GateOpen.mp3</loc>
        <loc>bang.mp3</loc>
        <loc>pop.mp3</loc>
        <loc>slap.mp3</loc>
    </sound>
</DATA> 

>y at - there a limit to how much sound swf files can reference?

N °

First, remove the playSound function of inside the for loop and inside buildScroller. Nested functions are bad programming. In addition, why are you doing tl ["snd" + i] and not only container_mc ["snd" + i]? I don't know why you don't put them only in the container clips themselves if that's how you want to do.

Tags: Adobe Animate

Similar Questions

  • Ulimit/too many open files

    Hey guys,.

    Just had a server go down as a result, too many files open. We could tweak the ulimit to fix. I was wondering if Foglight watches it? If yes what is the metric. If this is not the case, how can I me Dell to add it?

    Hi Daniel.

    I'm sure that you need an agent script for this. The command 'lsof' under Linux should

    helping you get the information.

    I hope this helps.

    Robert

  • Too many audio channels...

    Hello

    I need help to understand something.

    I have the problem with Canon XF images described in this thread:

    http://forums.Adobe.com/thread/1009064?TSTART=0

    Gluttony I utility uthe Canon FX to create merged clips in MXF and nvert those XDCAM HD 50 Mbps 50i 4.2.2 vi SOUL in CS5.5

    When I import the output file in CS6, I get 8 audio channels, 4 for each L & R. My settings are standard for the preset:

    Untitled.png

    I can't change the audiosettings to export, but maybe I could change something in the importation of the ORGANISM CS6?

    I want just a single L & R a track or 1 stereo track, including two L & R.

    Thank you.

    / Ulf

    Why convert to beginning with the media? Are you aware of what you convert MPEG2 to MPEG2 camera you get when you create the new MXF file? (XDCAM HD = MPEG2)

    I would not ever re-compress/convert the already-in-camera-compressed MPEG2 MPEG2 compressed for editing and have then ending up in Let's say DVD MPEG2 or H.264. You lose a generation and I would not lose it by re-encoding in MPEG2 since, IMO, re-encodong MPEG2 MPEG2 are to be avoided. (MPEG2 MPEG2 = quality degrades too) If you want to re - encode images I would use another DNxHD/CineForm/Lagarith codec. (Pick your favorite)

    You can use the Canon XF Utility MXF files in CS6. (The MXF files are just copied from the original folder structure, so without re-encoding is done.)

    As far as I KNOW, problems with video RIP will disappear using the MXF files that you get from XF Utility. If the tear is always present, close Pr and delete all Cache files. Open Pr and Generating Peak file to finish.

    AFAIK 8 audio channels is common in the MXF OP1a according to SMPTE D10.

    / Roger

  • I can't install antivirus avast because the registry has too many temporary files and virus and spyware or malicious software. How can I fix it, manually or software?

    Computer is a 12, xps dell dimension 8800.Tried using disk cleanup and Defrag on the computer, but it could not remove a large number of temporary files. Still can not re - install the avast antivirus that was installed previously, done updates also.

    I suggest before you do anything. Type MSCONFIG in run in the start menu. Click the Startup tab, and then tap off everything. Restart the computer.

    You can clean your temporary files and other unnecessary files with CCleaner.
    http://www.Piriform.com/ccleaner/download

    If request you something to keep on the first run saved passwords from your browser then press no. On the first screen, click on run cleaner on the bottom right.

    If you believe in the detectability of Avast, you can try to install again. Or you can download and install the virus Kaspersky 2011 removal tool.

    http://www.Kaspersky.com/antivirus-removal-tool?form=1

    And spyware, you can install Spybot Search and destroy.

    http://www.safer-networking.org/en/mirrors/index.html

    Note: Make sure that you run the update of the tools.

    Note #2: Virus removal tool is only intended to get rid of the virus. It is not supposed to be used as an anti-virus official.

  • Too many corrupt files - no access to the right files

    Hello

    I had system update error and followed all the instructions how to fix and the installation of the update. Did not work. I managed to get the text from sfcdetails on my desktop, and when you look into it, I think it shows a lot of corrupted files that could not be repaired.

    First of all I'm not sure, I don't understand how to find the name of the file to search for, and second, I don't have any other computer where I could get a good copy.

    Where can I find good copies? They are available anywhere online? and how can I then install them me correct?

    Thanks for the info

    Angela

    "Details of Sfc", which did not help much... Either open, prompt, cmd, type: Sfc/scannow Sfc once

    is thru, type: CHKDSK C: /F agree to restart, type: EXIT restart pc

    The Sfc repairs/fixes will work when restarting with CHKDSK, everything works auto, reboot the pc...

  • Why are there too many vmdk files?

    I use vmware workstation 8 to end of software testing. Both the guest and the host Windows 7 64 bit.

    I have 12 shots with the guest. I found that there are 283 files vmdk, which takes about 420 GB of disk space.

    Now, I deleted all of the snapshots, but there are still 259 files vmdk, who take 395 GB of disk space.

    As I deleted all of the snapshots, now the guest is just a pure installs Windows 7. It should take no more than 10 GB.
    Any suggestion?

    Thank you.

    Wow! The directory listing shows 281 snapshots that dose of course not jive with the dictionary of snapshot (file .vmsd) If you have a mess on your hands.

    Not completely sure that you are the ultimate goal here is however I suggest creating a new virtual hard disk using vmware-vdiskmanager pointing towards "w7 64 - 000281.vmdk" as source and then swap out.

    Also the list of directories being incomplete, it displays only the hard files, I can't you what else to clean the other then delete the file .vmsd if you choose to consolidate snapshots of the "w7 64.vmdk" file using vmware-vdiskmanager.

    Note: DON'T do anything without having a full and correct virtual machine backup before you continue!

  • VMware tools create too many temporary files on the server TS user profiles

    Hi guys,.

    I have problems with the TS and Citrix servers where we have a restriction very strick to profile normally around 30 MB sizes. Temporary files of VMware tools normally use 10-18MB and this affects many users when opening large spreadsheets and we have to keep manually delete the files.

    You guys can suggest alternatives here please? Hosts run ESXi 4.1

    Thank you!

    You can work around the problem by changing a value in this registry key:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\Order\

    Workaround disables the functionality of VMware shared folders in the virtual machine.  Because the feature is not supported by ESX Server or GSX server, turn it off is not a problem. However, if you migrate the virtual machine to the workstation, you not have access to VMware files shared unless you re-enable the feature.

    Warning: This procedure is to modify the registry. Incorrect changes to the registry can leave your system unstable or cannot run. Always back up the registry before you edit it and be cautious to make changes to the registry. VMware assumes no responsibility for the problems that may arise.

    1. Access the Windows registry. Choose Start > run, and then type regedit. The window of the Registry Editor opens.
    2. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\Order\.
    3. Click ProviderOrder , and then click change. In the edit string value dialog box, change the data value chain and remove the word hgfs (or vmhgs).
      • For example, if the string data value contains LanmanWorkstation hgfs (or LanmanWorkstation, vmhgs) , and then replace it by LanmanWorkstation.
      • If the value data string contains hgfs (or vmhgfs), then delete it and leave the value data string empty.
    4. Click OK.
    5. Close the registry editor. Choose file > output.
    6. Restart the virtual machine.

    If you want to re-enable the VMware shared folders feature, add , hgfs (or vmhgs)

    at the end of the value data string, or a whole chain hgfs ( or vmhgs)

    If it is empty.  Alternatively, you can reinstall VMware Tools, using the Complete

    option to re - activate the shared folders.

  • Too many flv files?

    Is there a limitation to Captivate and flv files? I have 10 flv files in a document of captivate. of which 5 are related to a point of departure through branching (which may be the cause of the problem?). In any case, my audio goes out when you view the version published after viewing 8 FLV files. The FLV 2 remaining is to show, but has no audio. Someone has an idea of what's going on here? I have version 2.0.0 build 1177. Thank you!

    I just wanted to keep someone interested in this update. Level 2 of Adobe support has been able to reproduce the problem I had. Now, he was sent to engineering to investigate it as a bug and possibly repaired. In the meantime, I was advised to keep the number of FLV files in my course of 9 or less.

  • 8.1 the store window there download too many 82%, then it don't download the rest of the way.

    In the store window, I try too Update window 8.1the further it will go too 83% it will not update more. It was tt too window8.

    Hi Linda,.

    I apologize for the inconvenience caused to you.

    This problem could occur if hardware or drivers are not compatible, or your computer may have a software that is blocking the upgrade.

    Check that you have installed all Windows updates available including optional updates. Before moving to Windows 8.1, I suggest you run Windows 8.1 upgrade assistant. Assistant upgrade is available for free download that scans your PC, desktop applications and devices to see if they will work with a later version of Windows and provides a free compatibility report.

    If you have antivirus software, you may need to uninstall it before Windows 8.1. We recommend that you use the tools provided by the manufacturer of the software, if available. If you use encryption software, you may have to interrupt it before the upgrade.

    Note: Antivirus software can help protect your computer against viruses and other security threats. In most cases, you should not disable/uninstall your antivirus software. If you do not disable temporarily to install other software, you must reactivate as soon as you are finished. If you are connected to the Internet or a network during the time that your antivirus software is disabled, your computer is vulnerable to attacks.

    Note: It is advisable to update your drivers to the latest revision before performing an upgrade, even if the upgrade wizard can't find no inconsistency.

    Keep us informed on the status of the issue. We will be happy to help you.

  • Too many audio tracks and effects, which makes export difficult

    I'm trying to export a first draft which takes about 5 minutes. It contains 8 different audio tracks, in addition to having almost all of the clips video related to EI 100. So needless to say that the encoding and export will take some time., after half an hour, even not 1%.

    I guess I was wondering if anyone had any suggestions on ways to improve the speed of export? Apart from the various forms of suggestions already spoken on cards similar as below.

    http://www.premiumbeat.com/blog/14-tips-faster-rendering-effects/

    I'm rationalizing all the audio as much as possible.  It would improve speed significantly to export only the audio and then go back and export with the newly exported single audio track? Or is it all dynamic links on AE that make it so slow?

    And sorry if this is already, was a research-specific item type.

    The render and replace the settings I use.

  • VMA Syslog, creating too many log files

    I've implemented our VMA server as a syslog server for our ESXi hosts. I ran the command below to put in place.

    vilogger enable - Server server.domain.com numrotation - 3 - 10 - 10 collectionperiod maxfilesize

    The logs files are being capped at 10MB, but it has already created 4 log files for messages (messages.log.1, messages.log.2, messages.log, messages.log.3). My understanding is that the parameter - numrotation would limit the number of files to 3. Can someone tell me why it does not work?

    Thank you

    Scott

    Hello

    vilogger enable - Server server.domain.com numrotation - 3 - 10 - 10 collectionperiod maxfilesize

    Well, as for me, everything is good, cause you specified have drop shot 3 times

    The logs files are being capped at 10MB, but it has already created 4 log files for messages (messages.log.1, messages.log.2, messages.log, messages.log.3). My understanding is that the parameter - numrotation would limit the number of files to 3. Can someone tell me why it isn't

    *.log is current which is used for logging, *. log # is a file rotated

    See you soon

    Artur

    Visit my blog

    Please, do not forget the points of call of the "useful" or "correct" answers
  • Download too many dependent files.

    In Dreamweaver CS5 and earlier, when I said 'yes' to download on my remote server receive files, it only downloaded a new file or changed. Now, if I say 'yes' it looks like all the files on my site and decides whether to download or not to transfer. It examines every file that is connected to the bar of navigation at the bottom of each page. I tried to let it load, unsynchronize my files and then synchronize them snack again the dates were wrong.

    It is new to Dreamweaver CS6 or can someone tell me how to configure it so it can be set to download dependent files, but it does seem that the new files or changed, like all earlier versions.

    I'm working on a Windows 7 64 bit computer.

    Thank you.

    Murray-

    Thanks for the reply. I used Dreamweaver because it was a baby with Macromedia, and this has never happened before. In CS6, it tried to download the whole site, not only the necessary files or the current page. I did correct the problem, see below.

    Joel-

    I solved the problem by downloading differently, I did with previous versions. I hope that what I wrote below helps.

    First I now checked both ask for get and put in the preferences. Now, if I declare that the dependent files must download, all (even those not newer than on the remote control) will download unless I press "Cancel". If I click on 'No to all', they always go through the process of trying to download as in the screenshot below. To prevent this, I have to say 'Yes' on the dependent files. say 'Yes' to those I want to downloaded would be files that are new or changed and then click 'Cancel' when it on demand for all other connected to this page, which included essentially all the files on my site since I was a navigation bar on each page. As I said, if I say 'No' or 'not at all', it will still go through all the files.

    Now, the above works for me perfectly even if it adds a few steps.

  • ORA-27041 Linux error: 24: too many open files

    Hi Hussein.

    EBS R12 (12.0.6)
    RHEL 4.6


    Our user often encounter this error when opening forms apps.

    http://farm4.static.Flickr.com/3414/3656733122_affddd1ae2.jpg?v=0


    How can I solve this pls.


    Thank you very much

    Hello

    You have "hard" and "soft" defined in the file /etc/security/limits.conf as indicated in the installation document?

    Review of this thread for a similar error and fix.

    Could not open the file
    Re: Could not open the file

    Kind regards
    Hussein

  • Too many files open Crash

    Watching was done with support, one of our FMS crashed last night because of too many open files. Just curious, if this has happened to anyone else? This file is Foglight actually open?

    Someone at - it an agent which montors open files on a host computer? Seem that we need something like that.

    Error open files can be a bit for any java program missleading. This means in fact - handles of files that includes libraries of dynamic dynamic links, each jar file, files opened, each open network socket...

    (at least on unix systems)

    Stefan

  • The table widget. Inserting text, audio files, and pdf files.

    Hello world

    I have a client [Organization of the Church], that they want to put all their audio Sermon in their Web site. Similar to this: http://www.calvarysj.org/?page_id=1310

    They have many audio files and I think I need to sort by year or book but going back to my question, nobody knows how to do or what kind of widget I use?

    Thank you

    Debs

    You use the table here widget:

    http://musewidgets.com/collections/all/products/table-maker

    In addition to adding audio files;

    https://forums.Adobe.com/message/6429361

    https://forums.Adobe.com/message/6276219

    Thank you

    Sanjit

Maybe you are looking for

  • Satellite L500D PSLT9E - Win 8 - OpenGL graphics card driver update issue

    Hello I have upgraded to windows 8 pro 64-bit, I wonder if Toshiba updates it drivers for windows 8 Although all drivers are working well outside of drivers graphics there is no driver win 8.Outside the windows update, it can play games but do not ha

  • MSN deletion

    How can I delete allof msn from my computer

  • Changing from Vista 64 SP1 to XP Pro 32

    Should what drivers I download to complete the change of Vista SP1 64-bit for XP Pro 32. I have a Pavillion S3707 4 GB Ram, HDD 500, Windows Vista 64-bit. The reason for the switch is my old XP shot craps and I just bought this new computer. I'm not

  • Envy of HP dv7-7304sg

    I want to replace the hard drive with ssd and I'm interested, if my laptop supports SATA3 or is it SATA2? Thank you

  • Compaq Presario CQ61 - the missing map

    Hi, I installed Windows XP on this machine (originally there were windows 7 preinstalled) and I cannot locate for this integrated card (Ati Radeon 4200) graphics cards. Motherboard is AMD 785GX.  I looked EVERYWHERE because the drivers page (none of